[PATCH] D81919: [MIPS64] Workaround fixup_Mips_32 for getExprOpValue
Leslie Zhai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 23:57:44 PDT 2020
xiangzhai updated this revision to Diff 271277.
xiangzhai added a comment.
Just workaround as GNU toolchain:
$ objdump -dr t.llvm.o
t.llvm.o: file format elf64-tradlittlemips
Disassembly of section .text:
0000000000000000 <main>:
0: 00000000 nop
4: 67f9fffc daddiu t9,ra,-4
8: 67f90000 daddiu t9,ra,0
...
10: R_MIPS_32 main
10: R_MIPS_NONE *ABS*
10: R_MIPS_NONE *ABS*
The `ExprKind` of `main - .` is `ExprKind::Binary`, but GNU toolchain treat it as `%lo(main - .)`, because `ORI` and `DADDIU` only have the 16-bit signed immediate!
So just workaround `ExprKind::Binary` to `ExprKind::Target` for BAD relocation directive N64 testcase.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81919/new/
https://reviews.llvm.org/D81919
Files:
llvm/include/llvm/MC/MCContext.h
llvm/lib/MC/MCContext.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
llvm/test/MC/Mips/reloc-directive-bad-n64.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81919.271277.patch
Type: text/x-patch
Size: 3504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200617/7619dbb7/attachment.bin>
More information about the llvm-commits
mailing list