summaryrefslogtreecommitdiff
path: root/nasmlib.c
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2007-11-17 21:08:33 -0800
committerCharles Crayne <chuck@thor.crayne.org>2007-11-17 21:08:33 -0800
commitdb90f35d89d07929e2110e3f9d97532bf2554374 (patch)
tree33319c1eab4170bec2554610244069bdeb67647e /nasmlib.c
parentc9588ea1bc313a4365d7507411b8f1524872318e (diff)
downloadnasm-db90f35d89d07929e2110e3f9d97532bf2554374.tar.gz
Check in Keith's Fixes
1. Don't warn on 32-bit overflow 2. Change EM64T to Intel 64 in Defining CPU Dependencies section of documentation.
Diffstat (limited to 'nasmlib.c')
-rw-r--r--nasmlib.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/nasmlib.c b/nasmlib.c
index 1d5421cb..6f598202 100644
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -283,19 +283,16 @@ int64_t readnum(char *str, bool *error)
}
/*
- * `checklimit' must be 2**(32|64) / radix. We can't do that in
- * 32/64-bit arithmetic, which we're (probably) using, so we
+ * `checklimit' must be 2**64 / radix. We can't do that in
+ * 64-bit arithmetic, which we're (probably) using, so we
* cheat: since we know that all radices we use are even, we
- * can divide 2**(31|63) by radix/2 instead.
+ * can divide 2**63 by radix/2 instead.
*/
- if (globalbits == 64)
- checklimit = 0x8000000000000000ULL / (radix >> 1);
- else
- checklimit = 0x80000000UL / (radix >> 1);
+ checklimit = 0x8000000000000000ULL / (radix >> 1);
/*
* Calculate the highest allowable value for the last digit of a
- * 32-bit constant... in radix 10, it is 6, otherwise it is 0
+ * 64-bit constant... in radix 10, it is 6, otherwise it is 0
*/
last = (radix == 10 ? 6 : 0);