Branch: Tag:

2012-12-31

2012-12-31 20:08:24 by Arne Goedeke <el@laramies.com>

check for and define INT128

1717:    }       case BIT_INT: +  {   #ifdef AUTO_BIGNUM -  +  int of = 0;    size = 0;    for(e = -args; e < 0; e++)    { -  if(INT_TYPE_ADD_OVERFLOW(sp[e].u.integer, size)) +  size = DO_INT_TYPE_ADD_OVERFLOW(size, sp[e].u.integer, &of); +  } +  if(of)    {    convert_svalue_to_bignum(sp-args);    f_add(args);    return;    } -  else -  { -  size += sp[e].u.integer; -  } -  } +     sp-=args;    push_int(size);   #else
1742:   #endif /* AUTO_BIGNUM */    break;    +  }    case BIT_FLOAT:    if (args > 2) {    /* Attempt to minimize the accumulated summation error
3739:    return;       case TWO_TYPES(T_INT,T_INT): - #ifdef AUTO_BIGNUM -  if(INT_TYPE_MUL_OVERFLOW(sp[-2].u.integer, sp[-1].u.integer)) +     { -  +  INT_TYPE res; + #ifndef AUTO_BIGNUM +  res = sp[-2].u.integer * sp[-1].u.integer; + #else +  int of = 0; +  +  res = DO_INT_TYPE_MUL_OVERFLOW(sp[-2].u.integer, sp[-1].u.integer, &of); +  +  if(of) +  {    convert_stack_top_to_bignum();    goto do_lfun_multiply;    }   #endif /* AUTO_BIGNUM */    sp--; -  SET_SVAL(sp[-1], T_INT, NUMBER_NUMBER, integer, -  sp[-1].u.integer * sp[0].u.integer); +  SET_SVAL(sp[-1], T_INT, NUMBER_NUMBER, integer, res);    return; -  +  }    default:    do_lfun_multiply:    if(call_lfun(LFUN_MULTIPLY, LFUN_RMULTIPLY))