Re: Inline assembly and clobbered registers

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

 



ludo@xxxxxxx (Ludovic CourtÃs) writes:

> Yes, thatâs why Iâm asking for ideas to work around this.  :-)

Ah, yes, trying to catch up now.

> Namely, clobbering a specific register doesnât sound wise here since
> this asm snippet will be part of the bytecode interpreter, where GCCâs
> register allocator can supposedly do a better job if I donât make its
> life harder by clobbering an arbitrarily-chosen register.

I would do this anyhow.  Assuming your target has several general
purpose registers, then the register allocator will work around the loss
of one of them across an asm statement.  How about something like

   int result asm ("r1");

and then mark the asm as clobbering r1.

Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux