This is the mail archive of the 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: [PATCH] Add -meb to two Octeon tests

Adam Nemet <> writes:
> Richard Sandiford writes:
>> Adam Nemet <> writes:
>> > There are two tests that fail when compiled for little-endian.
>> >
>> > octeon-exts-2.c is more obvious.  In this structure:
>> >
>> > struct bar 
>> > { 
>> >   unsigned long long a:1; 
>> >   long long b:14; 
>> >   unsigned long long c:48; 
>> >   long long d:1; 
>> > }; 
>> >
>> > when d is extracted, it is the bottom bit in big-endian but the top bit in
>> > little-endian.  If d is the top bit then signed extraction can be achieved
>> > equally well with a arithmetic right shift.
>> Since we're still supposed to be able to use this instruction for
>> _some_ code on little endian targets, I'd prefer that we either:
>>   (a) apply your patch but create an -mel-friendly version too.
>>   (b) reverse the order of the fields when _MIPSEL is defined.
>> The first is better really.  (I know it must seem daft having
>> -mel Octeon tests, but it isn't a rejected combination.)
> Since one of the cases in this test is meant to verify extraction of the
> bottom bit I went with (b) here.  (Also note that there are other exts tests
> already that are -mel-friendly.)

I'm not sure from your reply whether this was clear or not, so just to
be on the safe side: the idea with (a) was to copy the test to a new
file and replace the structure definition with the _MIPSEL version.
The old test would then require -meb and the new one would require -mel.
The idea is that someone testing without endianness options (which is
the usual case on IRIX and GNU/Linux) would still end up running both
the -meb and -mel tests.

> 	* Make it work with -mel.
> 	* Compile with -meb.  Add
> 	comment why this is necessary.

OK, thanks, but:

> +  middle-end should be able to simplify this futher.  */



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