From c1c8f8cc4f1ece37f1f9a3d415fce73f6b5172ee Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Fri, 30 Jun 2000 03:50:25 +0000 Subject: [PATCH] jcf-write.c (push_long_const): Appropriately cast short negative constant to jword. 2000-06-29 Alexandre Petit-Bianco * jcf-write.c (push_long_const): Appropriately cast short negative constant to jword. From-SVN: r34802 --- gcc/java/ChangeLog | 5 +++++ gcc/java/jcf-write.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index bac16b8eafd..cd7b947e58e 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2000-06-29 Alexandre Petit-Bianco + + * jcf-write.c (push_long_const): Appropriately cast short negative + constant to jword. + 2000-06-29 Alexandre Petit-Bianco * parse.y (verify_constructor_super): Use loop variable diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 3fc8b30608c..ecd14af9b8e 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -850,7 +850,7 @@ push_long_const (lo, hi, state) OP1(OPCODE_lconst_0 + lo); } else if ((hi == 0 && (jword)(lo & 0xFFFFFFFF) < 32768) - || (hi == -1 && (jword)(lo & 0xFFFFFFFF) >= -32768)) + || (hi == -1 && (lo & 0xFFFFFFFF) >= (jword)-32768)) { push_int_const (lo, state); RESERVE (1); -- 2.30.2