Re: register allocation in gcc

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

 



On 18/10/11 08:06, vikramsp wrote:

In my .md file there is an insn
(define_insn abssf2
       ....
       ....
      (clobber (match_scratch 2 ""))

the %2 register is allocated as r0 in the real code.
My problem is that i want other than r0 to be allocated
for operand 2.
Please help how to do that.

In the "" after the 2 comes the constraint list. Constrain the register to be somewhere that doesn't include r0.

So, for example, define a constraint x that corresponds to a register class that doesn't contain r0 and then do:
(define_insn abssf2
       ....
       ....
      (clobber (match_scratch 2 "x"))

--
PMatos



[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