|
| 1 | +/* { dg-do compile } */ |
| 2 | +/* { dg-options "-O2 -save-temps -Wno-narrowing" } */ |
| 3 | + |
| 4 | +#define ALIGN 16 |
| 5 | +#define EXTRA |
| 6 | + |
| 7 | +#include "bitfield-abi-warning.h" |
| 8 | + |
| 9 | +/* In f1, f2, f4, f8, f16, f16p (and stdarg versions): */ |
| 10 | +/* { dg-final { scan-assembler-times "and\tw0, w2, 1" 12 { xfail *-*-* } } } */ |
| 11 | +/* In fp, f1p, f2p, f4p, f8p (and stdarg versions): */ |
| 12 | +/* { dg-final { scan-assembler-times "and\tw0, w1, 1" 10 { xfail *-*-* } } } */ |
| 13 | + |
| 14 | +/* Bitfield parameter in registers. */ |
| 15 | +/* { dg-note {parameter passing for argument of type 'S1' changed in GCC 9.1} "" { target *-*-* } 47 } f1 */ |
| 16 | +/* { dg-note {parameter passing for argument of type 'S2' changed in GCC 9.1} "" { target *-*-* } 48 } f2 */ |
| 17 | +/* { dg-note {parameter passing for argument of type 'S4' changed in GCC 9.1} "" { target *-*-* } 49 } f4 */ |
| 18 | +/* { dg-note {parameter passing for argument of type 'S8' changed in GCC 9.1} "" { target *-*-* } 50 } f8 */ |
| 19 | + |
| 20 | +/* No change in parameter passing in GCC 9.1 for lines 53-57 (fp, f1p, f2p, |
| 21 | + f4p, f8p) (because the argument fits in a single register). Should not |
| 22 | + warn, but aarch64_function_arg_boundary would need to take the argument size |
| 23 | + into account as well as whether it's passed via registers or the stack. */ |
| 24 | +/* { dg-note {parameter passing for argument of type 'Sp' changed in GCC 9.1} "" { target *-*-* } 53 } fp */ |
| 25 | +/* { dg-note {parameter passing for argument of type 'S1p' changed in GCC 9.1} "" { target *-*-* } 54 } f1p */ |
| 26 | +/* { dg-note {parameter passing for argument of type 'S2p' changed in GCC 9.1} "" { target *-*-* } 55 } f2p */ |
| 27 | +/* { dg-note {parameter passing for argument of type 'S4p' changed in GCC 9.1} "" { target *-*-* } 56 } f4p */ |
| 28 | +/* { dg-note {parameter passing for argument of type 'S8p' changed in GCC 9.1} "" { target *-*-* } 57 } f8p */ |
| 29 | + |
| 30 | +/* Bitfield call argument in registers. */ |
| 31 | +/* { dg-note {parameter passing for argument of type 'S1' changed in GCC 9.1} "" { target *-*-* } 60 } g1 */ |
| 32 | +/* { dg-note {parameter passing for argument of type 'S2' changed in GCC 9.1} "" { target *-*-* } 61 } g2 */ |
| 33 | +/* { dg-note {parameter passing for argument of type 'S4' changed in GCC 9.1} "" { target *-*-* } 62 } g4 */ |
| 34 | +/* { dg-note {parameter passing for argument of type 'S8' changed in GCC 9.1} "" { target *-*-* } 63 } g8 */ |
| 35 | + |
| 36 | +/* No change in parameter passing in GCC 9.1 for lines 66-70 (gp, g1p, g2p, |
| 37 | + g4p, g8p), no warning expected. */ |
| 38 | + |
| 39 | + |
| 40 | +/* Bitfield parameter in stack. */ |
| 41 | +/* { dg-note {parameter passing for argument of type 'S1' changed in GCC 9.1} "" { target *-*-* } 74 } f1_stack */ |
| 42 | +/* { dg-note {parameter passing for argument of type 'S2' changed in GCC 9.1} "" { target *-*-* } 75 } f2_stack */ |
| 43 | +/* { dg-note {parameter passing for argument of type 'S4' changed in GCC 9.1} "" { target *-*-* } 76 } f4_stack */ |
| 44 | +/* { dg-note {parameter passing for argument of type 'S8' changed in GCC 9.1} "" { target *-*-* } 77 } f8_stack */ |
| 45 | + |
| 46 | +/* { dg-note {parameter passing for argument of type 'Sp' changed in GCC 9.1} "" { target *-*-* } 80 } fp_stack */ |
| 47 | +/* { dg-note {parameter passing for argument of type 'S1p' changed in GCC 9.1} "" { target *-*-* } 81 } f1p_stack */ |
| 48 | +/* { dg-note {parameter passing for argument of type 'S2p' changed in GCC 9.1} "" { target *-*-* } 82 } f2p_stack */ |
| 49 | +/* { dg-note {parameter passing for argument of type 'S4p' changed in GCC 9.1} "" { target *-*-* } 83 } f4p_stack */ |
| 50 | +/* { dg-note {parameter passing for argument of type 'S8p' changed in GCC 9.1} "" { target *-*-* } 84 } f8p_stack */ |
| 51 | + |
| 52 | +/* Bitfield call argument in stack. */ |
| 53 | +/* { dg-note {parameter passing for argument of type 'S1' changed in GCC 9.1} "" { target *-*-* } 87 } g1_stack */ |
| 54 | +/* { dg-note {parameter passing for argument of type 'S2' changed in GCC 9.1} "" { target *-*-* } 88 } g2_stack */ |
| 55 | +/* { dg-note {parameter passing for argument of type 'S4' changed in GCC 9.1} "" { target *-*-* } 89 } g4_stack */ |
| 56 | +/* { dg-note {parameter passing for argument of type 'S8' changed in GCC 9.1} "" { target *-*-* } 90 } g8_stack */ |
| 57 | + |
| 58 | +/* { dg-note {parameter passing for argument of type 'Sp' changed in GCC 9.1} "" { target *-*-* } 93 } gp_stack */ |
| 59 | +/* { dg-note {parameter passing for argument of type 'S1p' changed in GCC 9.1} "" { target *-*-* } 94 } g1p_stack */ |
| 60 | +/* { dg-note {parameter passing for argument of type 'S2p' changed in GCC 9.1} "" { target *-*-* } 95 } g2p_stack */ |
| 61 | +/* { dg-note {parameter passing for argument of type 'S4p' changed in GCC 9.1} "" { target *-*-* } 96 } g4p_stack */ |
| 62 | +/* { dg-note {parameter passing for argument of type 'S8p' changed in GCC 9.1} "" { target *-*-* } 97 } g8p_stack */ |
| 63 | + |
| 64 | + |
| 65 | +/* Bitfield parameter in stdarg. */ |
| 66 | +/* { dg-note {parameter passing for argument of type 'S1' changed in GCC 9.1} "" { target *-*-* } 101 } f1_stdarg */ |
| 67 | +/* { dg-note {parameter passing for argument of type 'S2' changed in GCC 9.1} "" { target *-*-* } 102 } f2_stdarg */ |
| 68 | +/* { dg-note {parameter passing for argument of type 'S4' changed in GCC 9.1} "" { target *-*-* } 103 } f4_stdarg */ |
| 69 | +/* { dg-note {parameter passing for argument of type 'S8' changed in GCC 9.1} "" { target *-*-* } 104 } f8_stdarg */ |
| 70 | + |
| 71 | +/* Parameter passing for these should not have changed in GCC 9.1 (PR 105549). |
| 72 | + Fortunately we warn. Note the discrepancy with lines 120-124 below: we warn |
| 73 | + in the callee, but not in the caller. */ |
| 74 | +/* { dg-note {parameter passing for argument of type 'Sp' changed in GCC 9.1} "" { target *-*-* } 107 } fp_stdarg */ |
| 75 | +/* { dg-note {parameter passing for argument of type 'S1p' changed in GCC 9.1} "" { target *-*-* } 108 } f1p_stdarg */ |
| 76 | +/* { dg-note {parameter passing for argument of type 'S2p' changed in GCC 9.1} "" { target *-*-* } 109 } f2p_stdarg */ |
| 77 | +/* { dg-note {parameter passing for argument of type 'S4p' changed in GCC 9.1} "" { target *-*-* } 110 } f4p_stdarg */ |
| 78 | +/* { dg-note {parameter passing for argument of type 'S8p' changed in GCC 9.1} "" { target *-*-* } 111 } f8p_stdarg */ |
| 79 | + |
| 80 | +/* Bitfield call argument in stdarg. */ |
| 81 | +/* { dg-note {parameter passing for argument of type 'S1' changed in GCC 9.1} "" { target *-*-* } 114 } g1_stdarg */ |
| 82 | +/* { dg-note {parameter passing for argument of type 'S2' changed in GCC 9.1} "" { target *-*-* } 115 } g2_stdarg */ |
| 83 | +/* { dg-note {parameter passing for argument of type 'S4' changed in GCC 9.1} "" { target *-*-* } 116 } g4_stdarg */ |
| 84 | +/* { dg-note {parameter passing for argument of type 'S8' changed in GCC 9.1} "" { target *-*-* } 117 } g8_stdarg */ |
| 85 | + |
| 86 | +/* No change in parameter passing in GCC 9.1 for lines 120-124 (gp_stdarg |
| 87 | + g1p_stdarg, g2p_stdarg, g4p_stdarg, g8p_stdarg), no warning expected. */ |
0 commit comments