]> granicus.if.org Git - llvm/commit
[mips] Recommit: "N64 static relocation model support"
authorSimon Dardis <simon.dardis@imgtec.com>
Fri, 27 Jan 2017 11:36:52 +0000 (11:36 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Fri, 27 Jan 2017 11:36:52 +0000 (11:36 +0000)
commit93c31fb5c9b6e8a7d01fa35b41e4f878a8d1be50
tree5cefed16cd3a07ddf36671053949bcb68a21fbbf
parent2272113e892a065c0465470b4ef74fbd493468cf
[mips] Recommit: "N64 static relocation model support"

This patch makes one change to GOT handling and two changes to N64's
relocation model handling. Furthermore, the jumptable encodings have
been corrected for static N64.

Big GOT handling is now done via a new SDNode MipsGotHi - this node is
unconditionally lowered to an lui instruction.

The first change to N64's relocation handling is the lifting of the
restriction that N64 always uses PIC. Now it is possible to target static
environments.

The second change adds support for 64 bit symbols and enables them by
default. Previously N64 had patterns for sym32 mode only. In this mode all
symbols are assumed to have 32 bit addresses. sym32 mode support
is selectable with attribute 'sym32'. A follow on patch for clang will
add the necessary frontend parameter.

This partially resolves PR/23485.

Thanks to Brooks Davis for reporting the issue!

This version corrects a "Conditional jump or move depends on uninitialised
value(s)" error detected by valgrind present in the original commit.

Reviewers: dsanders, seanbruno, zoran.jovanovic, vkalintiris

Differential Revision: https://reviews.llvm.org/D23652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293279 91177308-0d34-0410-b5e6-96231b3b80d8
50 files changed:
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
lib/Target/Mips/MicroMips64r6InstrInfo.td
lib/Target/Mips/Mips.td
lib/Target/Mips/Mips64InstrInfo.td
lib/Target/Mips/MipsAsmPrinter.cpp
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsISelLowering.h
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsSEISelDAGToDAG.cpp
lib/Target/Mips/MipsSubtarget.cpp
lib/Target/Mips/MipsSubtarget.h
test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll
test/CodeGen/Mips/2010-07-20-Switch.ll
test/CodeGen/Mips/abicalls.ll
test/CodeGen/Mips/blockaddr.ll
test/CodeGen/Mips/cconv/arguments-float.ll
test/CodeGen/Mips/cconv/arguments-fp128.ll
test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll
test/CodeGen/Mips/cconv/arguments-hard-float.ll
test/CodeGen/Mips/cconv/arguments-hard-fp128.ll
test/CodeGen/Mips/cconv/arguments-struct.ll
test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll
test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll
test/CodeGen/Mips/cconv/arguments-varargs.ll
test/CodeGen/Mips/cconv/arguments.ll
test/CodeGen/Mips/cconv/return-float.ll
test/CodeGen/Mips/cconv/return-hard-float.ll
test/CodeGen/Mips/cconv/return-hard-fp128.ll
test/CodeGen/Mips/cconv/return-hard-struct-f128.ll
test/CodeGen/Mips/cconv/return-struct.ll
test/CodeGen/Mips/cconv/return.ll
test/CodeGen/Mips/cconv/roundl-call.ll
test/CodeGen/Mips/compactbranches/compact-branches-64.ll
test/CodeGen/Mips/compactbranches/compact-branches.ll
test/CodeGen/Mips/cstmaterialization/stack.ll
test/CodeGen/Mips/elf_eflags.ll
test/CodeGen/Mips/fcmp.ll
test/CodeGen/Mips/fcopysign-f32-f64.ll
test/CodeGen/Mips/global-address.ll
test/CodeGen/Mips/inlineasm-constraint_ZC_2.ll
test/CodeGen/Mips/llvm-ir/call.ll
test/CodeGen/Mips/mips64-f128-call.ll
test/CodeGen/Mips/mips64-f128.ll
test/CodeGen/Mips/mips64-libcall.ll
test/CodeGen/Mips/mips64instrs.ll
test/CodeGen/Mips/start-asm-file.ll
test/CodeGen/Mips/tailcall/tailcall-wrong-isa.ll
test/CodeGen/Mips/tailcall/tailcall.ll
test/MC/Mips/elf_eflags.s