[PATCH] D64252: [Mips] Instruction `sc` now accepts symbol as an argument

Mirko Brkusanin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 09:05:42 PDT 2019


mbrkusanin updated this revision to Diff 213629.
mbrkusanin added a comment.

Symbol with offset was not handled properly on MipsR6. R_MIPS_LO16 (MipsMCExpr::MEK_LO) would write offset into lower 16 bits, where as for R6 <https://reviews.llvm.org/source/compiler-rt/> version offset is in bits 7-15. Initially I made new type of MCFixup which would only use those bits, but then there was a lot of additional code needed for handling all cases where MCFixups were used. Now we just add ADDIU for R6 <https://reviews.llvm.org/source/compiler-rt/> and use R_MIPS_LO16 on that instruction which is the same way that gcc works.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64252/new/

https://reviews.llvm.org/D64252

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
  lib/Target/Mips/MipsTargetStreamer.h
  test/MC/Mips/sym-sc.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64252.213629.patch
Type: text/x-patch
Size: 12375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190806/cd924321/attachment.bin>


More information about the llvm-commits mailing list