[Bug inline-asm/90181] Feature request: provide a way to explicitly select specific named registers in constraints

nfxjfg at googlemail dot com gcc-bugzilla@gcc.gnu.org
Mon Apr 22 20:02:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90181

--- Comment #6 from nfxjfg at googlemail dot com ---
Yes, it's clear that that the constraint can't be _just_ the register name,
since they'll clash with builtin constraints now or with future architectures
(which may add arbitrary register names). The proposed "*registername" is
pretty nice, though. Having this would be great.

I didn't find a RISC-V builtin for ecall (maybe I looked in the wrong place).
That wouldbn't be sufficient anyway. Another situation where I wanted to
specify many fixed register constraints was a piece of inline code that did
some syscalls without touching the stack (it needed all inputs as registers,
and in specific registers, and have some registers for free use by the asm code
itself).

Throwing macros at the problem does help to reduce the duplication, but I think
this proposed extension would solve this in a better way.


More information about the Gcc-bugs mailing list