1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/MC/Mips
Simon Atanasyan d52b14937d [mips] Reduce number of instructions used for loading a global symbol's value
Now `lw/sw $reg, sym+offset` pseudo instructions for global symbol `sym`
are lowering into the following three instructions.
```
lw     $reg, %got(symbol)($gp)
addiu  $reg, $reg, offset
lw/sw  $reg, 0($reg)
```

It's possible to reduce the number of instructions by taking the offset
in account in the final `lw/sw` command. This patch implements that
optimization.
```
lw     $reg, %got(symbol)($gp)
lw/sw  $reg, offset($reg)
```

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

llvm-svn: 369756
2019-08-23 13:36:24 +00:00
..
cnmips
crc [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
dsp
dspr2
eva
ginv [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
micromips [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
micromips32r6 [mips] Support sigrie instruction 2018-11-06 14:37:24 +00:00
micromips-dsp
micromips-dspr2
micromips-dspr3
mips1 [Mips] Add s.d instruction alias for Mips1 2019-06-12 17:52:05 +00:00
mips2 [mips] Add (dis)assembler tests for beqzl and bnezl instructions. NFC 2019-07-27 08:13:27 +00:00
mips3
mips4
mips5
mips16
mips32 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips32r2 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips32r3 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips32r5 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips32r6 [mips] Mark the lwupc instruction as MIPS64 R6 only 2019-06-19 22:08:06 +00:00
mips64 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips64r2 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips64r3 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips64r5 [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips64r6 [mips] Support sigrie instruction 2018-11-06 14:37:24 +00:00
msa [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mt [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
virt [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
addend.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
asciiz-directive-bad.s
asciiz-directive.s
bopt-directive.s
branch-pseudos-bad.s
branch-pseudos.s [mips] Print BEQZL and BNEZL pseudo instructions 2019-07-15 21:46:38 +00:00
cfi-advance-loc.s [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI 2019-05-15 12:05:27 +00:00
cfi-encoding.s [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI 2019-05-15 12:05:27 +00:00
cfi.s
cpload-bad.s
cpload.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
cplocal-bad.s [mips] Implement .cplocal directive 2019-07-17 08:11:31 +00:00
cplocal.s [mips] Implement .cplocal directive 2019-07-17 08:11:31 +00:00
cprestore-bad.s
cprestore-noreorder-noat.s [mips] Fix test typo in rL348914 2018-12-15 08:44:47 +00:00
cprestore-noreorder.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
cprestore-reorder.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
cprestore-warning-unused.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
cpsetup-bad.s
cpsetup.s [llvm-objdump] - Implement -z/--disassemble-zeroes. 2019-01-10 14:55:26 +00:00
directive-ent.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
do_switch1.s
do_switch2.s
do_switch3.s
double-expand.s
eh-frame.s [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI 2019-05-15 12:05:27 +00:00
elf_basic.s
elf_eflags_abicalls.s
elf_eflags_micromips2.s
elf_eflags_micromips.s
elf_eflags_mips16.s
elf_eflags_nan2008.s
elf_eflags_nanlegacy.s
elf_eflags_noreorder.s
elf_eflags_pic0.s
elf_eflags_pic2.s
elf_eflags.s
elf_header.s
elf_reginfo.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf_st_other.s [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
elf-bigendian.ll [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-debug-section.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-gprel-32-64.s
elf-N32.s
elf-N64.s
elf-relsym.s Revert "Reland [ELF] Loose a condition for relocation with a symbol" 2019-07-22 17:48:53 +00:00
elf-tls.s
end-directive.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
expansion-j-sym-pic.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
expansion-jal-sym-pic.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
expr1.s
got-rel-expr.s
hex-immediates.s
higher-highest-addressing.s
hilo-addressing.s
init-order-bug.ll
insn-directive.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
instalias-imm-expanding.s
instr-analysis.s
invalid-instructions-spellcheck.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
j-macro-insn.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
llvm-mc-fixup-endianness.s
macro-abs.s
macro-aliases-invalid-wrong-error.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
macro-aliases.s
macro-bcc-imm-bad.s
macro-bcc-imm.s [mips] Print BEQZL and BNEZL pseudo instructions 2019-07-15 21:46:38 +00:00
macro-ddiv-bad.s
macro-ddiv.s
macro-ddivu-bad.s
macro-ddivu.s
macro-div-bad.s
macro-div.s
macro-divu-bad.s
macro-divu.s
macro-dla-32bit.s
macro-dla-bad.s
macro-dla-pic.s
macro-dla.s
macro-dli.s
macro-drem.s
macro-dremu.s
macro-la-bad.s
macro-la-pic.s [mips] Do not include offset into %got expression for global symbols 2019-08-23 13:36:14 +00:00
macro-la.s
macro-ld-sd.s [mips] Map SW instruction to its microMIPS R6 variant 2019-03-13 13:09:30 +00:00
macro-li-bad.s
macro-li.d.s
macro-li.s
macro-li.s.s
macro-rem.s
macro-remu.s
macro-seq.s
macro-sge64.s [mips] Implement sge/sgeu pseudo instructions 2019-07-09 12:55:55 +00:00
macro-sge.s [mips] Implement sge/sgeu pseudo instructions 2019-07-09 12:55:55 +00:00
macro-sgt64.s [mips] Implement sgt/sgtu pseudo instructions with immediate operand 2019-07-09 12:55:42 +00:00
macro-sgt.s [mips] Implement sgt/sgtu pseudo instructions with immediate operand 2019-07-09 12:55:42 +00:00
memory-offsets.s
micromips32r6-eva.s
micromips64-unsupported.s
micromips64r6-unsupported.s
micromips-16-bit-instructions.s
micromips-alias.s [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
micromips-alu-instructions.s
micromips-ase-directive.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
micromips-bad-branches.s
micromips-branch-fixup.s [mips][micrompis] Emit 16bit NOPs by default 2019-01-09 15:58:02 +00:00
micromips-branch-instructions.s [mips][micrompis] Emit 16bit NOPs by default 2019-01-09 15:58:02 +00:00
micromips-control-instructions.s
micromips-diagnostic-fixup.s
micromips-el-fixup-data.s [mips][micrompis] Emit 16bit NOPs by default 2019-01-09 15:58:02 +00:00
micromips-eva.s
micromips-expansions.s
micromips-fpu64-instructions.s
micromips-fpu-instructions.s
micromips-func-addr.s
micromips-invalid.s
micromips-jump26.s
micromips-jump-instructions.s [mips][micrompis] Emit 16bit NOPs by default 2019-01-09 15:58:02 +00:00
micromips-label-test-sections.s [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
micromips-label-test.s [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
micromips-loadstore-instructions.s
micromips-loadstore-unaligned.s
micromips-movcond-instructions.s
micromips-multiply-instructions.s
micromips-neg-offset.s
micromips-pc16-fixup.s
micromips-relocations.s
micromips-shift-instructions.s
micromips-tailr.s [mips][micrompis] Emit 16bit NOPs by default 2019-01-09 15:58:02 +00:00
micromips-trap-instructions.s
mips64-alu-instructions.s
mips64-expansions.s [mips] Reduce number of instructions used for loading a global symbol's value 2019-08-23 13:36:24 +00:00
mips64-instalias-imm-expanding.s
mips64-instructions.s
mips64-register-names-n32-n64.s
mips64-register-names-o32.s
mips64eb-fixups.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips64extins.s
mips64shift.ll
mips_abi_flags_xx_set.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips_abi_flags_xx.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips_directives_bad.s
mips_directives.s
mips_gprel16.s
mips-abi-bad.s
mips-alu-instructions.s
mips-bad-branches.s
mips-control-instructions.s
mips-cop0-reginfo.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-coprocessor-encodings.s
mips-data-directives.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-diagnostic-fixup.s
mips-expansions-bad.s
mips-expansions.s [mips] Reduce number of instructions used for loading a global symbol's value 2019-08-23 13:36:24 +00:00
mips-fpu-instructions.s
mips-hwr-register-names.s
mips-jump-delay-slots.s [mips] Print BEQZL and BNEZL pseudo instructions 2019-07-15 21:46:38 +00:00
mips-jump-instructions.s
mips-memory-instructions.s
mips-noat.s
mips-pc16-fixup.s
mips-pdr-bad.s
mips-pdr.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-rdata.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-reginfo-fp32.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-reginfo-fp64.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-register-names-invalid.s
mips-register-names-o32.s
module-directive-bad.s
module-hardfloat.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
module-softfloat.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mul-macro-variants.s
multi-64bit-func.ll
nabi-regs.s
nacl-mask.s [llvm-objdump] - Implement -z/--disassemble-zeroes. 2019-01-10 14:55:26 +00:00
nooddspreg-cmdarg.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
nooddspreg-error.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
nooddspreg.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
octeon-instructions.s
oddspreg.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
pr11877.s
ptr-size.s
r-mips-got-disp.s
reloc-directive-bad-obj.s [MC] Support labels as offsets in .reloc directive 2018-11-21 16:28:39 +00:00
reloc-directive-bad.s [MC] Support labels as offsets in .reloc directive 2018-11-21 16:28:39 +00:00
reloc-directive-label-offset.s Reland test/MC/Mips/reloc-directive-label-offset.s 2018-11-22 18:18:58 +00:00
reloc-directive.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
relocation-n64.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
relocation-xfail.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
relocation.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
rotations32-bad.s
rotations32.s
rotations64.s
section-size.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
set-arch.s
set-at-directive-explicit-at.s
set-at-directive.s
set-at-noat-bad-syntax.s
set-defined-symbol.s
set-mips0-directive.s
set-mips16-directive.s
set-mips-directives-bad.s
set-mips-directives.s
set-nodsp.s
set-nomacro-micromips.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
set-nomacro.s
set-oddspreg-nooddspreg-error.s
set-oddspreg-nooddspreg.s
set-push-pop-directives-bad.s
set-push-pop-directives.s
set-softfloat-hardfloat-bad.s
set-softfloat-hardfloat.s
set-sym-recursive.s [mips] Fix crash on recursive using of .set 2019-03-19 15:15:35 +00:00
sext_64_32.ll
sort-relocation-table.s
sym-expr.s
sym-offset.ll [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
sym-sc.s [Mips] Instruction sc now accepts symbol as an argument 2019-08-07 12:21:26 +00:00
target-soft-float.s
tls-symbols.s [llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests 2019-04-27 16:12:14 +00:00
unaligned-nops.s
unsupported-relocation.s [mips] Show an error on attempt to use 64-bit PC-relative relocation 2018-12-29 10:10:02 +00:00
update-module-level-options.s [mips] Use llvm-mc -triple option instead of combination of arch,target-abi,mcpu. NFC 2018-12-12 07:03:04 +00:00
user-macro-argument-separation.s
xgot.s Revert "Reland [ELF] Loose a condition for relocation with a symbol" 2019-07-22 17:48:53 +00:00