Re: Reg: Restricting optimization and CR register usage

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

 




"Segher Boessenkool" <segher@xxxxxxxxxxxxxxxxxxx> writes:

> Maybe you can force GCC to avoid CR4 by using -ffixed-reg=cr4 .

The option would be -ffixed-cr4.  Another possibility here might be
-fcall-used-cr4, assuming that the system call looks like a function
call rather than, say, an inline asm.

Ian

</force GCC to avoid CR4 by using -ffixed-reg>

-ffixed-cr4 option works, cr4 is no more used but replaced by cr3. 
I am still concerned if we face the same issue with cr3 as with cr4. So I am
thinking of specifying 
-ffixed-cr2 -ffixed-cr3 -ffixed-cr4, since cr2, cr3 and cr4 are assumed
non-volatile by GCC.

Also, I have come across this macro CONDITIONAL_REGISTER_USAGE which modify
fixed_regs and call_used_regs to 1 for each of the registers in the classes
which should not be used by GCC. 
(http://gcc.gnu.org/onlinedocs/gccint/Register-Basics.html#Register-Basics
). But I do not have idea as how to and where to have this macro. Could any
of you please help me out?

- Praveen.
-- 
View this message in context: http://old.nabble.com/Reg%3A-Restricting-optimization-and-CR-register-usage-tp29933073p29950894.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[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