ref: cabcd03fb7b04d540565d31ea93003deceb16bdc
parent: a59678bdd9ddedee9cc73e928f063036ece46362
author: spew <spew@cbza.org>
date: Thu Apr 10 14:09:06 EDT 2025
default to larger ptr size for arithmetic operations
--- a/src/sl_arith_any.h
+++ b/src/sl_arith_any.h
@@ -42,10 +42,10 @@
case T_S16: x = *(s16int*)a; break;
case T_U16: x = *(u16int*)a; break;
case T_S32: x = *(s32int*)a; break;
- case T_P32: if(forcetype < 0) forcetype = T_P32;
+ case T_P32: if(forcetype < T_P32) forcetype = T_P32;
case T_U32: x = *(u32int*)a; break;
case T_S64: x = *(s64int*)a; break;
- case T_P64: if(forcetype < 0) forcetype = T_P64;
+ case T_P64: if(forcetype < T_P64) forcetype = T_P64;
case T_U64:
u64 = *(u64int*)a;
if(u64 > INT64_MAX){
@@ -123,10 +123,10 @@
case T_S16: x = *(s16int*)a; break;
case T_U16: x = *(u16int*)a; break;
case T_S32: x = *(s32int*)a; break;
- case T_P32: if(forcetype < 0) forcetype = T_P32;
+ case T_P32: if(forcetype < T_P32) forcetype = T_P32;
case T_U32: x = *(u32int*)a; break;
case T_S64: x = *(s64int*)a; break;
- case T_P64: if(forcetype < 0) forcetype = T_P64;
+ case T_P64: if(forcetype < T_P64) forcetype = T_P64;
case T_U64:
uvtomp(*(u64int*)a, m);
MP_OP(Maccum, m, Maccum);
--
⑨