summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-12 12:40:49 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-12 12:40:49 +0000
commitd504f64a3b7b76195e449fd886cfe7d2b37b412f (patch)
treea3399f261333ac4c8f5d0d8b3623a4ba786bf41a /insns.def
parentc13cd729bfdb5f5eb44ec681db4fea85f029a31f (diff)
* insns.def (opt_succ): use LONG_MAX as maximum Fixnum VALUE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def3
1 files changed, 1 insertions, 2 deletions
diff --git a/insns.def b/insns.def
index 9fc4fcc9d4..b22b76323a 100644
--- a/insns.def
+++ b/insns.def
@@ -2304,8 +2304,7 @@ opt_succ
const VALUE obj = INT2FIX(1);
/* fixnum + INT2FIX(1) */
val = (recv + (obj & (~1)));
- if ((~(recv ^ obj) & (recv ^ val)) &
- ((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
+ if ((~(recv ^ obj) & (recv ^ val)) & (LONG_MAX + 1)) {
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
rb_int2big(FIX2LONG(obj)));
}