X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcalc%2Funary.h;h=358f65f9645a50822cfa3e999513da8c70d94257;hp=72a82e1f2ac80e64c0b51da947127cb62fb2d604;hb=10e51aad0515e80adeb96a47776a2d80e62a98bc;hpb=585ba48b2f2f3e7413fae1d8bef93523c13f253e;ds=sidebyside diff --git a/src/calc/unary.h b/src/calc/unary.h index 72a82e1..358f65f 100644 --- a/src/calc/unary.h +++ b/src/calc/unary.h @@ -57,12 +57,18 @@ static inline token_t psi_calc_minus(token_t t1, impl_val *v1, token_t t2, impl_ case PSI_T_UINT64: res->u64 = -v1->u64; break; +#if HAVE_INT128 case PSI_T_INT128: res->i128 = -v1->i128; break; +#endif + +#if HAVE_UINT128 case PSI_T_UINT128: res->u128 = -v1->u128; break; +#endif + case PSI_T_FLOAT: res->fval = -v1->fval; break; @@ -113,12 +119,18 @@ static inline token_t psi_calc_bool_not(token_t t1, impl_val *v1, token_t t2, im case PSI_T_UINT64: res->u8 = !v1->u64; break; +#if HAVE_INT128 case PSI_T_INT128: res->u8 = !v1->i128; break; +#endif + +#if HAVE_UINT128 case PSI_T_UINT128: res->u8 = !v1->u128; break; +#endif + case PSI_T_FLOAT: res->u8 = !v1->fval; break; @@ -179,14 +191,20 @@ static inline token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, imp i1.u64 = v1->u64; break; +#if HAVE_INT128 case PSI_T_INT128: i1.u64 = v1->i128; break; +#endif + +#if HAVE_UINT128 case PSI_T_UINT128: i1.u64 = v1->u128; break; +#endif + case PSI_T_FLOAT: i1.u64 = v1->fval; break;