diff options
author | Camil Staps | 2016-12-01 16:04:32 +0000 |
---|---|---|
committer | Camil Staps | 2016-12-01 16:04:32 +0000 |
commit | 507716d49f69d4c47e04e9790057cd32d2cf2d68 (patch) | |
tree | 36a1356d25edf959a993484b608b3df1d8b721f4 | |
parent | Don't generate illegal immediate constants (diff) |
Some code style improvements
-rw-r--r-- | cgthumb2was.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cgthumb2was.c b/cgthumb2was.c index 3dee9b9..e0fbb15 100644 --- a/cgthumb2was.c +++ b/cgthumb2was.c @@ -1226,7 +1226,7 @@ static void w_as_lea_instruction (struct instruction *instruction) int dyadic_instruction_allowed (struct instruction *instruction,char *opcode) { - if (strcmp("sp", register_name[instruction->instruction_parameters[1].parameter_data.reg.r+7])) + if (instruction->instruction_parameters[1].parameter_data.reg.r!=B_STACK_POINTER) return 1; if (!strcmp("mov", opcode) || !strcmp("add", opcode) || @@ -1252,9 +1252,9 @@ static void w_as_dyadic_instruction_through_scratch (struct instruction *instruc w_as_register (r1); w_as_newline_after_instruction(); - instruction->instruction_parameters[1].parameter_data.reg.r = 13-7; /* r12 */ + instruction->instruction_parameters[1].parameter_data.reg.r=REGISTER_S0; - w_as_dyadic_instruction (instruction, opcode); + w_as_dyadic_instruction (instruction,opcode); w_as_opcode_mov(); w_as_register_comma (r1); |