1 #ifndef TARGET_SPARC64 2 DEF_HELPER_1(rett, void, env) 3 DEF_HELPER_2(wrpsr, void, env, tl) 4 DEF_HELPER_1(rdpsr, tl, env) 5 DEF_HELPER_1(power_down, void, env) 6 #else 7 DEF_HELPER_FLAGS_2(wrpil, TCG_CALL_NO_RWG, void, env, tl) 8 DEF_HELPER_2(wrpstate, void, env, tl) 9 DEF_HELPER_1(done, void, env) 10 DEF_HELPER_1(retry, void, env) 11 DEF_HELPER_FLAGS_1(flushw, TCG_CALL_NO_WG, void, env) 12 DEF_HELPER_FLAGS_1(saved, TCG_CALL_NO_RWG, void, env) 13 DEF_HELPER_FLAGS_1(restored, TCG_CALL_NO_RWG, void, env) 14 DEF_HELPER_1(rdccr, tl, env) 15 DEF_HELPER_2(wrccr, void, env, tl) 16 DEF_HELPER_1(rdcwp, tl, env) 17 DEF_HELPER_2(wrcwp, void, env, tl) 18 DEF_HELPER_FLAGS_2(array8, TCG_CALL_NO_RWG_SE, tl, tl, tl) 19 DEF_HELPER_FLAGS_2(set_softint, TCG_CALL_NO_RWG, void, env, i64) 20 DEF_HELPER_FLAGS_2(clear_softint, TCG_CALL_NO_RWG, void, env, i64) 21 DEF_HELPER_FLAGS_2(write_softint, TCG_CALL_NO_RWG, void, env, i64) 22 DEF_HELPER_FLAGS_2(tick_set_count, TCG_CALL_NO_RWG, void, ptr, i64) 23 DEF_HELPER_FLAGS_3(tick_get_count, TCG_CALL_NO_WG, i64, env, ptr, int) 24 DEF_HELPER_FLAGS_2(tick_set_limit, TCG_CALL_NO_RWG, void, ptr, i64) 25 #endif 26 DEF_HELPER_FLAGS_3(check_align, TCG_CALL_NO_WG, void, env, tl, i32) 27 DEF_HELPER_1(debug, void, env) 28 DEF_HELPER_1(save, void, env) 29 DEF_HELPER_1(restore, void, env) 30 DEF_HELPER_3(udiv, tl, env, tl, tl) 31 DEF_HELPER_3(udiv_cc, tl, env, tl, tl) 32 DEF_HELPER_3(sdiv, tl, env, tl, tl) 33 DEF_HELPER_3(sdiv_cc, tl, env, tl, tl) 34 DEF_HELPER_3(taddcctv, tl, env, tl, tl) 35 DEF_HELPER_3(tsubcctv, tl, env, tl, tl) 36 #ifdef TARGET_SPARC64 37 DEF_HELPER_FLAGS_3(sdivx, TCG_CALL_NO_WG, s64, env, s64, s64) 38 DEF_HELPER_FLAGS_3(udivx, TCG_CALL_NO_WG, i64, env, i64, i64) 39 #endif 40 #if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64) 41 DEF_HELPER_FLAGS_4(ld_asi, TCG_CALL_NO_WG, i64, env, tl, int, i32) 42 DEF_HELPER_FLAGS_5(st_asi, TCG_CALL_NO_WG, void, env, tl, i64, int, i32) 43 #endif 44 DEF_HELPER_FLAGS_1(check_ieee_exceptions, TCG_CALL_NO_WG, tl, env) 45 DEF_HELPER_FLAGS_3(ldfsr, TCG_CALL_NO_RWG, tl, env, tl, i32) 46 DEF_HELPER_FLAGS_1(fabss, TCG_CALL_NO_RWG_SE, f32, f32) 47 DEF_HELPER_FLAGS_2(fsqrts, TCG_CALL_NO_RWG, f32, env, f32) 48 DEF_HELPER_FLAGS_2(fsqrtd, TCG_CALL_NO_RWG, f64, env, f64) 49 DEF_HELPER_FLAGS_3(fcmps, TCG_CALL_NO_WG, tl, env, f32, f32) 50 DEF_HELPER_FLAGS_3(fcmpd, TCG_CALL_NO_WG, tl, env, f64, f64) 51 DEF_HELPER_FLAGS_3(fcmpes, TCG_CALL_NO_WG, tl, env, f32, f32) 52 DEF_HELPER_FLAGS_3(fcmped, TCG_CALL_NO_WG, tl, env, f64, f64) 53 DEF_HELPER_FLAGS_1(fsqrtq, TCG_CALL_NO_RWG, void, env) 54 DEF_HELPER_FLAGS_1(fcmpq, TCG_CALL_NO_WG, tl, env) 55 DEF_HELPER_FLAGS_1(fcmpeq, TCG_CALL_NO_WG, tl, env) 56 #ifdef TARGET_SPARC64 57 DEF_HELPER_FLAGS_3(ldxfsr, TCG_CALL_NO_RWG, tl, env, tl, i64) 58 DEF_HELPER_FLAGS_1(fabsd, TCG_CALL_NO_RWG_SE, f64, f64) 59 DEF_HELPER_FLAGS_3(fcmps_fcc1, TCG_CALL_NO_WG, tl, env, f32, f32) 60 DEF_HELPER_FLAGS_3(fcmps_fcc2, TCG_CALL_NO_WG, tl, env, f32, f32) 61 DEF_HELPER_FLAGS_3(fcmps_fcc3, TCG_CALL_NO_WG, tl, env, f32, f32) 62 DEF_HELPER_FLAGS_3(fcmpd_fcc1, TCG_CALL_NO_WG, tl, env, f64, f64) 63 DEF_HELPER_FLAGS_3(fcmpd_fcc2, TCG_CALL_NO_WG, tl, env, f64, f64) 64 DEF_HELPER_FLAGS_3(fcmpd_fcc3, TCG_CALL_NO_WG, tl, env, f64, f64) 65 DEF_HELPER_FLAGS_3(fcmpes_fcc1, TCG_CALL_NO_WG, tl, env, f32, f32) 66 DEF_HELPER_FLAGS_3(fcmpes_fcc2, TCG_CALL_NO_WG, tl, env, f32, f32) 67 DEF_HELPER_FLAGS_3(fcmpes_fcc3, TCG_CALL_NO_WG, tl, env, f32, f32) 68 DEF_HELPER_FLAGS_3(fcmped_fcc1, TCG_CALL_NO_WG, tl, env, f64, f64) 69 DEF_HELPER_FLAGS_3(fcmped_fcc2, TCG_CALL_NO_WG, tl, env, f64, f64) 70 DEF_HELPER_FLAGS_3(fcmped_fcc3, TCG_CALL_NO_WG, tl, env, f64, f64) 71 DEF_HELPER_FLAGS_1(fabsq, TCG_CALL_NO_RWG, void, env) 72 DEF_HELPER_FLAGS_1(fcmpq_fcc1, TCG_CALL_NO_WG, tl, env) 73 DEF_HELPER_FLAGS_1(fcmpq_fcc2, TCG_CALL_NO_WG, tl, env) 74 DEF_HELPER_FLAGS_1(fcmpq_fcc3, TCG_CALL_NO_WG, tl, env) 75 DEF_HELPER_FLAGS_1(fcmpeq_fcc1, TCG_CALL_NO_WG, tl, env) 76 DEF_HELPER_FLAGS_1(fcmpeq_fcc2, TCG_CALL_NO_WG, tl, env) 77 DEF_HELPER_FLAGS_1(fcmpeq_fcc3, TCG_CALL_NO_WG, tl, env) 78 #endif 79 DEF_HELPER_2(raise_exception, noreturn, env, int) 80 #define F_HELPER_0_1(name) \ 81 DEF_HELPER_FLAGS_1(f ## name, TCG_CALL_NO_RWG, void, env) 82 83 DEF_HELPER_FLAGS_3(faddd, TCG_CALL_NO_RWG, f64, env, f64, f64) 84 DEF_HELPER_FLAGS_3(fsubd, TCG_CALL_NO_RWG, f64, env, f64, f64) 85 DEF_HELPER_FLAGS_3(fmuld, TCG_CALL_NO_RWG, f64, env, f64, f64) 86 DEF_HELPER_FLAGS_3(fdivd, TCG_CALL_NO_RWG, f64, env, f64, f64) 87 F_HELPER_0_1(addq) 88 F_HELPER_0_1(subq) 89 F_HELPER_0_1(mulq) 90 F_HELPER_0_1(divq) 91 92 DEF_HELPER_FLAGS_3(fadds, TCG_CALL_NO_RWG, f32, env, f32, f32) 93 DEF_HELPER_FLAGS_3(fsubs, TCG_CALL_NO_RWG, f32, env, f32, f32) 94 DEF_HELPER_FLAGS_3(fmuls, TCG_CALL_NO_RWG, f32, env, f32, f32) 95 DEF_HELPER_FLAGS_3(fdivs, TCG_CALL_NO_RWG, f32, env, f32, f32) 96 97 DEF_HELPER_FLAGS_3(fsmuld, TCG_CALL_NO_RWG, f64, env, f32, f32) 98 DEF_HELPER_FLAGS_3(fdmulq, TCG_CALL_NO_RWG, void, env, f64, f64) 99 100 DEF_HELPER_FLAGS_1(fnegs, TCG_CALL_NO_RWG_SE, f32, f32) 101 DEF_HELPER_FLAGS_2(fitod, TCG_CALL_NO_RWG_SE, f64, env, s32) 102 DEF_HELPER_FLAGS_2(fitoq, TCG_CALL_NO_RWG, void, env, s32) 103 104 DEF_HELPER_FLAGS_2(fitos, TCG_CALL_NO_RWG, f32, env, s32) 105 106 #ifdef TARGET_SPARC64 107 DEF_HELPER_FLAGS_1(fnegd, TCG_CALL_NO_RWG_SE, f64, f64) 108 DEF_HELPER_FLAGS_1(fnegq, TCG_CALL_NO_RWG, void, env) 109 DEF_HELPER_FLAGS_2(fxtos, TCG_CALL_NO_RWG, f32, env, s64) 110 DEF_HELPER_FLAGS_2(fxtod, TCG_CALL_NO_RWG, f64, env, s64) 111 DEF_HELPER_FLAGS_2(fxtoq, TCG_CALL_NO_RWG, void, env, s64) 112 #endif 113 DEF_HELPER_FLAGS_2(fdtos, TCG_CALL_NO_RWG, f32, env, f64) 114 DEF_HELPER_FLAGS_2(fstod, TCG_CALL_NO_RWG, f64, env, f32) 115 DEF_HELPER_FLAGS_1(fqtos, TCG_CALL_NO_RWG, f32, env) 116 DEF_HELPER_FLAGS_2(fstoq, TCG_CALL_NO_RWG, void, env, f32) 117 DEF_HELPER_FLAGS_1(fqtod, TCG_CALL_NO_RWG, f64, env) 118 DEF_HELPER_FLAGS_2(fdtoq, TCG_CALL_NO_RWG, void, env, f64) 119 DEF_HELPER_FLAGS_2(fstoi, TCG_CALL_NO_RWG, s32, env, f32) 120 DEF_HELPER_FLAGS_2(fdtoi, TCG_CALL_NO_RWG, s32, env, f64) 121 DEF_HELPER_FLAGS_1(fqtoi, TCG_CALL_NO_RWG, s32, env) 122 #ifdef TARGET_SPARC64 123 DEF_HELPER_FLAGS_2(fstox, TCG_CALL_NO_RWG, s64, env, f32) 124 DEF_HELPER_FLAGS_2(fdtox, TCG_CALL_NO_RWG, s64, env, f64) 125 DEF_HELPER_FLAGS_1(fqtox, TCG_CALL_NO_RWG, s64, env) 126 127 DEF_HELPER_FLAGS_2(fpmerge, TCG_CALL_NO_RWG_SE, i64, i64, i64) 128 DEF_HELPER_FLAGS_2(fmul8x16, TCG_CALL_NO_RWG_SE, i64, i64, i64) 129 DEF_HELPER_FLAGS_2(fmul8x16al, TCG_CALL_NO_RWG_SE, i64, i64, i64) 130 DEF_HELPER_FLAGS_2(fmul8x16au, TCG_CALL_NO_RWG_SE, i64, i64, i64) 131 DEF_HELPER_FLAGS_2(fmul8sux16, TCG_CALL_NO_RWG_SE, i64, i64, i64) 132 DEF_HELPER_FLAGS_2(fmul8ulx16, TCG_CALL_NO_RWG_SE, i64, i64, i64) 133 DEF_HELPER_FLAGS_2(fmuld8sux16, TCG_CALL_NO_RWG_SE, i64, i64, i64) 134 DEF_HELPER_FLAGS_2(fmuld8ulx16, TCG_CALL_NO_RWG_SE, i64, i64, i64) 135 DEF_HELPER_FLAGS_2(fexpand, TCG_CALL_NO_RWG_SE, i64, i64, i64) 136 DEF_HELPER_FLAGS_3(pdist, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) 137 DEF_HELPER_FLAGS_2(fpack16, TCG_CALL_NO_RWG_SE, i32, i64, i64) 138 DEF_HELPER_FLAGS_3(fpack32, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) 139 DEF_HELPER_FLAGS_2(fpackfix, TCG_CALL_NO_RWG_SE, i32, i64, i64) 140 DEF_HELPER_FLAGS_3(bshuffle, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) 141 #define VIS_HELPER(name) \ 142 DEF_HELPER_FLAGS_2(f ## name ## 16, TCG_CALL_NO_RWG_SE, \ 143 i64, i64, i64) \ 144 DEF_HELPER_FLAGS_2(f ## name ## 16s, TCG_CALL_NO_RWG_SE, \ 145 i32, i32, i32) \ 146 DEF_HELPER_FLAGS_2(f ## name ## 32, TCG_CALL_NO_RWG_SE, \ 147 i64, i64, i64) \ 148 DEF_HELPER_FLAGS_2(f ## name ## 32s, TCG_CALL_NO_RWG_SE, \ 149 i32, i32, i32) 150 151 VIS_HELPER(padd) 152 VIS_HELPER(psub) 153 #define VIS_CMPHELPER(name) \ 154 DEF_HELPER_FLAGS_2(f##name##16, TCG_CALL_NO_RWG_SE, \ 155 i64, i64, i64) \ 156 DEF_HELPER_FLAGS_2(f##name##32, TCG_CALL_NO_RWG_SE, \ 157 i64, i64, i64) 158 VIS_CMPHELPER(cmpgt) 159 VIS_CMPHELPER(cmpeq) 160 VIS_CMPHELPER(cmple) 161 VIS_CMPHELPER(cmpne) 162 #endif 163 #undef F_HELPER_0_1 164 #undef VIS_HELPER 165 #undef VIS_CMPHELPER 166 DEF_HELPER_1(compute_psr, void, env) 167 DEF_HELPER_FLAGS_1(compute_C_icc, TCG_CALL_NO_WG_SE, i32, env) 168