| #define VLDIGITS (sizeof(vlong)/sizeof(mpdigit)) |
| * this code assumes that a vlong is an integral number of |
| uvtomp(uvlong v, mpint *b) |
| b = mpnew(VLDIGITS*sizeof(mpdigit)); |
| mpbits(b, VLDIGITS*sizeof(mpdigit)); |
| for(s = 0; s < VLDIGITS && v != 0; s++){ |
| /* !@*$&!@$ gcc gives warnings about the >> here |
| * when running on 64-bit machines, even though |
| * it's in dead code. fake it out with two shifts. |
| if(sizeof(mpdigit) == sizeof(uvlong)) |
| for(s = 0; s < b->top; s++) |
| v |= (uvlong)b->p[s]<<(s*sizeof(mpdigit)*8); |