Re: RFC: New mechanism for hard reg operands to inline asm

2021-06-07 Thread Richard Sandiford via Gcc
Paul Koning via Gcc writes: >> On Jun 4, 2021, at 2:02 PM, Andreas Krebbel via Gcc wrote: >> >> Hi, >> >> I wonder if we could replace the register asm construct for >> inline assemblies with something a bit nicer and more obvious. >> E.g. turning this (real world example from IBM Z kernel code

Re: RFC: New mechanism for hard reg operands to inline asm

2021-06-04 Thread Andreas Krebbel via Gcc
On 6/4/21 8:18 PM, Paul Koning wrote: ... > Yes, I would think this should be made a general mechanism that any target > could use. > > I wonder if instead of creating a new mechanism you could do this simply by > creating new constraint names, where each name matches exactly one hard > registe

Re: RFC: New mechanism for hard reg operands to inline asm

2021-06-04 Thread Paul Koning via Gcc
> On Jun 4, 2021, at 2:02 PM, Andreas Krebbel via Gcc wrote: > > Hi, > > I wonder if we could replace the register asm construct for > inline assemblies with something a bit nicer and more obvious. > E.g. turning this (real world example from IBM Z kernel code): > > int diag8_response(int cm

RFC: New mechanism for hard reg operands to inline asm

2021-06-04 Thread Andreas Krebbel via Gcc
Hi, I wonder if we could replace the register asm construct for inline assemblies with something a bit nicer and more obvious. E.g. turning this (real world example from IBM Z kernel code): int diag8_response(int cmdlen, char *response, int *rlen) { register unsigned long reg2 asm ("2") =