-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Open
Labels
Description
| Bugzilla Link | 3206 |
| Version | unspecified |
| OS | MacOS X |
| CC | @ohmantics,@asl |
Extended Description
On i386-apple-darwin, built with "llvmc -O3 -S select_reduced.c" with or without -clang. At the end of each case should be a select/cmov.
inline attribute((always_inline))
unsigned short _OSSwapInt16(unsigned short _data)
{
return ((_data << 8) | (_data >> 8));
}
inline attribute((always_inline))
unsigned short ReadSwapShort(unsigned char* data, unsigned int offset)
{
return _OSSwapInt16((unsigned short) &data[offset]);
}
unsigned short* myfunc(unsigned short* endCodes, unsigned short probe, unsigned short entrySelector, unsigned short c)
{
#define PROBE_SHIFT
{
probe >>= 1;
if (c > _OSSwapInt16(endCodes[probe >> 1]))
endCodes = &endCodes[probe >> 1];
}
switch (entrySelector)
{
case 15: PROBE_SHIFT; // FALL-THRU
case 14: PROBE_SHIFT; // FALL-THRU
case 13: PROBE_SHIFT; // FALL-THRU
case 12: PROBE_SHIFT; // FALL-THRU
case 11: PROBE_SHIFT; // FALL-THRU
case 10: PROBE_SHIFT; // FALL-THRU
case 9: PROBE_SHIFT; // FALL-THRU
case 8: PROBE_SHIFT; // FALL-THRU
case 7: PROBE_SHIFT; // FALL-THRU
case 6: PROBE_SHIFT; // FALL-THRU
case 5: PROBE_SHIFT; // FALL-THRU
case 4: PROBE_SHIFT; // FALL-THRU
}
return endCodes;
}