ARM: Page-align instruction tables

This commit is contained in:
Vicki Pfau 2019-06-22 17:12:01 -07:00
parent 81098060aa
commit c1c99c0a37
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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)
};

View File

@ -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)
};