c3c
c3c copied to clipboard
Create inline asm support for RISC-V
I would like to add this capability. After reviewing the source for existing arches, I have a few questions:
-
What registers and/or pseudonyms for registers should be defined in clobbers enumeration? If I look at aarch64, for example, I see registers enumerated with values "r0" - "r31", yet those designations are for aarch32. I do see aarch64 registers defined in arrays below, beginning with $. Help me understand the rationale and the mapping that seems to be going on.
-
What instructions need to be defined in asm_target.c? All in the ISA, broken out between those that clobber registers and those that don't?
Aside from an asm header file with register dfns, and an init function in asm_target.c, plus a few places where I see unsupported traps for RISC-V...is there anything else that needs attn to get this done?