4 ms·
> riscv64-linux-gnu-objdump (though it produces incorrect output for instructions like addi and slli The assembler accepts either syntax: user@starfive:~$
by brucehoult 3y ago
> riscv64-linux-gnu-objdump (though it produces incorrect output for instructions like addi and slli
The assembler accepts either syntax:
user@starfive:~$ echo add a0,a0,13 \; addi a1,a1,420 | as
user@starfive:~$ objdump -d a.out
a.out: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <.text>:
0: 00d50513 add a0,a0,13
4: 1a458593 add a1,a1,420
Also, objdump will print them as `addi` if you give the `-Mno-aliases` option.
- kragen 3y agoyeah, i know it accepts it, but that doesn't make it right ;) thanks for the tip about no-aliases! i had no idea. i don't suppose there's an option to allow me to write arm-ual-style `add a1, a0` instead of `c.add a1, a0` or `add a1, a1, a0`, is there? because in the first case i can't assemble it without rvc, and the second case is annoying i guess i should write my own assembler instead of whining