aboutsummaryrefslogtreecommitdiff
path: root/libatomic
diff options
context:
space:
mode:
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>2023-01-07 11:55:11 +0900
committerMax Filippov <jcmvbkbc@gmail.com>2023-01-07 12:21:55 -0800
commitb095a1db483c1a9522a768e52743440d6987c2cd (patch)
tree7a9a26ee432c3cd090e2ed6ada0750761313209c /libatomic
parent2d2edf108026b7e2591900f995bc558ce8d45c6d (diff)
downloadgcc-b095a1db483c1a9522a768e52743440d6987c2cd.zip
gcc-b095a1db483c1a9522a768e52743440d6987c2cd.tar.gz
gcc-b095a1db483c1a9522a768e52743440d6987c2cd.tar.bz2
xtensa: Optimize stack frame adjustment more
This patch introduces a convenient helper function for integer immediate addition with scratch register as needed, that splits and emits either up to two ADDI/ADDMI machine instructions or an addition by register following an integer immediate load (which may later be transformed by constantsynth). By using the helper function, it makes stack frame adjustment logic simplified and instruction count less in some cases. gcc/ChangeLog: * config/xtensa/xtensa.cc (xtensa_split_imm_two_addends, xtensa_emit_add_imm): New helper functions. (xtensa_set_return_address, xtensa_output_mi_thunk): Change to use the helper function. (xtensa_emit_adjust_stack_ptr): Ditto. And also change to try reusing the content of scratch register A9 if the register is not modified in the function body.
Diffstat (limited to 'libatomic')
0 files changed, 0 insertions, 0 deletions