diff options
-rw-r--r-- | cgthumb2was.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cgthumb2was.c b/cgthumb2was.c index 555bf1d..af06567 100644 --- a/cgthumb2was.c +++ b/cgthumb2was.c @@ -401,6 +401,10 @@ static void w_as_define_code_label (LABEL *label) w_as_label (label->label_name); w_as_colon(); w_as_newline(); + + if (label->label_flags & NODE_ENTRY_LABEL) { + w_as_instruction_without_parameters ("nop"); + } } static void w_as_internal_label (int label_number) @@ -1494,7 +1498,7 @@ static void w_as_jsr_instruction (struct instruction *instruction) case P_INDIRECT_WITH_UPDATE: w_as_instruction_without_parameters (".align"); w_as_opcode ("add"); - fprintf (assembly_file,"lr,pc,#8"); + fprintf (assembly_file,"lr,pc,#9"); w_as_newline_after_instruction(); w_as_opcode ("str"); fprintf (assembly_file,"lr,[sp,#%d]!",instruction->instruction_parameters[1].parameter_offset); @@ -2351,9 +2355,6 @@ static void w_as_rts_instruction (void) w_as_opcode ("ldr"); fprintf (assembly_file,"lr,[sp],#4"); w_as_newline_after_instruction(); - w_as_opcode ("orr"); - fprintf (assembly_file,"lr,lr,#1"); - w_as_newline_after_instruction(); w_as_opcode ("mov"); fprintf (assembly_file,"pc,lr"); w_as_newline_after_instruction(); |