diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-riscv-elf/uleb128.d | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-riscv-elf/uleb128.s | 18 |
3 files changed, 37 insertions, 0 deletions
diff --git a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp index 9e103b2..947a266 100644 --- a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp +++ b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp @@ -172,6 +172,7 @@ if [istarget "riscv*-*-*"] { run_dump_test "attr-merge-priv-spec-failed-06" run_dump_test "attr-phdr" run_dump_test "relax-max-align-gp" + run_dump_test "uleb128" run_ld_link_tests [list \ [list "Weak reference 32" "-T weakref.ld -m[riscv_choose_ilp32_emul]" "" \ "-march=rv32i -mabi=ilp32" {weakref32.s} \ diff --git a/ld/testsuite/ld-riscv-elf/uleb128.d b/ld/testsuite/ld-riscv-elf/uleb128.d new file mode 100644 index 0000000..a921478 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/uleb128.d @@ -0,0 +1,18 @@ +#source: uleb128.s +#as: -march=rv32ic +#ld: -melf32lriscv +#objdump: -d + +.*:[ ]+file format .* + +Disassembly of section .text: + +.* <_start>: +.*jal.*<bar> +.*jal.*<bar> +.*jal.*<bar> +.*jal.*<bar> +.*jal.*<bar> +.*jal.*<bar> +.*:[ ]+0e0c.* +#pass diff --git a/ld/testsuite/ld-riscv-elf/uleb128.s b/ld/testsuite/ld-riscv-elf/uleb128.s new file mode 100644 index 0000000..f7d23be --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/uleb128.s @@ -0,0 +1,18 @@ +.text +.globl bar +.globl _start +.option rvc +.align 2 +_start: +.L0: + .rept 6 + call bar + .endr +.align 2 +.L1: + .uleb128 .L1 - .L0 + .uleb128 .L2 - .L0 +.L2: +.align 2 +bar: + nop |