mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
LoongArch: Add gas testsuit for alias instructions
Test the alias instructions.
This commit is contained in:
19
gas/testsuite/gas/loongarch/insn_alias_32.d
Normal file
19
gas/testsuite/gas/loongarch/insn_alias_32.d
Normal file
@@ -0,0 +1,19 @@
|
||||
#as:
|
||||
#objdump: -d -M no-aliases
|
||||
#skip: loongarch64-*-*
|
||||
|
||||
.* file format .*
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
0+ <L1>:
|
||||
0: 001500a4 or \$a0, \$a1, \$zero
|
||||
4: 02bffc04 addi.w \$a0, \$zero, -1
|
||||
8: 03400000 andi \$zero, \$zero, 0x0
|
||||
c: 03800404 ori \$a0, \$zero, 0x1
|
||||
10: 4c000020 jirl \$zero, \$ra, 0
|
||||
14: 4c000020 jirl \$zero, \$ra, 0
|
||||
18: 60000080 blt \$a0, \$zero, 0 # 18 <L1\+0x18>
|
||||
1c: 64000080 bge \$a0, \$zero, 0 # 1c <L1\+0x1c>
|
||||
20: 64000004 bge \$zero, \$a0, 0 # 20 <L1\+0x20>
|
||||
10
gas/testsuite/gas/loongarch/insn_alias_32.s
Normal file
10
gas/testsuite/gas/loongarch/insn_alias_32.s
Normal file
@@ -0,0 +1,10 @@
|
||||
L1:
|
||||
move $a0,$a1
|
||||
li.w $a0,-1
|
||||
nop
|
||||
li.w $a0,1
|
||||
ret
|
||||
jr $ra
|
||||
bltz $a0,.L1
|
||||
bgez $a0,.L1
|
||||
blez $a0,.L1
|
||||
20
gas/testsuite/gas/loongarch/insn_alias_64.d
Normal file
20
gas/testsuite/gas/loongarch/insn_alias_64.d
Normal file
@@ -0,0 +1,20 @@
|
||||
#as-new:
|
||||
#objdump: -d -M no-aliases
|
||||
#skip: loongarch32-*-*
|
||||
|
||||
.*: file format .*
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
0+ <L1>:
|
||||
0: 001500a4 or \$a0, \$a1, \$zero
|
||||
4: 02bffc04 addi.w \$a0, \$zero, -1
|
||||
8: 02bffc04 addi.w \$a0, \$zero, -1
|
||||
c: 03400000 andi \$zero, \$zero, 0x0
|
||||
10: 03800404 ori \$a0, \$zero, 0x1
|
||||
14: 4c000020 jirl \$zero, \$ra, 0
|
||||
18: 4c000020 jirl \$zero, \$ra, 0
|
||||
1c: 60000080 blt \$a0, \$zero, 0 # 1c <L1\+0x1c>
|
||||
20: 64000080 bge \$a0, \$zero, 0 # 20 <L1\+0x20>
|
||||
24: 64000004 bge \$zero, \$a0, 0 # 24 <L1\+0x24>
|
||||
11
gas/testsuite/gas/loongarch/insn_alias_64.s
Normal file
11
gas/testsuite/gas/loongarch/insn_alias_64.s
Normal file
@@ -0,0 +1,11 @@
|
||||
L1:
|
||||
move $a0,$a1
|
||||
li.w $a0,-1
|
||||
li.d $a0,-1
|
||||
nop
|
||||
li.w $a0,1
|
||||
ret
|
||||
jr $ra
|
||||
bltz $a0,.L1
|
||||
bgez $a0,.L1
|
||||
blez $a0,.L1
|
||||
Reference in New Issue
Block a user