[PATCH] [mips] Add support for accessing $gp as a named register.
Daniel Sanders
daniel.sanders at imgtec.com
Fri Jan 9 07:27:46 PST 2015
Hi atanasyan, sstankovic, vmedic,
Mips Linux uses $gp to hold a pointer to thread info structure and accesses it
with a named register. This makes this work for LLVM.
The N32 ABI doesn't quite work yet since the frontend generates incorrect IR
for this case. It neglects to truncate the 64-bit GPR to a 32-bit value before
converting to a pointer. Given correct IR (as in the testcase in this patch),
it works correctly.
http://reviews.llvm.org/D6893
Files:
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsISelLowering.h
test/CodeGen/Mips/named-register-n32.ll
test/CodeGen/Mips/named-register-n64.ll
test/CodeGen/Mips/named-register-o32.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6893.17926.patch
Type: text/x-patch
Size: 3299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150109/77a82914/attachment.bin>
More information about the llvm-commits
mailing list