[PATCH] D54154: [ELF][MIPS] Use MIPS R6 `sigrie` as a trap instruction
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 07:05:09 PST 2018
atanasyan created this revision.
atanasyan added reviewers: ruiu, grimar.
Herald added subscribers: jrtc27, arichardson, sdardis, emaste.
Herald added a reviewer: espindola.
Current value using as a trap instruction (0xefefefef) is not a good choice for MIPS because it's a valid MIPS instruction `swc3 $15,-4113(ra)`. This patch replaces 0xefefefef by 0x04170001. For all MIPS ISA revisions before https://reviews.llvm.org/source/compiler-rt/, this value is just invalid instruction. Starting from MIPS https://reviews.llvm.org/source/compiler-rt/ it's a valid instruction `sigrie 1` which signals a Reserved Instruction exception.
mips-got16-relocatable.s test case is changed to test using this trap instruction. Other test cases are modified to remove redundant checking.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D54154
Files:
ELF/Arch/Mips.cpp
test/ELF/mips-got16-relocatable.s
test/ELF/mips-npic-call-pic-os.s
test/ELF/mips-npic-call-pic-script.s
test/ELF/mips-npic-call-pic.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54154.172766.patch
Type: text/x-patch
Size: 21130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181106/24438728/attachment-0001.bin>
More information about the llvm-commits
mailing list