aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-write.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-01-29 22:40:07 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-01-29 14:40:07 -0800
commitf8989a66b88d9b4fa6cad40e5266a29696655764 (patch)
treeb89a58f820f86bae4757bbef8cd5acd0505d0889 /gcc/java/jcf-write.c
parent114356ad7c0d15bfc2e5687e3fe530b7ebd54a50 (diff)
downloadgcc-f8989a66b88d9b4fa6cad40e5266a29696655764.zip
gcc-f8989a66b88d9b4fa6cad40e5266a29696655764.tar.gz
gcc-f8989a66b88d9b4fa6cad40e5266a29696655764.tar.bz2
[multiple changes]
2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better error handling/recovery. * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment. Wed Jan 12 20:20:11 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): binop: Change the type of the shift value to int. Fixed typo in comment. From-SVN: r31695
Diffstat (limited to 'gcc/java/jcf-write.c')
-rw-r--r--gcc/java/jcf-write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index d63ad3e..81eeed7 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -2089,11 +2089,13 @@ generate_bytecode_insns (exp, target, state)
else
{
generate_bytecode_insns (arg0, target, state);
+ if (jopcode >= OPCODE_lshl && jopcode <= OPCODE_lushr)
+ arg1 = convert (int_type_node, arg1);
generate_bytecode_insns (arg1, target, state);
}
/* For most binary operations, both operands and the result have the
same type. Shift operations are different. Using arg1's type
- gets us the correct SP adjustment in all casesd. */
+ gets us the correct SP adjustment in all cases. */
if (target == STACK_TARGET)
emit_binop (jopcode, TREE_TYPE (arg1), state);
break;