| @@ -610,7 +610,7 @@ struct S_enum { · 609 unmodified lines |
| 610 | 610 | enum ELong { |
| 611 | 611 | /* This is either 0 on L32 machines, or a large number |
| 612 | 612 | on L64 machines. We should be able to store this. */ |
| 613 | | − EL_large = (unsigned long)0xf000 << 32, |
| 613 | + EL_large = ((unsigned long)0xf000 << 31) << 1, |
| 614 | 614 | }; |
| 615 | 615 | |
| 616 | 616 | enum { BIASU = -1U<<31 }; |
| @@ -2028,6 +2028,11 @@ void bitfield_test(void) · 1411 unmodified lines |
| 2028 | 2028 | else |
| 2029 | 2029 | printf("st1.f2 != -1\n"); |
| 2030 | 2030 | |
| 2031 | +#ifndef __i386__ |
| 2032 | + /* on i386 we don't correctly support long long bit-fields. |
| 2033 | + The bitfields can straddle long long boundaries (at least with |
| 2034 | + GCC bitfield layout) and code generation isn't prepared for this |
| 2035 | + (would have to work with two words in that case). */ |
| 2031 | 2036 | /* bit sizes below must be bigger than 32 since GCC doesn't allow |
| 2032 | 2037 | long-long bitfields whose size is not bigger than int */ |
| 2033 | 2038 | struct sbf2 { |
| @@ -2042,6 +2047,19 @@ void bitfield_test(void) · 8 unmodified lines |
| 2042 | 2047 | st2.f3 = a; |
| 2043 | 2048 | st2.f2++; |
| 2044 | 2049 | printf("%lld %lld %lld\n", st2.f1, st2.f2, st2.f3); |
| 2050 | +#endif |
| 2051 | +#if 0 |
| 2052 | + Disabled for now until further clarification re GCC compatibility |
| 2053 | + struct sbf3 { |
| 2054 | + int f1 : 7; |
| 2055 | + int f2 : 1; |
| 2056 | + char f3; |
| 2057 | + int f4 : 8; |
| 2058 | + int f5 : 1; |
| 2059 | + int f6 : 16; |
| 2060 | + } st3; |
| 2061 | + printf("sizeof(st3) = %d\n", sizeof(st3)); |
| 2062 | +#endif |
| 2045 | 2063 | } |
| 2046 | 2064 | |
| 2047 | 2065 | #ifdef __x86_64__ |
| @@ -3100,7 +3118,7 @@ void other_constraints_test(void) · 1052 unmodified lines |
| 3100 | 3118 | { |
| 3101 | 3119 | unsigned long ret; |
| 3102 | 3120 | int var; |
| 3103 | | − __asm__ volatile ("movq %P1,%0" : "=r" (ret) : "p" (&var)); |
| 3121 | + __asm__ volatile ("mov %P1,%0" : "=r" (ret) : "p" (&var)); |
| 3104 | 3122 | printf ("oc1: %d\n", ret == (unsigned long)&var); |
| 3105 | 3123 | } |
| 3106 | 3124 | |
| @@ -3182,6 +3200,7 @@ void test_high_clobbers(void) · 75 unmodified lines |
| 3182 | 3200 | static long cpu_number; |
| 3183 | 3201 | void trace_console(long len, long len2) |
| 3184 | 3202 | { |
| 3203 | +#ifdef __x86_64__ |
| 3185 | 3204 | /* This generated invalid code when the emission of the switch |
| 3186 | 3205 | table isn't disabled. The asms are necessary to show the bug, |
| 3187 | 3206 | normal statements don't work (they need to generate some code |
| @@ -3228,6 +3247,7 @@ void trace_console(long len, long len2) · 40 unmodified lines |
| 3228 | 3247 | { |
| 3229 | 3248 | printf("huh?\n"); |
| 3230 | 3249 | } |
| 3250 | +#endif |
| 3231 | 3251 | } |
| 3232 | 3252 | void asm_test(void) |
| 3233 | 3253 | { |