preparations for block linking
This commit is contained in:
parent
5ab56cef5f
commit
3098c6a9a0
|
@ -86,6 +86,14 @@ struct __attribute__((packed)) TinyVector
|
||||||
Capacity = capacity;
|
Capacity = capacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetLength(u16 length)
|
||||||
|
{
|
||||||
|
if (Capacity < length)
|
||||||
|
MakeCapacity(length);
|
||||||
|
|
||||||
|
Length = length;
|
||||||
|
}
|
||||||
|
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
Length = 0;
|
Length = 0;
|
||||||
|
@ -147,12 +155,7 @@ public:
|
||||||
{
|
{
|
||||||
NumInstrs = numInstrs;
|
NumInstrs = numInstrs;
|
||||||
NumAddresses = numAddresses;
|
NumAddresses = numAddresses;
|
||||||
Data = new u32[numInstrs + numAddresses];
|
Data.SetLength(numInstrs + numAddresses);
|
||||||
}
|
|
||||||
|
|
||||||
~JitBlock()
|
|
||||||
{
|
|
||||||
delete[] Data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 StartAddr;
|
u32 StartAddr;
|
||||||
|
@ -160,13 +163,14 @@ public:
|
||||||
|
|
||||||
u32 NumInstrs;
|
u32 NumInstrs;
|
||||||
u32 NumAddresses;
|
u32 NumAddresses;
|
||||||
|
u32 NumLinks;
|
||||||
|
|
||||||
JitBlockEntry EntryPoint;
|
JitBlockEntry EntryPoint;
|
||||||
|
|
||||||
u32* Instrs()
|
u32* Instrs()
|
||||||
{ return Data; }
|
{ return &Data[0]; }
|
||||||
u32* AddressRanges()
|
u32* AddressRanges()
|
||||||
{ return Data + NumInstrs; }
|
{ return &Data[NumInstrs]; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*
|
/*
|
||||||
|
@ -174,7 +178,7 @@ private:
|
||||||
NumInstrs..<(NumLinks + NumInstrs) - pseudo physical addresses where the block is located
|
NumInstrs..<(NumLinks + NumInstrs) - pseudo physical addresses where the block is located
|
||||||
(atleast one, the pseudo physical address of the block)
|
(atleast one, the pseudo physical address of the block)
|
||||||
*/
|
*/
|
||||||
u32* Data;
|
TinyVector<u32> Data;
|
||||||
};
|
};
|
||||||
|
|
||||||
// size should be 16 bytes because I'm to lazy to use mul and whatnot
|
// size should be 16 bytes because I'm to lazy to use mul and whatnot
|
||||||
|
|
Loading…
Reference in New Issue