diff options
author | YamaArashi <shadow962@live.com> | 2016-07-24 11:39:52 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-07-24 11:39:52 -0700 |
commit | 71785b8fc6c42b1f0fc482f38f6a3e32f878efef (patch) | |
tree | 3857b92a890fa823e4d253b3f58ff1596c0cd102 /gcc/thumb.c | |
parent | d3de54b9e1cf35ce1cf248d30fa6b6a90f7849fd (diff) |
add -fhex-asm option
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); } |