This is the mail archive of the gcc@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: inline asm constraints for conditions


>>>>> Richard Henderson writes:

Richard> For PPC, you'd have to have a builtin type to get access PQImode or CCmode.
Richard> You'd then need a builtin function to get access to the bits you want to
Richard> use out of the condition (__builtin_cc_gtu(x), or maybe just
Richard> __builtin_ppc_compare(x, <4-bit-immediate>)).  The only bit of ugliness
Richard> here is that you might have to hack the generic compare-and-branch 
Richard> expansion code to make this work, much as we did for __builtin_expect.

Richard> I could see that it would be possible to make this work on PPC, since
Richard> there are 8 of these registers to allocate, three of which are even
Richard> call-saved.  "A mere matter of programming", as they say.

	An optimization opportunity for PowerPC is to treat the condition
register bitfields as bitfields.  Instead of interpreting the CR bits as
representing different comparison results, use the appropriate branch
instruction to test the bitfield bits of interest.

David


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