From c82f389a019426aaa9363325388c61736b333545 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 15 Nov 2016 21:32:29 +0000 Subject: Optimisation: pc can be Rd operand for ldr; nop at node entry not needed --- cgthumb2was.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cgthumb2was.c b/cgthumb2was.c index 21dcedd..dade5a1 100644 --- a/cgthumb2was.c +++ b/cgthumb2was.c @@ -401,10 +401,6 @@ 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) @@ -2353,10 +2349,7 @@ static void w_as_fmovel_instruction (struct instruction *instruction) 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 ("mov"); - fprintf (assembly_file,"pc,lr"); + fprintf (assembly_file,"pc,[sp],#4"); w_as_newline_after_instruction(); write_float_constants(); -- cgit v1.2.3