x86_64 fixes

This commit is contained in:
Yang Tse 2008-08-24 10:40:38 +00:00
parent 13f035b905
commit bc69e46ad1

View File

@ -776,10 +776,11 @@ static int dprintf_formatf(
/* Decimal integer. */ /* Decimal integer. */
base = 10; base = 10;
is_neg = (p->data.num.as_signed < (mp_intmax_t)0) ? 1 : 0; signed_num = p->data.num.as_signed;
is_neg = (signed_num < (mp_intmax_t)0) ? 1 : 0;
if(is_neg) { if(is_neg) {
/* signed_num might fail to hold absolute negative minimum by 1 */ /* signed_num might fail to hold absolute negative minimum by 1 */
signed_num = p->data.num.as_signed + (mp_intmax_t)1; signed_num += (mp_intmax_t)1;
signed_num = -signed_num; signed_num = -signed_num;
num = (mp_uintmax_t)signed_num; num = (mp_uintmax_t)signed_num;
num += (mp_uintmax_t)0x1; num += (mp_uintmax_t)0x1;