@@ -36,54 +36,68 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
3636 uint32_t uimm = uint16_t(opcode); \
3737 uint32_t ppc_result_a = ppc_state.gpr[reg_a];
3838
39- # define ppc_grab_regsasimm (opcode ) \
39+ #define ppc_grab_regsasimm (opcode ) \
4040 int reg_a = (opcode >> 16) & 31; \
4141 int32_t simm = int32_t(int16_t(opcode)); \
4242 uint32_t ppc_result_a = ppc_state.gpr[reg_a];
4343
44- # define ppc_grab_regssauimm (opcode ) \
44+ #define ppc_grab_regssauimm (opcode ) \
4545 int reg_s = (opcode >> 21) & 31; \
4646 int reg_a = (opcode >> 16) & 31; \
4747 uint32_t uimm = uint16_t(opcode); \
4848 uint32_t ppc_result_d = ppc_state.gpr[reg_s]; \
4949 uint32_t ppc_result_a = ppc_state.gpr[reg_a];
5050
51+ #define ppc_grab_da (opcode )\
52+ int reg_d = (opcode >> 21) & 31;\
53+ int reg_a = (opcode >> 16) & 31;\
54+
5155#define ppc_grab_dab (opcode ) \
5256 int reg_d = (opcode >> 21) & 31; \
5357 int reg_a = (opcode >> 16) & 31; \
5458 int reg_b = (opcode >> 11) & 31;
5559
60+ #define ppc_grab_s (opcode ) \
61+ int reg_s = (opcode >> 21) & 31; \
62+ uint32_t ppc_result_d = ppc_state.gpr[reg_s];
63+
5664#define ppc_grab_regsdab (opcode ) \
5765 int reg_d = (opcode >> 21) & 31; \
58- uint32_t reg_a = (opcode >> 16) & 31; \
59- uint32_t reg_b = (opcode >> 11) & 31; \
66+ int reg_a = (opcode >> 16) & 31; \
67+ int reg_b = (opcode >> 11) & 31; \
6068 uint32_t ppc_result_a = ppc_state.gpr[reg_a]; \
6169 uint32_t ppc_result_b = ppc_state.gpr[reg_b];
6270
6371#define ppc_grab_regssab (opcode ) \
64- uint32_t reg_s = (opcode >> 21) & 31; \
65- uint32_t reg_a = (opcode >> 16) & 31; \
66- uint32_t reg_b = (opcode >> 11) & 31; \
72+ int reg_s = (opcode >> 21) & 31; \
73+ int reg_a = (opcode >> 16) & 31; \
74+ int reg_b = (opcode >> 11) & 31; \
6775 uint32_t ppc_result_d = ppc_state.gpr[reg_s]; \
6876 uint32_t ppc_result_a = ppc_state.gpr[reg_a]; \
6977 uint32_t ppc_result_b = ppc_state.gpr[reg_b]; \
7078
71- #define ppc_grab_regssa (opcode ) \
72- uint32_t reg_s = (opcode >> 21) & 31; \
73- uint32_t reg_a = (opcode >> 16) & 31; \
79+ #define ppc_grab_regsab (opcode ) \
80+ int reg_a = (opcode >> 16) & 31;\
81+ int reg_b = (opcode >> 11) & 31;\
82+ uint32_t ppc_result_a = ppc_state.gpr[reg_a];\
83+ uint32_t ppc_result_b = ppc_state.gpr[reg_b];
84+
85+ #define ppc_grab_regssa (opcode ) \
86+ int reg_s = (opcode >> 21) & 31; \
87+ int reg_a = (opcode >> 16) & 31; \
7488 uint32_t ppc_result_d = ppc_state.gpr[reg_s]; \
7589 uint32_t ppc_result_a = ppc_state.gpr[reg_a];
7690
7791#define ppc_grab_regssash (opcode ) \
78- uint32_t reg_s = (opcode >> 21) & 31; \
79- uint32_t reg_a = (opcode >> 16) & 31; \
80- uint32_t rot_sh = (opcode >> 11) & 31; \
92+ int reg_s = (opcode >> 21) & 31; \
93+ int reg_a = (opcode >> 16) & 31; \
94+ int rot_sh = (opcode >> 11) & 31; \
8195 uint32_t ppc_result_d = ppc_state.gpr[reg_s]; \
8296 uint32_t ppc_result_a = ppc_state.gpr[reg_a];
8397
8498#define ppc_grab_regssb (opcode ) \
85- uint32_t reg_s = (opcode >> 21) & 31; \
86- uint32_t reg_b = (opcode >> 11) & 31; \
99+ int reg_s = (opcode >> 21) & 31; \
100+ int reg_b = (opcode >> 11) & 31; \
87101 uint32_t ppc_result_d = ppc_state.gpr[reg_s]; \
88102 uint32_t ppc_result_b = ppc_state.gpr[reg_b]; \
89103
0 commit comments