Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1 |
|
#
5481c217 |
| 11-Jan-2018 |
Stefan Maksimovic <stefan.maksimovic@mips.com> |
[Mips] Handle one byte unsupported relocations
Fail gracefully instead of crashing upon encountering this type of relocation.
Differential revision: https://reviews.llvm.org/D41857
llvm-svn: 322266
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1 |
|
#
60fbc7cc |
| 10-Oct-2017 |
Lang Hames <lhames@gmail.com> |
[MC] Thread unique_ptr<MCObjectWriter> through the create.*ObjectWriter functions.
This makes the ownership of the resulting MCObjectWriter clear, and allows us to remove one instance of MCObjectStr
[MC] Thread unique_ptr<MCObjectWriter> through the create.*ObjectWriter functions.
This makes the ownership of the resulting MCObjectWriter clear, and allows us to remove one instance of MCObjectStreamer's bizarre "holding ownership via someone else's reference" trick.
llvm-svn: 315327
show more ...
|
#
dcb312bd |
| 09-Oct-2017 |
Lang Hames <lhames@gmail.com> |
[MC] Plumb unique_ptr<MCELFObjectTargetWriter> through createELFObjectWriter to ELFObjectWriter's constructor.
Fixes the same ownership issue for ELF that r315245 did for MachO: ELFObjectWriter take
[MC] Plumb unique_ptr<MCELFObjectTargetWriter> through createELFObjectWriter to ELFObjectWriter's constructor.
Fixes the same ownership issue for ELF that r315245 did for MachO: ELFObjectWriter takes ownership of its MCELFObjectTargetWriter, so we want to pass this through to the constructor via a unique_ptr, rather than a raw ptr.
llvm-svn: 315254
show more ...
|
#
9f676a77 |
| 21-Sep-2017 |
Simon Atanasyan <simon@atanasyan.com> |
[mips] Do not pass redundant IsN64 flag to MCELFObjectTargetWriter. NFC
Now we pass the 'Is64_' flag to the MCELFObjectTargetWriter ctor iif when we make deal with N64 ABI. So it is redundant to pas
[mips] Do not pass redundant IsN64 flag to MCELFObjectTargetWriter. NFC
Now we pass the 'Is64_' flag to the MCELFObjectTargetWriter ctor iif when we make deal with N64 ABI. So it is redundant to pass additional 'IsN64' flag.
llvm-svn: 313878
show more ...
|
#
11766558 |
| 21-Sep-2017 |
Simon Atanasyan <simon@atanasyan.com> |
[mips] Fix relocation record format and ELF header for N32 ABI
The N32 ABI uses RELA relocation format, do not use 3-in-1 relocation's encoding, and uses ELFCLASS32. This change passes the `IsN32` f
[mips] Fix relocation record format and ELF header for N32 ABI
The N32 ABI uses RELA relocation format, do not use 3-in-1 relocation's encoding, and uses ELFCLASS32. This change passes the `IsN32` flag to the `MCAsmBackend` to distinguish usage of N32 ABI.
We still do not handle some cases like providing the `-target-abi=o32` command line option with the `mips64` target triple. That's why elf_header.s contains some "FIXME" strings. This case will be fixed in a separate patch.
Differential revision: https://reviews.llvm.org/D37960
llvm-svn: 313873
show more ...
|
#
6d795868 |
| 07-Sep-2017 |
Simon Atanasyan <simon@atanasyan.com> |
[mips] Use RegisterMCAsmBackend to register all MIPS asm backends. NFC
This change converts the `MipsAsmBackend` constructor to the "standard" form. It makes possible to use `RegisterMCAsmBackend` f
[mips] Use RegisterMCAsmBackend to register all MIPS asm backends. NFC
This change converts the `MipsAsmBackend` constructor to the "standard" form. It makes possible to use `RegisterMCAsmBackend` for the backends registrations. Now we pass `Triple` instance to the `MipsAsmBackend` ctor and deduce all required options like endianness and bitness from the triple. We still need to implement explicit ABI checking for providing correct options to backends.
Differential revision: https://reviews.llvm.org/D37519
llvm-svn: 312720
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
264b5d9e |
| 07-Jun-2017 |
Zachary Turner <zturner@google.com> |
Move Object format code to lib/BinaryFormat.
This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various type
Move Object format code to lib/BinaryFormat.
This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic.
Differential Revision: https://reviews.llvm.org/D33843
llvm-svn: 304864
show more ...
|
Revision tags: llvmorg-4.0.1-rc2 |
|
#
3979f438 |
| 30-Apr-2017 |
Simon Atanasyan <simon@atanasyan.com> |
[mips] Emit R_MICROMIPS_TLS_GOTTPREL relocation for %gottprel in case of microMIPS
In case of microMIPS mode %gottprel operator should emit microMIPS relocation R_MICROMIPS_TLS_GOTTPREL, not R_MIPS_
[mips] Emit R_MICROMIPS_TLS_GOTTPREL relocation for %gottprel in case of microMIPS
In case of microMIPS mode %gottprel operator should emit microMIPS relocation R_MICROMIPS_TLS_GOTTPREL, not R_MIPS_TLS_GOTTPREL.
Differential Revision: http://reviews.llvm.org/D32617
llvm-svn: 301763
show more ...
|
Revision tags: llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2 |
|
#
dde94e4c |
| 30-Jan-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 293565
|
#
ca74dd79 |
| 27-Jan-2017 |
Simon Dardis <simon.dardis@imgtec.com> |
[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
[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
llvm-svn: 293279
show more ...
|
#
5b67a4f7 |
| 26-Jan-2017 |
Simon Dardis <simon.dardis@imgtec.com> |
Revert "[mips] N64 static relocation model support"
This reverts commit r293164. There are multiple tests failing.
llvm-svn: 293170
|
#
09e65efd |
| 26-Jan-2017 |
Simon Dardis <simon.dardis@imgtec.com> |
[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 fo
[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
llvm-svn: 293164
show more ...
|
Revision tags: llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3 |
|
#
8fe36cd7 |
| 05-Dec-2016 |
Simon Dardis <simon.dardis@imgtec.com> |
[mips][ias] N32/N64 must not sort the relocation table.
Doing so changes the evaluation order for relocation composition.
Patch By: Daniel Sanders
Reviewers: vkalintiris, atanasyan
Differential R
[mips][ias] N32/N64 must not sort the relocation table.
Doing so changes the evaluation order for relocation composition.
Patch By: Daniel Sanders
Reviewers: vkalintiris, atanasyan
Differential Revision: https://reviews.llvm.org/D26401
llvm-svn: 288666
show more ...
|
Revision tags: llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3 |
|
#
eb9ed610 |
| 22-Aug-2016 |
Simon Atanasyan <simon@atanasyan.com> |
[mips][ias] Support .dtprel[d]word and .tprel[d]word directives
Assembler directives .dtprelword, .dtpreldword, .tprelword, and .tpreldword generates relocations R_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPR
[mips][ias] Support .dtprel[d]word and .tprel[d]word directives
Assembler directives .dtprelword, .dtpreldword, .tprelword, and .tpreldword generates relocations R_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL64, R_MIPS_TLS_TPREL32, and R_MIPS_TLS_TPREL64 respectively.
The main motivation for this patch is to be able to write test cases for checking correctness of the LLD linker's behaviour.
Differential Revision: https://reviews.llvm.org/D23669
llvm-svn: 279439
show more ...
|
Revision tags: llvmorg-3.9.0-rc2 |
|
#
b03fd12c |
| 17-Aug-2016 |
Justin Bogner <mail@justinbogner.com> |
Replace "fallthrough" comments with LLVM_FALLTHROUGH
This is a mechanical change of comments in switches like fallthrough, fall-through, or fall-thru to use the LLVM_FALLTHROUGH macro instead.
llvm
Replace "fallthrough" comments with LLVM_FALLTHROUGH
This is a mechanical change of comments in switches like fallthrough, fall-through, or fall-thru to use the LLVM_FALLTHROUGH macro instead.
llvm-svn: 278902
show more ...
|
#
3feeb9c8 |
| 08-Aug-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Re-commit r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Hopefully with the MSVC builds fixed. I've added a missing '#include <tuple>' that g
Re-commit r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Hopefully with the MSVC builds fixed. I've added a missing '#include <tuple>' that gcc and clang don't seem to need.
llvm-svn: 277995
show more ...
|
#
cae9aeed |
| 08-Aug-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
Revert r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
It seems that MSVC doesn't like std::tie().
llvm-svn: 277990
|
#
2ab623b5 |
| 08-Aug-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Summary: They are now lexed as a single token on targets where MCAsmInfo::HasMipsExpressions is true an
[mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.).
Summary: They are now lexed as a single token on targets where MCAsmInfo::HasMipsExpressions is true and then parsed in a similar way to the '~' operator as part of MCExpr::parseExpression.
As a result: * expressions and immediates no longer have different parsing rules. The difference is now solely down to whether evaluateAsAbsolute() succeeds. * %hi(%neg(%gp_rel(x))) are no longer parsed as a single operator and decomposed into the three MipsMCExpr nodes. They are parsed directly as three MipsMCExpr nodes. * parseMemOperand no longer needs to eat all the surrounding parenthesis to get at the outermost operator to make this work * %hi(%neg(%gp_rel(x))) and %lo(%neg(%gp_rel(x))) are no longer the only 3-in-1 relocs that parse for N64. They're still the only combinations that are permitted in relocatable expressions though. Fixing that should be a later patch. * We no longer need to list all the tokens that can occur as the first token of an expression or immediate.
test/MC/Mips/expr1.s: This change also prevents the incorrect lowering of %lo(2*4)+foo to %lo(8+foo) which is not an equivalent expression (the difference is whether foo is truncated to 16-bit or not) and the test has been updated to account for the macro expansion the correct expression requires.
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D23110
llvm-svn: 277988
show more ...
|
Revision tags: llvmorg-3.9.0-rc1 |
|
#
38784128 |
| 19-Jul-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] R_MIPS_GOT_(PAGE|OFST) do not need symbols
Reviewers: sdardis
Subscribers: dsanders, llvm-commits, sdardis
Differential Revision: https://reviews.llvm.org/D22458
llvm-svn: 275968
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
5f94cede |
| 19-May-2016 |
Zoran Jovanovic <zoran.jovanovic@imgtec.com> |
ps][microMIPS] Add R_MICROMIPS_PC21_S1 relocation
Differential Revision: http://reviews.llvm.org/D15526
llvm-svn: 270048
|
#
a2bde88e |
| 16-May-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] Fix R_MICROMIPS_GOT16 evaluation and eliminate symbol for R_MICROMIPS_(GOT|HI|LO)16
Summary: The failure r269410 worked around turned out to be caused by an incorrect evaluation of R_MIC
[mips][ias] Fix R_MICROMIPS_GOT16 evaluation and eliminate symbol for R_MICROMIPS_(GOT|HI|LO)16
Summary: The failure r269410 worked around turned out to be caused by an incorrect evaluation of R_MICROMIPS_GOT16 which then caused the GOT entries to be incorrect.
This patch fixes the evaluation and reverts r269410.
Reviewers: sdardis, vkalintiris, rafael
Subscribers: rafael, dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20242
llvm-svn: 269641
show more ...
|
#
e91e5267 |
| 13-May-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] Work around yet another incorrect microMIPS relocation evaluation exposed by r268900.
It's not entirely clear why R_MICROMIPS_(GOT|HI16|LO16) are evaluated incorrectly in a small number
[mips][ias] Work around yet another incorrect microMIPS relocation evaluation exposed by r268900.
It's not entirely clear why R_MICROMIPS_(GOT|HI16|LO16) are evaluated incorrectly in a small number of the LNT tests at this point. However, it's not related to the STO_MIPS_MICROMIPS issue.
At this point all the microMIPS-related changes of r268900 have been reverted.
llvm-svn: 269410
show more ...
|
#
5fb391c8 |
| 12-May-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] Work around incorrect another microMIPS relocation evaluation exposed by r268900
As explained in r269196, microMIPS has a special case that is not correctly implemented in LLVM. If we ha
[mips][ias] Work around incorrect another microMIPS relocation evaluation exposed by r268900
As explained in r269196, microMIPS has a special case that is not correctly implemented in LLVM. If we have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The in-place addend should therefore be 0x11.
This commit reverts a little more of the effect of r268900 by keeping the symbol when the STO_MIPS_MICROMIPS flag is set for R_MIPS_GPREL32 relocations. This fixes SingleSource/UnitTests/2003-08-11-VaListArg, and SingleSource/UnitTests/2003-05-07-VarArgs for microMIPS.
I believe there are additional relocations that have the same issue (e.g. R_MIPS_64, and R_MIPS_GPREL16) but for now I'm focusing on restoring our internal buildbots back to the green state we had in r268899.
llvm-svn: 269294
show more ...
|
#
55d38331 |
| 12-May-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] Handle N64 compound relocations and R_MIPS_SUB in needsRelocateWithSymbol()
Summary: This eliminates the default case for N64 that was left out of r269047.
The change to R_MIPS_SUB is n
[mips][ias] Handle N64 compound relocations and R_MIPS_SUB in needsRelocateWithSymbol()
Summary: This eliminates the default case for N64 that was left out of r269047.
The change to R_MIPS_SUB is needed in this patch to make this testable since %lo(%neg(%gp_rel(foo))) and %hi(%neg(%gp_rel(foo))) remain the only ways to get a compound relocation from the assembler.
Reviewers: sdardis, rafael
Subscribers: dsanders, llvm-commits, sdardis
Differential Revision: http://reviews.llvm.org/D20097
llvm-svn: 269280
show more ...
|
#
45533b40 |
| 11-May-2016 |
Daniel Sanders <daniel.sanders@imgtec.com> |
[mips][ias] Work around incorrect microMIPS relocation evaluation exposed by r268900
microMIPS has a special case that is not correctly implemented in LLVM. If we have a symbol 'foo' which is equiva
[mips][ias] Work around incorrect microMIPS relocation evaluation exposed by r268900
microMIPS has a special case that is not correctly implemented in LLVM. If we have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The in-place addend should therefore be 0x11.
Work around this by partially reverting the effect of r268900 by keeping the symbol when the STO_MIPS_MICROMIPS flag is set. This fixes SingleSource/Regression/C/PR640 for microMIPS.
llvm-svn: 269196
show more ...
|