Unified · Split
| @@ -242,17 +242,22 @@ ST_FUNC void gsym_addr(int t_, int a_) · 241 unmodified lines | ||
| 242 | 242 | |
| 243 | 243 | static int arm64_type_size(int t) |
| 244 | 244 | { |
| 245 | + /* | |
| 246 | + * case values are in increasing order (from 1 to 11). | |
| 247 | + * which 'may' help compiler optimizers. See tcc.h | |
| 248 | + */ | |
| 245 | 249 | switch (t & VT_BTYPE) { |
| 246 | − case VT_INT: return 2; | |
| 247 | 250 | case VT_BYTE: return 0; |
| 248 | 251 | case VT_SHORT: return 1; |
| 252 | + case VT_INT: return 2; | |
| 253 | + case VT_LLONG: return 3; | |
| 249 | 254 | case VT_PTR: return 3; |
| 250 | 255 | case VT_FUNC: return 3; |
| 256 | + case VT_STRUCT: return 3; | |
| 251 | 257 | case VT_FLOAT: return 2; |
| 252 | 258 | case VT_DOUBLE: return 3; |
| 253 | 259 | case VT_LDOUBLE: return 4; |
| 254 | 260 | case VT_BOOL: return 0; |
| 255 | − case VT_LLONG: return 3; | |
| 256 | 261 | } |
| 257 | 262 | assert(0); |
| 258 | 263 | return 0; |
| @@ -230,6 +230,17 @@ void ret(void) · 229 unmodified lines | ||
| 230 | 230 | printf("%.1Lf %.1Lf\n", fr_hfa34().a, fr_hfa34().d); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | +void* | |
| 234 | +va_arg_with_struct_ptr(va_list ap) { | |
| 235 | + /* | |
| 236 | + * This was a BUG identified with FFTW-3.3.8 on arm64. | |
| 237 | + * The test case only checks it compiles. | |
| 238 | + */ | |
| 239 | + struct X { int _x; }; | |
| 240 | + struct X *x = va_arg(ap, struct X *); | |
| 241 | + return x; | |
| 242 | +} | |
| 243 | + | |
| 233 | 244 | int match(const char **s, const char *f) |
| 234 | 245 | { |
| 235 | 246 | const char *p = *s; |