tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] asm syntax of riscv64-asm.c


From: noneofyourbusiness
Subject: Re: [Tinycc-devel] asm syntax of riscv64-asm.c
Date: Sat, 17 Aug 2024 18:49:50 +0200

Ekaitz Zarraga <ekaitz@elenq.tech> wrote:
> ```
> ld rd, rs, offset
> ```
> 
> It even had the input registers inverted in the store instruction. I 
> converted it to:

I don't see what is wrong with this,
 ld rd, rs, offset
closely follows the layout of the encoding:
 I-Type:
  imm[11:0] | rs1 | funct3 | rd | opcode
yes, it's antisymmetric, but I think the other way around (offset, rs, rd ld) 
is even more inconvenient.

> 
> ```
> ld rd, offset(rs)
> ```
> 
> As it should be.

I'd simply consider this a pseudoinstruction.

> all the structure of the assembler is designed for the old (and 
> non-standard) syntax. It needs more work.

Can you point me to the standard on RISC-V assembly syntax?
I could find ratified specs for instructions, not asm syntax.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]