diff options
author | Camil Staps | 2016-10-19 15:21:54 +0000 |
---|---|---|
committer | Camil Staps | 2016-10-19 15:21:54 +0000 |
commit | 56d30f53ce3134736f478d1cddcf9b079013d963 (patch) | |
tree | 87b8f382697f0465bca1199372b514eee971a934 | |
parent | Maybe Fix for having the LSB on 1, by flipping its meaning in the garbage col... (diff) |
Align data before node entry properly; fix one more case of pushing PC to the stack
-rw-r--r-- | cgthumb2was.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cgthumb2was.c b/cgthumb2was.c index af06567..ebe4e2c 100644 --- a/cgthumb2was.c +++ b/cgthumb2was.c @@ -1513,7 +1513,7 @@ static void w_as_jsr_instruction (struct instruction *instruction) w_as_instruction_without_parameters (".align"); w_as_opcode ("add"); fprintf (assembly_file,"lr,pc,#%d", - instruction->instruction_parameters[0].parameter_type==P_REGISTER ? 6 : 8); + instruction->instruction_parameters[0].parameter_type==P_REGISTER ? 7 : 9); w_as_newline_after_instruction(); switch (instruction->instruction_parameters[1].parameter_type){ case P_INDIRECT_WITH_UPDATE: @@ -2652,6 +2652,7 @@ static void w_as_instructions (struct instruction *instruction) static void w_as_number_of_arguments (int n_node_arguments) { + w_as_instruction_without_parameters (".align"); w_as_opcode (".long"); fprintf (assembly_file,"%d",n_node_arguments); w_as_newline(); |