diff options
author | Chih-Mao Chen <pkmx.tw@gmail.com> | 2019-04-09 14:46:47 +0300 |
---|---|---|
committer | Chih-Mao Chen <pkmx.tw@gmail.com> | 2019-04-09 14:46:47 +0300 |
commit | 23e23836d5d0dcb90b56eb8f479f67d29e60a5b6 (patch) | |
tree | 2250c6192741382c29fcb71118e7dea7c7678e65 /test | |
parent | 00100b5d0d1c9b09ceb376f44a439be35973880b (diff) |
Move tests in r357996 to correct location within monorepo
llvm-svn: 357997
Diffstat (limited to 'test')
-rw-r--r-- | test/ELF/riscv-branch.s | 32 | ||||
-rw-r--r-- | test/ELF/riscv-call.s | 32 | ||||
-rw-r--r-- | test/ELF/riscv-hi20-lo12.s | 40 | ||||
-rw-r--r-- | test/ELF/riscv-jal.s | 34 | ||||
-rw-r--r-- | test/ELF/riscv-pcrel-hilo.s | 41 |
5 files changed, 0 insertions, 179 deletions
diff --git a/test/ELF/riscv-branch.s b/test/ELF/riscv-branch.s deleted file mode 100644 index 247b6f3c2240..000000000000 --- a/test/ELF/riscv-branch.s +++ /dev/null @@ -1,32 +0,0 @@ -# REQUIRES: riscv - -# RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o -# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv64 -# RUN: llvm-objdump -d %t.rv32 | FileCheck %s -# RUN: llvm-objdump -d %t.rv64 | FileCheck %s -# CHECK: 63 02 00 00 beqz zero, 4 -# CHECK: e3 1e 00 fe bnez zero, -4 -# -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0xffe --defsym bar=_start+4-0x1000 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0xffe --defsym bar=_start+4-0x1000 -o %t.rv64.limits -# RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s -# RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s -# LIMITS: e3 0f 00 7e beqz zero, 4094 -# LIMITS-NEXT: 63 10 00 80 bnez zero, -4096 - -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+0x1000 --defsym bar=_start+4-0x1002 -o %t 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x1000 --defsym bar=_start+4-0x1002 -o %t 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s -# ERROR-RANGE: relocation R_RISCV_BRANCH out of range: 2048 is not in [-2048, 2047] -# ERROR-RANGE-NEXT: relocation R_RISCV_BRANCH out of range: -2049 is not in [-2048, 2047] - -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+1 --defsym bar=_start-1 -o %t 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+1 --defsym bar=_start-1 -o %t 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s -# ERROR-ALIGN: improper alignment for relocation R_RISCV_BRANCH: 0x1 is not aligned to 2 bytes - -.global _start -_start: - beq x0, x0, foo - bne x0, x0, bar diff --git a/test/ELF/riscv-call.s b/test/ELF/riscv-call.s deleted file mode 100644 index d5b9b370e807..000000000000 --- a/test/ELF/riscv-call.s +++ /dev/null @@ -1,32 +0,0 @@ -# REQUIRES: riscv - -# RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o -# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+8 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+8 --defsym bar=_start -o %t.rv64 -# RUN: llvm-objdump -d %t.rv32 | FileCheck %s -# RUN: llvm-objdump -d %t.rv64 | FileCheck %s -# CHECK: 97 00 00 00 auipc ra, 0 -# CHECK-NEXT: e7 80 80 00 jalr ra, ra, 8 -# CHECK: 97 00 00 00 auipc ra, 0 -# CHECK-NEXT: e7 80 80 ff jalr ra, ra, -8 - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+8-0x80000800 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+8-0x80000800 -o %t.rv64.limits -# RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s -# RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s -# LIMITS: 97 f0 ff 7f auipc ra, 524287 -# LIMITS-NEXT: e7 80 f0 7f jalr ra, ra, 2047 -# LIMITS-NEXT: 97 00 00 80 auipc ra, 524288 -# LIMITS-NEXT: e7 80 00 80 jalr ra, ra, -2048 - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+8-0x80000801 -o %t -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+8-0x80000801 -o %t 2>&1 | FileCheck --check-prefix=ERROR %s -# ERROR: relocation R_RISCV_CALL out of range: 524288 is not in [-524288, 524287] -# ERROR-NEXT: relocation R_RISCV_CALL out of range: -524289 is not in [-524288, 524287] - -.global _start -_start: - call foo - call bar diff --git a/test/ELF/riscv-hi20-lo12.s b/test/ELF/riscv-hi20-lo12.s deleted file mode 100644 index 24d2d65027d6..000000000000 --- a/test/ELF/riscv-hi20-lo12.s +++ /dev/null @@ -1,40 +0,0 @@ -# REQUIRES: riscv - -# RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o -# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o - -# RUN: ld.lld %t.rv32.o --defsym foo=0 --defsym bar=42 -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=0 --defsym bar=42 -o %t.rv64 -# RUN: llvm-objdump -d %t.rv32 | FileCheck %s -# RUN: llvm-objdump -d %t.rv64 | FileCheck %s -# CHECK: 37 05 00 00 lui a0, 0 -# CHECK-NEXT: 13 05 05 00 mv a0, a0 -# CHECK-NEXT: 23 20 a5 00 sw a0, 0(a0) -# CHECK-NEXT: b7 05 00 00 lui a1, 0 -# CHECK-NEXT: 93 85 a5 02 addi a1, a1, 42 -# CHECK-NEXT: 23 a5 b5 02 sw a1, 42(a1) - -# RUN: ld.lld %t.rv32.o --defsym foo=0x7ffff7ff --defsym bar=0x7ffff800 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=0x7ffff7ff --defsym bar=0xffffffff7ffff800 -o %t.rv64.limits -# RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s -# RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s -# LIMITS: 37 f5 ff 7f lui a0, 524287 -# LIMITS-NEXT: 13 05 f5 7f addi a0, a0, 2047 -# LIMITS-NEXT: a3 2f a5 7e sw a0, 2047(a0) -# LIMITS-NEXT: b7 05 00 80 lui a1, 524288 -# LIMITS-NEXT: 93 85 05 80 addi a1, a1, -2048 -# LIMITS-NEXT: 23 a0 b5 80 sw a1, -2048(a1) - -# RUN: not ld.lld %t.rv64.o --defsym foo=0x7ffff800 --defsym bar=0xffffffff7ffff7ff -o %t 2>&1 | FileCheck --check-prefix ERROR %s -# ERROR: relocation R_RISCV_HI20 out of range: 524288 is not in [-524288, 524287] -# ERROR-NEXT: relocation R_RISCV_HI20 out of range: -524289 is not in [-524288, 524287] - -.global _start - -_start: - lui a0, %hi(foo) - addi a0, a0, %lo(foo) - sw a0, %lo(foo)(a0) - lui a1, %hi(bar) - addi a1, a1, %lo(bar) - sw a1, %lo(bar)(a1) diff --git a/test/ELF/riscv-jal.s b/test/ELF/riscv-jal.s deleted file mode 100644 index 5979a5e1110f..000000000000 --- a/test/ELF/riscv-jal.s +++ /dev/null @@ -1,34 +0,0 @@ -# REQUIRES: riscv - -# RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o -# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv64 -# RUN: llvm-objdump -d %t.rv32 | FileCheck %s -# RUN: llvm-objdump -d %t.rv64 | FileCheck %s -# CHECK: 6f 00 40 00 j 4 -# CHECK: ef f0 df ff jal -4 - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0xffffe --defsym bar=_start+4-0x100000 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0xffffe --defsym bar=_start+4-0x100000 -o %t.rv64.limits -# RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s -# RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s -# LIMITS: 6f f0 ff 7f j 1048574 -# LIMITS-NEXT: ef 00 00 80 jal -1048576 - -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+0x100000 --defsym bar=_start+4-0x100002 -o %t 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x100000 --defsym bar=_start+4-0x100002 -o %t 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s -# ERROR-RANGE: relocation R_RISCV_JAL out of range: 524288 is not in [-524288, 524287] -# ERROR-RANGE-NEXT: relocation R_RISCV_JAL out of range: -524289 is not in [-524288, 524287] - -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+1 --defsym bar=_start+4+3 -o %t 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+1 --defsym bar=_start+4+3 -o %t 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s -# ERROR-ALIGN: improper alignment for relocation R_RISCV_JAL: 0x1 is not aligned to 2 bytes -# ERROR-ALIGN-NEXT: improper alignment for relocation R_RISCV_JAL: 0x3 is not aligned to 2 bytes - -.global _start - -_start: - jal x0, foo - jal x1, bar diff --git a/test/ELF/riscv-pcrel-hilo.s b/test/ELF/riscv-pcrel-hilo.s deleted file mode 100644 index 324e6ceadd14..000000000000 --- a/test/ELF/riscv-pcrel-hilo.s +++ /dev/null @@ -1,41 +0,0 @@ -# REQUIRES: riscv - -# RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o -# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv64 -# RUN: llvm-objdump -d %t.rv32 | FileCheck %s -# RUN: llvm-objdump -d %t.rv64 | FileCheck %s -# CHECK: 17 05 00 00 auipc a0, 0 -# CHECK-NEXT: 13 05 c5 00 addi a0, a0, 12 -# CHECK-NEXT: 23 26 05 00 sw zero, 12(a0) -# CHECK: 17 05 00 00 auipc a0, 0 -# CHECK-NEXT: 13 05 45 ff addi a0, a0, -12 -# CHECK-NEXT: 23 2a 05 fe sw zero, -12(a0) - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+12-0x80000800 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+12-0x80000800 -o %t.rv64.limits -# RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s -# RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s -# LIMITS: 17 f5 ff 7f auipc a0, 524287 -# LIMITS-NEXT: 13 05 f5 7f addi a0, a0, 2047 -# LIMITS-NEXT: a3 2f 05 7e sw zero, 2047(a0) -# LIMITS: 17 05 00 80 auipc a0, 524288 -# LIMITS-NEXT: 13 05 05 80 addi a0, a0, -2048 -# LIMITS-NEXT: 23 20 05 80 sw zero, -2048(a0) - -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+12-0x80000801 -o %t -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+12-0x80000801 -o %t 2>&1 | FileCheck --check-prefix=ERROR %s -# ERROR: relocation R_RISCV_PCREL_HI20 out of range: 524288 is not in [-524288, 524287] -# ERROR-NEXT: relocation R_RISCV_PCREL_HI20 out of range: -524289 is not in [-524288, 524287] - -.global _start -_start: - auipc a0, %pcrel_hi(foo) - addi a0, a0, %pcrel_lo(_start) - sw x0, %pcrel_lo(_start)(a0) -.L1: - auipc a0, %pcrel_hi(bar) - addi a0, a0, %pcrel_lo(.L1) - sw x0, %pcrel_lo(.L1)(a0) |