blob: 13995bc8d9e9a318454582540979a209c2d87b28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using ARMeilleure.IntermediateRepresentation;
namespace ARMeilleure.CodeGen.RegisterAllocators
{
class StackAllocator
{
private int _offset;
public int TotalSize => _offset;
public int Allocate(OperandType type)
{
return Allocate(type.GetSizeInBytes());
}
public int Allocate(int sizeInBytes)
{
int offset = _offset;
_offset += sizeInBytes;
return offset;
}
}
}
|