100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
: (long double)d16
{
return (d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10 + d11 +
d12 + d13 + d14 + d15 + d16) / 16;
}
#ifdef __SIZEOF_INT128__
- (__int128)invocationTestMethod5: (__int128)i1
: (__int128)i2
: (int)i3 /* to check alignment */
: (__int128)i4
: (__int128)i5
: (__int128)i6
: (__int128)i7
|
>
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
: (long double)d16
{
return (d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10 + d11 +
d12 + d13 + d14 + d15 + d16) / 16;
}
#ifdef __SIZEOF_INT128__
__extension__
- (__int128)invocationTestMethod5: (__int128)i1
: (__int128)i2
: (int)i3 /* to check alignment */
: (__int128)i4
: (__int128)i5
: (__int128)i6
: (__int128)i7
|
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
[invocation setArgument: &self
atIndex: 0];
[invocation setArgument: &selector
atIndex: 1];
for (int i = 1; i <= 16; i++) {
__int128 i128 = 0xFFFFFFFFFFFFFFFF;
i128 <<= 64;
i128 |= i;
if (i == 3)
[invocation setArgument: &i
atIndex: i + 1];
else
[invocation setArgument: &i128
atIndex: i + 1];
}
__int128 int128Result;
TEST(@"-[invoke] #4", R([invocation invoke]) &&
R([invocation getReturnValue: &int128Result]) &&
int128Result == ((__int128)0xFFFFFFFFFFFFFFFF << 64) + 8)
# endif
#endif
[pool drain];
}
@end
|
|
|
|
>
|
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
|
[invocation setArgument: &self
atIndex: 0];
[invocation setArgument: &selector
atIndex: 1];
for (int i = 1; i <= 16; i++) {
__extension__ __int128 i128 = 0xFFFFFFFFFFFFFFFF;
i128 <<= 64;
i128 |= i;
if (i == 3)
[invocation setArgument: &i
atIndex: i + 1];
else
[invocation setArgument: &i128
atIndex: i + 1];
}
__extension__ __int128 int128Result;
TEST(@"-[invoke] #4", R([invocation invoke]) &&
R([invocation getReturnValue: &int128Result]) &&
int128Result == __extension__ ((__int128)0xFFFFFFFFFFFFFFFF << 64) +
8)
# endif
#endif
[pool drain];
}
@end
|