all repos — mgba @ 5e78400a25f15906c8ba48fc222e42d7a3bf2cb4

mGBA Game Boy Advance Emulator

Stub out POP/PUSH
Jeffrey Pfau jeffrey@endrift.com
Wed, 10 Apr 2013 00:00:24 -0700
commit

5e78400a25f15906c8ba48fc222e42d7a3bf2cb4

parent

99d0b76f3bdbe80363d3b761b9dee350421ffb74

2 files changed, 26 insertions(+), 4 deletions(-)

jump to
M src/isa-inlines.hsrc/isa-inlines.h

@@ -1,7 +1,15 @@

#ifndef ISA_INLINES_H #define ISA_INLINES_H +#include "arm.h" + #define UNUSED(V) (void)(V) + +#define DO_4(DIRECTIVE) \ + DIRECTIVE, \ + DIRECTIVE, \ + DIRECTIVE, \ + DIRECTIVE #define DO_8(DIRECTIVE) \ DIRECTIVE, \

@@ -14,10 +22,7 @@ DIRECTIVE, \

DIRECTIVE #define DO_256(DIRECTIVE) \ - DO_8(DO_8(DIRECTIVE)), \ - DO_8(DO_8(DIRECTIVE)), \ - DO_8(DO_8(DIRECTIVE)), \ - DO_8(DO_8(DIRECTIVE)) + DO_4(DO_8(DO_8(DIRECTIVE))) #define DO_INTERLACE(LEFT, RIGHT) \ LEFT, \
M src/isa-thumb.csrc/isa-thumb.c

@@ -1,5 +1,7 @@

#include "isa-thumb.h" +#include "isa-inlines.h" + static const ThumbInstruction _thumbTable[0x400]; // Instruction definitions

@@ -189,6 +191,11 @@

DEFINE_INSTRUCTION_THUMB(ADD7, ) DEFINE_INSTRUCTION_THUMB(SUB4, ) +DEFINE_INSTRUCTION_THUMB(POP, ) +DEFINE_INSTRUCTION_THUMB(POPR, ) +DEFINE_INSTRUCTION_THUMB(PUSH, ) +DEFINE_INSTRUCTION_THUMB(PUSHR, ) + DEFINE_INSTRUCTION_THUMB(ILL, ) DEFINE_INSTRUCTION_THUMB(BX, )

@@ -266,6 +273,16 @@ DECLARE_INSTRUCTION_THUMB(EMITTER, ADD7), \

DECLARE_INSTRUCTION_THUMB(EMITTER, ADD7), \ DECLARE_INSTRUCTION_THUMB(EMITTER, SUB4), \ DECLARE_INSTRUCTION_THUMB(EMITTER, SUB4), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, PUSH)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, PUSHR)), \ + DO_8(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ + DO_8(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ + DO_8(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, POP)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, POPR)), \ static const ThumbInstruction _thumbTable[0x400] = { DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)