From 56d30f53ce3134736f478d1cddcf9b079013d963 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 19 Oct 2016 15:21:54 +0000 Subject: Align data before node entry properly; fix one more case of pushing PC to the stack --- cgthumb2was.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3