1 /* { dg-options "-O2" } */ 2 /* { dg-require-effective-target longdouble128 } */ 3 /* { dg-require-effective-target dfp } */ 4 5 #define conv(M,N) mode_##N conv##M##N(mode_##M x) { return x; } 6 7 #define mode_sf float 8 #define mode_df double 9 typedef float __attribute__((mode(IF))) mode_if; 10 typedef float __attribute__((mode(KF))) mode_kf; 11 #define mode_sd _Decimal32 12 #define mode_dd _Decimal64 13 #define mode_td _Decimal128 14 15 #ifdef __FLOAT128_TYPE__ 16 #define conv1(M) \ 17 conv(M,sf) conv(M,df) conv(M,if) conv(M,kf) \ 18 conv(M,sd) conv(M,dd) conv(M,td) 19 #define conv2 \ 20 conv1(sf) conv1(df) conv1(if) conv1(kf) \ 21 conv1(sd) conv1(dd) conv1(td) 22 #else 23 #define conv1(M) \ 24 conv(M,sf) conv(M,df) conv(M,if) \ 25 conv(M,sd) conv(M,dd) conv(M,td) 26 #define conv2 \ 27 conv1(sf) conv1(df) conv1(if) \ 28 conv1(sd) conv1(dd) conv1(td) 29 #endif 30 31 conv2 32 33 34 35 /* { dg-final { scan-assembler-times {\mbl\M} 24 { target { ! hard_dfp } } } } */ 36 /* { dg-final { scan-assembler-times {\mbl\M} 19 { target { hard_dfp && { ! ppc_float128 } } } } } */ 37 /* { dg-final { scan-assembler-times {\mbl\M} 31 { target { hard_dfp && { ppc_float128 && { ! ppc_float128_insns } } } } } } */ 38 /* { dg-final { scan-assembler-times {\mbl\M} 27 { target { hard_dfp && { ppc_float128 && { ppc_float128_insns } } } } } } */ 39 40 41 /* { dg-final { scan-assembler-times {\mbl __extendsfkf2\M} 1 { target { ppc_float128 && { ! ppc_float128_insns } } } } } */ 42 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsfsd\M} 1 } } */ 43 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsfdd\M} 1 } } */ 44 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsftd\M} 1 } } */ 45 /* { dg-final { scan-assembler-times {\mbl __extenddfkf2\M} 1 { target { ppc_float128 && { ! ppc_float128_insns } } } } } */ 46 /* { dg-final { scan-assembler-times {\mbl __dpd_truncdfsd\M} 1 } } */ 47 /* { dg-final { scan-assembler-times {\mbl __dpd_extenddfdd\M} 1 } } */ 48 /* { dg-final { scan-assembler-times {\mbl __dpd_extenddftd\M} 1 } } */ 49 /* { dg-final { scan-assembler-times {\mbl __trunctfkf2\M} 1 { target { ppc_float128 } } } } */ 50 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctfsd\M} 1 } } */ 51 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctfdd\M} 1 } } */ 52 /* { dg-final { scan-assembler-times {\mbl __dpd_extendtftd\M} 1 } } */ 53 /* { dg-final { scan-assembler-times {\mbl __trunckfsf2\M} 1 { target { ppc_float128 && { ! ppc_float128_insns } } } } } */ 54 /* { dg-final { scan-assembler-times {\mbl __trunckfdf2\M} 1 { target { ppc_float128 && { ! ppc_float128_insns } } } } } */ 55 /* { dg-final { scan-assembler-times {\mbl __extendkftf2\M} 1 { target { ppc_float128 } } } } */ 56 /* { dg-final { scan-assembler-times {\mbl __dpd_trunckfsd\M} 1 { target { ppc_float128 } } } } */ 57 /* { dg-final { scan-assembler-times {\mbl __dpd_trunckfdd\M} 1 { target { ppc_float128 } } } } */ 58 /* { dg-final { scan-assembler-times {\mbl __dpd_extendkftd\M} 1 { target { ppc_float128 } } } } */ 59 /* { dg-final { scan-assembler-times {\mbl __dpd_truncsdsf\M} 1 } } */ 60 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsddf\M} 1 } } */ 61 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsdtf\M} 1 } } */ 62 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsdkf\M} 1 { target { ppc_float128 } } } } */ 63 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsddd2\M} 1 { target { ! dfp } } } } */ 64 /* { dg-final { scan-assembler-times {\mbl __dpd_extendsdtd2\M} 1 { target { ! dfp } } } } */ 65 /* { dg-final { scan-assembler-times {\mbl __dpd_truncddsf\M} 1 } } */ 66 /* { dg-final { scan-assembler-times {\mbl __dpd_truncdddf\M} 1 } } */ 67 /* { dg-final { scan-assembler-times {\mbl __dpd_extendddtf\M} 1 } } */ 68 /* { dg-final { scan-assembler-times {\mbl __dpd_extendddkf\M} 1 { target { ppc_float128 } } } } */ 69 /* { dg-final { scan-assembler-times {\mbl __dpd_truncddsd2\M} 1 { target { ! dfp } } } } */ 70 /* { dg-final { scan-assembler-times {\mbl __dpd_extendddtd2\M} 1 { target { ! dfp } } } } */ 71 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctdsf\M} 1 } } */ 72 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctddf\M} 1 } } */ 73 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctdtf\M} 1 } } */ 74 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctdkf\M} 1 { target { ppc_float128 } } } } */ 75 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctdsd2\M} 1 } } */ 76 /* { dg-final { scan-assembler-times {\mbl __dpd_trunctddd2\M} 1 { target { ! dfp } } } } */ 77 78 79 /* { dg-final { scan-assembler-times {\mfrsp|xsrsp\M} 2 { target { ! ppc_float128_insns } } } } */ 80 /* { dg-final { scan-assembler-times {\mfrsp|xsrsp\M} 3 { target { ppc_float128_insns } } } } */ 81 82 83 /* { dg-final { scan-assembler-times {\mfmr\M} 0 { target { ! hard_dfp } } } } */ 84 /* { dg-final { scan-assembler-times {\mfmr\M} 1 { target { hard_dfp } } } } */ 85 86 /* { dg-final { scan-assembler-times {\mlfd\M} 2 { target { ! powerpc_vsx } } } } */ 87 /* { dg-final { scan-assembler-times {\mxxlxor\M} 2 { target { powerpc_vsx } } } } */ 88 /* { dg-final { scan-assembler-times {\mxxlor|xscpsgndp\M} 3 { target { ppc_float128_insns } } } } */ 89 90 91 /* { dg-final { scan-assembler-times {\mdrsp\M} 1 { target { hard_dfp } } } } */ 92 /* { dg-final { scan-assembler-times {\mdrdpq\M} 1 { target { hard_dfp } } } } */ 93 /* { dg-final { scan-assembler-times {\mdctdp\M} 2 { target { hard_dfp } } } } */ 94 /* { dg-final { scan-assembler-times {\mdctqpq\M} 2 { target { hard_dfp } } } } */ 95 96 97 /* { dg-final { scan-assembler-times {\mxscvdpqp\M} 2 { target { ppc_float128_insns } } } } */ 98 /* { dg-final { scan-assembler-times {\mxscvqpdpo\M} 1 { target { ppc_float128_insns } } } } */ 99 /* { dg-final { scan-assembler-times {\mxscvqpdp\M} 1 { target { ppc_float128_insns } } } } */ 100