diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-11-03 10:03:03 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-11-03 10:03:03 +0100 |
commit | 0afb0215bdcdccba701eaa35e10f4923888e5ad1 (patch) | |
tree | 354486007a0728a327ab11af5f30682be1c5d288 /gas | |
parent | 3aacf044eb976946bd985e0c5f2d638df40548af (diff) | |
download | gdb-0afb0215bdcdccba701eaa35e10f4923888e5ad1.zip gdb-0afb0215bdcdccba701eaa35e10f4923888e5ad1.tar.gz gdb-0afb0215bdcdccba701eaa35e10f4923888e5ad1.tar.bz2 |
RISC-V: Lx/Sx macro insn tests
Make sure these (continue to) work as intended.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/riscv/l-s-macro.d | 56 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/l-s-macro.s | 14 |
2 files changed, 70 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/l-s-macro.d b/gas/testsuite/gas/riscv/l-s-macro.d new file mode 100644 index 0000000..d6e5993 --- /dev/null +++ b/gas/testsuite/gas/riscv/l-s-macro.d @@ -0,0 +1,56 @@ +#as: -march=rv64i +#name: Lx/Sx macro insns +#objdump: -dwr + +.*:[ ]+file format .* + + +Disassembly of section .text: + +0+ <L>: +[ ]+[0-9a-f]+:[ ]+00000517[ ]+auipc[ ]+a0,0x0[ ]+[0-9a-f]+:[ ]+R_RISCV_PCREL_HI20[ ]+bval +[ ]+[0-9a-f]+:[ ]+R_RISCV_RELAX.* +[ ]+[0-9a-f]+:[ ]+00050503[ ]+lb[ ]+a0,0\(a0\) # [0-9a-f]+( <.*>)?[ ]+[0-9a-f]+:[ ]+R_RISCV_PCREL_LO12_I[ ]+.* +[ ]+[0-9a-f]+:[ ]+R_RISCV_RELAX.* +[ ]+[0-9a-f]+:[ ]+00000517[ ]+auipc[ ]+a0,0x0[ ]+[0-9a-f]+:[ ]+R_RISCV_PCREL_HI20[ ]+bval +[ ]+[0-9a-f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]+[0-9a-f]+:[ ]+R_RISCV_PCREL_HI20[ ]+wval +[ ]+[0-9a-f]+:[ ]+R_RISCV_RELAX.* +[ ]+[0-9a-f]+:[ ]+00a2a023[ ]+sw[ ]+a0,0\(t0\) # [0-9a-f]+( <.*>)?[ ]+[0-9a-f]+:[ ]+R_RISCV_PCREL_LO12_S[ ]+.* +[ ]+[0-9a-f]+:[ ]+R_RISCV_RELAX.* +[ ]+[0-9a-f]+:[ ]+00000297[ ]+auipc[ ]+t0,0x0[ ]+[0-9a-f]+:[ ]+R_RISCV_PCREL_HI20[ ]+dval +[ ]+[0-9a-f]+:[ ]+R_RISCV_RELAX.* +[ ]+[0-9a-f]+:[ ]+00a2b023[ ]+sd[ ]+a0,0\(t0\) # [0-9a-f]+( <.*>)?[ ]+[0-9a-f]+:[ ]+R_RISCV_PCREL_LO12_S[ ]+.* +[ ]+[0-9a-f]+:[ ]+R_RISCV_RELAX.* diff --git a/gas/testsuite/gas/riscv/l-s-macro.s b/gas/testsuite/gas/riscv/l-s-macro.s new file mode 100644 index 0000000..316adc4 --- /dev/null +++ b/gas/testsuite/gas/riscv/l-s-macro.s @@ -0,0 +1,14 @@ +L: + lb a0, bval + lbu a0, bval + lh a0, hval + lhu a0, hval + lw a0, wval + lwu a0, wval + ld a0, dval + +S: + sb a0, bval, t0 + sh a0, hval, t0 + sw a0, wval, t0 + sd a0, dval, t0 |