This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: register usage


Petar Bajic writes:
 > I want to forbid compiler to use condition register for destination in movz 
 > instruction
 > instruction (if r3 == 0, move r2 to r1) should look like this:
 > movz r1, r2, r3  (r3 condition, r2 source, r1 destination register)
 > but compiler generates this
 > movz r3, r2, r3
 > and uses r3 further on. Wich is techincally ok, but I have this problem with 
 > overwritting condition and would like to save it.
 > How do I tell compiler to generate different register for destination?

Put the condition code register in a different class from the other
registers.  

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]