Commit 06657dcd by Mark Mitchell Committed by Mark Mitchell

jcf-write.c (generate_bytecode_insns): Generate an integer to real conversion…

jcf-write.c (generate_bytecode_insns): Generate an integer to real conversion for increments and decrements of reals.

	* jcf-write.c (generate_bytecode_insns): Generate an integer to
	real conversion for increments and decrements of reals.

From-SVN: r45230
parent 68350f4f
2001-08-28 Mark Mitchell <mark@codesourcery.com>
* jcf-write.c (generate_bytecode_insns): Generate an integer to
real conversion for increments and decrements of reals.
2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com> 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (check_deprecation): Handle TYPE_DECL in a special case, * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
......
...@@ -1960,8 +1960,15 @@ generate_bytecode_insns (exp, target, state) ...@@ -1960,8 +1960,15 @@ generate_bytecode_insns (exp, target, state)
/* Stack, if ARRAY_REF: ..., [result, ] array, index, oldvalue. */ /* Stack, if ARRAY_REF: ..., [result, ] array, index, oldvalue. */
/* Stack, if COMPONENT_REF: ..., [result, ] objectref, oldvalue. */ /* Stack, if COMPONENT_REF: ..., [result, ] objectref, oldvalue. */
/* Stack, otherwise: ..., [result, ] oldvalue. */ /* Stack, otherwise: ..., [result, ] oldvalue. */
if (size == 1) if (size == 1 || TREE_CODE (type) == REAL_TYPE)
{
push_int_const (value, state); push_int_const (value, state);
if (TREE_CODE (type) == REAL_TYPE)
{
RESERVE (1);
OP1 (TYPE_PRECISION (type) == 32 ? OPCODE_i2f : OPCODE_i2d);
}
}
else else
push_long_const (value, (HOST_WIDE_INT)(value >= 0 ? 0 : -1), state); push_long_const (value, (HOST_WIDE_INT)(value >= 0 ? 0 : -1), state);
NOTE_PUSH (size); NOTE_PUSH (size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment