llvm-project/llvm/test
Simon Atanasyan 58492b1895 [mips] Do not include offset into `%got` expression for global symbols
Now pseudo instruction `la $6, symbol+8($6)` is expanding into the following
chain of commands:
```
lw    $1, %got(symbol+8)($gp)
addiu $1, $1, 8
addu  $6, $1, $6
```

This is incorrect. When a linker handles the `R_MIPS_GOT16` relocation,
it does not expect to get any addend and breaks on assertion. Otherwise
it has to create new GOT entry for each unique "sym + offset" pair.
Offset for a global symbol should be added to result of loading GOT
entry by a separate `add` command.

The patch fixes the problem by stripping off an offset from the expression
passed to the `%got`. That's interesting that even current code inserts
a separate `add` command.

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

llvm-svn: 369755
2019-08-23 13:36:14 +00:00
..
Analysis [X86] Lower the cost of v2i32->v2f64 sint_to_fp under vector widening legalization. 2019-08-22 08:18:45 +00:00
Assembler [DataLayout] Check StackNatural and FunctionPtr alignments. 2019-08-07 17:20:55 +00:00
Bindings Revert "Expose TailCallKind via the LLVM C API" 2019-08-15 03:49:51 +00:00
Bitcode [BitcodeReader] Check if we can create a null constant for type. 2019-08-21 18:20:11 +00:00
BugPoint
CodeGen [PowerPC] Automatically generate various tests. NFC 2019-08-23 13:30:45 +00:00
DebugInfo [MBP] Disable aggressive loop rotate in plain mode 2019-08-22 16:21:32 +00:00
Demangle
Examples
ExecutionEngine [ORC] Refactor definition-generation, add a generator for static libraries. 2019-08-13 16:05:18 +00:00
Feature IR: print value numbers for unnamed function arguments 2019-08-03 14:28:34 +00:00
FileCheck [FileCheck] Move -dump-input diagnostic to first line 2019-08-14 02:56:09 +00:00
Instrumentation hwasan: Untag unwound stack frames by wrapping personality functions. 2019-08-23 01:28:44 +00:00
Integer
JitListener
LTO [MC] Don't emit .symver redirected symbols to the symbol table 2019-08-19 06:17:30 +00:00
Linker IR: print value numbers for unnamed function arguments 2019-08-03 14:28:34 +00:00
MC [mips] Do not include offset into `%got` expression for global symbols 2019-08-23 13:36:14 +00:00
MachineVerifier [GlobalISel]: Fix lowering of G_SHUFFLE_VECTOR with scalar sources 2019-08-13 21:49:11 +00:00
Object [llvm-objdump] - Cleanup the error reporting. 2019-08-21 11:07:31 +00:00
ObjectYAML [yaml2obj/obj2yaml][MachO] Fix a test failure in big endian hosts 2019-08-20 09:58:31 +00:00
Other [SlotIndexes] Add print-slotindexes to disable printing slotindexes 2019-08-22 13:44:47 +00:00
Reduce [Bugpoint redesign] Added Pass to Remove Global Variables 2019-08-15 22:54:09 +00:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [TableGen] Include ValueTypes.td directly into the intrinsic-varargs.td test. 2019-08-21 19:14:38 +00:00
ThinLTO/X86 [NewPM][PassInstrumentation] Fix test added in r369024. 2019-08-15 23:24:14 +00:00
Transforms [IndVars] Fix a bug noticed by inspection 2019-08-23 04:03:23 +00:00
Unit
Verifier IR: Disable verifier check for GlobalValues with private linkage named after a comdat for non-COFF. 2019-08-06 21:47:18 +00:00
YAMLParser
tools [X86][BtVer2] Add a read-advance to every implicit register use of CMPXCHG8B/16B. 2019-08-23 12:19:45 +00:00
.clang-format
CMakeLists.txt Added Delta IR Reduction Tool 2019-08-08 22:16:33 +00:00
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in