mirror of https://github.com/mgba-emu/mgba.git
ARM: Page-align instruction tables
This commit is contained in:
parent
81098060aa
commit
c1c99c0a37
|
@ -218,6 +218,7 @@ typedef intptr_t ssize_t;
|
|||
#define ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_FORMAT(X, Y, Z)
|
||||
#define ATTRIBUTE_NOINLINE
|
||||
#define ATTRIBUTE_ALIGN
|
||||
// Adapted from https://stackoverflow.com/a/2390626
|
||||
#define _CONSTRUCTOR(FN, PRE) \
|
||||
static void FN(void); \
|
||||
|
@ -232,6 +233,7 @@ typedef intptr_t ssize_t;
|
|||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
#define ATTRIBUTE_FORMAT(X, Y, Z) __attribute__((format(X, Y, Z)))
|
||||
#define ATTRIBUTE_NOINLINE __attribute__((noinline))
|
||||
#define ATTRIBUTE_ALIGN(X) __attribute__((aligned(X)))
|
||||
#define CONSTRUCTOR(FN) static __attribute__((constructor)) void FN(void)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -738,6 +738,6 @@ DEFINE_INSTRUCTION_ARM(MSRRI,
|
|||
|
||||
DEFINE_INSTRUCTION_ARM(SWI, cpu->irqh.swi32(cpu, opcode & 0xFFFFFF))
|
||||
|
||||
const ARMInstruction _armTable[0x1000] = {
|
||||
ATTRIBUTE_ALIGN(4096) const ARMInstruction _armTable[0x1000] = {
|
||||
DECLARE_ARM_EMITTER_BLOCK(_ARMInstruction)
|
||||
};
|
||||
|
|
|
@ -400,6 +400,6 @@ DEFINE_INSTRUCTION_THUMB(BX,
|
|||
|
||||
DEFINE_INSTRUCTION_THUMB(SWI, cpu->irqh.swi16(cpu, opcode & 0xFF))
|
||||
|
||||
const ThumbInstruction _thumbTable[0x400] = {
|
||||
ATTRIBUTE_ALIGN(4096) const ThumbInstruction _thumbTable[0x400] = {
|
||||
DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue