diff options
Diffstat (limited to 'gcc/thumb.c')
-rwxr-xr-x | gcc/thumb.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gcc/thumb.c b/gcc/thumb.c index 954812c..ac122f7 100755 --- a/gcc/thumb.c +++ b/gcc/thumb.c @@ -767,8 +767,12 @@ thumb_function_prologue(FILE *f, int frame_size) asm_fprintf(f, "}\n"); } else - asm_fprintf(f, "\tsub\t%Rsp, %Rsp, #%d\n", - current_function_pretend_args_size); + { + if (flag_hex_asm) + asm_fprintf(f, "\tsub\t%Rsp, %Rsp, #0x%x\n", current_function_pretend_args_size); + else + asm_fprintf(f, "\tsub\t%Rsp, %Rsp, #%d\n", current_function_pretend_args_size); + } } for (regno = 0; regno < 8; regno++) @@ -1090,10 +1094,20 @@ thumb_unexpanded_epilogue() } /* Remove the argument registers that were pushed onto the stack. */ - asm_fprintf(asm_out_file, "\tadd\t%s, %s, #%d\n", - reg_names[STACK_POINTER], - reg_names[STACK_POINTER], - current_function_pretend_args_size); + if (flag_hex_asm) + { + asm_fprintf(asm_out_file, "\tadd\t%s, %s, #0x%x\n", + reg_names[STACK_POINTER], + reg_names[STACK_POINTER], + current_function_pretend_args_size); + } + else + { + asm_fprintf(asm_out_file, "\tadd\t%s, %s, #%d\n", + reg_names[STACK_POINTER], + reg_names[STACK_POINTER], + current_function_pretend_args_size); + } thumb_exit(asm_out_file, had_to_push_lr ? ARG_4_REGISTER : LINK_REGISTER); } |