diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2017-11-10 14:27:42 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-11-27 15:13:00 -0800 |
commit | 46888d710015aa8d4bb3c2dac7aa6505d6ac8227 (patch) | |
tree | 017a7b95e02d879c357234f1a0422b5068cd0a1c /gas/config/tc-xtensa.h | |
parent | 1c2649f50f4e40c07840f45c4d237efcdd02e8e2 (diff) | |
download | gdb-46888d710015aa8d4bb3c2dac7aa6505d6ac8227.zip gdb-46888d710015aa8d4bb3c2dac7aa6505d6ac8227.tar.gz gdb-46888d710015aa8d4bb3c2dac7aa6505d6ac8227.tar.bz2 |
gas: xtensa: merge trampoline_frag into xtensa_frag_type
The split between fragS and trampoline_frag doesn't save much space, but
makes trampolines management much more awkward. Merge trampoline_frag
data into the xtensa_frag_type, which is a part of fragS. No functional
changes.
gas/
2017-11-27 Max Filippov <jcmvbkbc@gmail.com>
* config/tc-xtensa.c (init_trampoline_frag): Replace pointer to
struct trampoline_frag parameter with pointer to fragS.
(xg_append_jump): Remove jump_around parameter.
(struct trampoline_frag): Remove.
(struct trampoline_seg): Change type of trampoline_list from
struct trampoline_frag to fragS.
(xtensa_create_trampoline_frag): Don't allocate struct
trampoline_frag. Initialize new fragS::tc_frag_data fields.
(dump_trampolines, xg_relax_trampoline, search_trampolines)
(get_best_trampoline, init_trampoline_frag)
(add_jump_to_trampoline, relax_frag_immed): Replace pointer to
struct trampoline_frag with a pointer to fragS.
(xg_append_jump): Remove jump_around parameter, use
fragS::tc_frag_data.jump_around_fix instead.
(xg_relax_trampoline, init_trampoline_frag)
(add_jump_to_trampoline): Don't pass jump_around parameter to
xg_append_jump.
* config/tc-xtensa.h (struct xtensa_frag_type): Add new fields:
needs_jump_around, next_trampoline and jump_around_fix.
Diffstat (limited to 'gas/config/tc-xtensa.h')
-rw-r--r-- | gas/config/tc-xtensa.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h index 912c890..59907a5 100644 --- a/gas/config/tc-xtensa.h +++ b/gas/config/tc-xtensa.h @@ -236,6 +236,10 @@ struct xtensa_frag_type align branch targets as if it were a normal narrow instruction. */ unsigned int is_aligning_branch : 1; + /* A trampoline frag that is located in the middle of code and thus + needs a jump around. */ + unsigned int needs_jump_around : 1; + /* For text fragments that can generate literals at relax time, this variable points to the frag where the literal will be stored. For literal frags, this variable points to the nearest literal pool @@ -269,6 +273,10 @@ struct xtensa_frag_type symbolS *slot_symbols[MAX_SLOTS]; offsetT slot_offsets[MAX_SLOTS]; + /* For trampoline fragments. */ + fragS *next_trampoline; + struct fix *jump_around_fix; + /* When marking frags after this one in the chain as no transform, cache the last one in the chain, so that we can skip to the end of the chain. */ |