11 #   define ALIGN_() asm(".align 4");
 
  15 @interface Super : TestRoot @end
 
  39 -(struct stret)stret_nop
 
  49 -(long double)lfpret_nop
 
  54 -(vector_ulong2)vecret_nop
 
  56     return (vector_ulong2){0x1234567890abcdefULL, 0xfedcba0987654321ULL};
 
  62 @interface Sub : Super @end
 
  64 @implementation Sub @end
 
  70     // cached message performance
 
  71     // catches failure to cache or (abi=2) failure to fixup (#5584187)
 
  72     // fixme unless they all fail
 
 104     // Some of these times have high variance on some compilers. 
 
 105     // The errors we're trying to catch should be catastrophically slow, 
 
 106     // so the margins here are generous to avoid false failures.
 
 108     // Use voidret because id return is too slow for perf test with ARC.
 
 110     // Pick smallest of voidret_nop and voidret_nop2 time
 
 111     // in the hopes that one of them didn't collide in the method cache.
 
 113     // ALIGN_ matches loop alignment to make -O0 work
 
 115 #define COUNT 1000000
 
 117     startTime = mach_absolute_time();
 
 119     for (int i = 0; i < COUNT; i++) {
 
 122     totalTime = mach_absolute_time() - startTime;
 
 123     testprintf("time: voidret  %llu\n", totalTime);
 
 124     targetTime = totalTime;
 
 126     startTime = mach_absolute_time();
 
 128     for (int i = 0; i < COUNT; i++) {
 
 131     totalTime = mach_absolute_time() - startTime;
 
 132     testprintf("time: voidret2  %llu\n", totalTime);
 
 133     if (totalTime < targetTime) targetTime = totalTime;
 
 135     startTime = mach_absolute_time();
 
 137     for (int i = 0; i < COUNT; i++) {
 
 140     totalTime = mach_absolute_time() - startTime;
 
 141     timecheck("llret ", totalTime, targetTime * 0.65, targetTime * 2.0);
 
 143     startTime = mach_absolute_time();
 
 145     for (int i = 0; i < COUNT; i++) {
 
 148     totalTime = mach_absolute_time() - startTime;
 
 149     timecheck("stret ", totalTime, targetTime * 0.65, targetTime * 5.0);
 
 151     startTime = mach_absolute_time();
 
 153     for (int i = 0; i < COUNT; i++) {        
 
 156     totalTime = mach_absolute_time() - startTime;
 
 157     timecheck("fpret ", totalTime, targetTime * 0.65, targetTime * 4.0);
 
 159     startTime = mach_absolute_time();
 
 161     for (int i = 0; i < COUNT; i++) {
 
 164     totalTime = mach_absolute_time() - startTime;
 
 165     timecheck("lfpret", totalTime, targetTime * 0.65, targetTime * 4.0);
 
 167     startTime = mach_absolute_time();
 
 169     for (int i = 0; i < COUNT; i++) {
 
 172     totalTime = mach_absolute_time() - startTime;
 
 173     timecheck("vecret", totalTime, targetTime * 0.65, targetTime * 4.0);