> On Jun 24, 2024, at 1:50 AM, Stefan Schulze Frielinghaus 
> <stefa...@linux.ibm.com> wrote:
> 
> Ping.
> 
> On Mon, Jun 10, 2024 at 07:19:19AM +0200, Stefan Schulze Frielinghaus wrote:
>> Ping.
>> 
>> On Fri, May 24, 2024 at 11:13:12AM +0200, Stefan Schulze Frielinghaus wrote:
>>> This implements hard register constraints for inline asm.  A hard register
>>> constraint is of the form {regname} where regname is any valid register.  
>>> This
>>> basically renders register asm superfluous.  For example, the snippet
>>> 
>>> int test (int x, int y)
>>> {
>>>  register int r4 asm ("r4") = x;
>>>  register int r5 asm ("r5") = y;
>>>  unsigned int copy = y;
>>>  asm ("foo %0,%1,%2" : "+d" (r4) : "d" (r5), "d" (copy));
>>>  return r4;
>>> }
>>> 
>>> could be rewritten into
>>> 
>>> int test (int x, int y)
>>> {
>>>  asm ("foo %0,%1,%2" : "+{r4}" (x) : "{r5}" (y), "d" (y));
>>>  return x;
>>> }

I like this idea but I'm wondering: regular constraints specify what sort of 
value is needed, for example an int vs. a short int vs. a float.  The notation 
you've shown doesn't seem to have that aspect.

The other comment is that I didn't see documentation updates to reflect this 
new feature.

        paul

Reply via email to