]> granicus.if.org Git - llvm/commit
[mips] N64 static relocation model support
authorSimon Dardis <simon.dardis@imgtec.com>
Thu, 26 Jan 2017 10:19:02 +0000 (10:19 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Thu, 26 Jan 2017 10:19:02 +0000 (10:19 +0000)
commit40f771f0731cf1bd1ad2189dcf30fc59dc684f12
tree81c107a3fe8cdf61976a36e5e7b5b26e01bcba04
parent4cead7216bf9706a28269b1120746fd47e15a3b3
[mips] 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!

Reviewers: dsanders, seanbruno, zoran.jovanovic, vkalintiris

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293164 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