aboutsummaryrefslogtreecommitdiff
path: root/libcpp/generated_cpp_wcwidth.h
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-07-11 19:43:48 +0800
committerLulu Cheng <chenglulu@loongson.cn>2024-10-08 10:41:25 +0800
commit0ee028f556401846d27edf0ff67647a1a7a26b6c (patch)
tree40fb835273cb08e025a036ef29bd4dd464e808f0 /libcpp/generated_cpp_wcwidth.h
parentc01e3aaae79ecd439ad35063db3dee9775f3aefa (diff)
downloadgcc-0ee028f556401846d27edf0ff67647a1a7a26b6c.zip
gcc-0ee028f556401846d27edf0ff67647a1a7a26b6c.tar.gz
gcc-0ee028f556401846d27edf0ff67647a1a7a26b6c.tar.bz2
LoongArch: Add support to annotate tablejump
This is per the request from the kernel developers. For generating the ORC unwind info, the objtool program needs to analysis the control flow of a .o file. If a jump table is used, objtool has to correlate the jump instruction with the table. On x86 (where objtool was initially developed) it's simple: a relocation entry natrually correlates them because one single instruction is used for table-based jump. But on an RISC machine objtool would have to reconstruct the data flow if it must find out the correlation on its own. So, emit an additional section to store the correlation info as pairs of addresses, each pair contains the address of a jump instruction (jr) and the address of the jump table. This is very trivial to implement in GCC. gcc/ChangeLog: * config/loongarch/genopts/loongarch.opt.in (mannotate-tablejump): New option. * config/loongarch/loongarch.opt: Regenerate. * config/loongarch/loongarch.md (tablejump<mode>): Emit additional correlation info between the jump instruction and the jump table, if -mannotate-tablejump. * doc/invoke.texi: Document -mannotate-tablejump. gcc/testsuite/ChangeLog: * gcc.target/loongarch/jump-table-annotate.c: New test. Suggested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'libcpp/generated_cpp_wcwidth.h')
0 files changed, 0 insertions, 0 deletions