Browse Source
2020-02-19 Nelson Chu <nelson.chu@sifive.com> gas/ * testsuite/gas/riscv/c-add-addi.d: New testcase. * testsuite/gas/riscv/c-add-addi.s: Likewise. opcodes/ * riscv-opc.c (riscv_opcodes): Convert add/addi to the compressed c.mv/c.li if rs1 is zero. Change-Id: Id939b5e6db80d267a832545f3ffef7b9ba881f7dbinutils-2_35-branch
5 changed files with 26 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
#as: |
|||
#objdump: -dr |
|||
|
|||
.*:[ ]+file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+000 <.text>: |
|||
[ ]+0:[ ]+4605[ ]+li[ ]+a2,1 |
|||
[ ]+2:[ ]+852e[ ]+mv[ ]+a0,a1 |
|||
@ -0,0 +1,3 @@ |
|||
.option rvc |
|||
addi a2, zero, 1 |
|||
add a0, zero, a1 |
|||
Loading…
Reference in new issue