* jcf-write.c (generate_bytecode_insns): Add support for fconst_2.

From-SVN: r71524
This commit is contained in:
Roger Sayle 2003-09-18 14:55:43 +00:00 committed by Roger Sayle
parent b2bc33399b
commit a490d1be3f
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2003-09-18 Roger Sayle <roger@eyesopen.com>
* jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
2003-09-16 Andrew Haley <aph@redhat.com>
* jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.

View File

@ -1462,8 +1462,9 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
OP1 (prec == 1 ? OPCODE_fconst_0 : OPCODE_dconst_0);
else if (real_onep (exp))
OP1 (prec == 1 ? OPCODE_fconst_1 : OPCODE_dconst_1);
/* FIXME Should also use fconst_2 for 2.0f.
Also, should use iconst_2/ldc followed by i2f/i2d
else if (prec == 1 && real_twop (exp))
OP1 (OPCODE_fconst_2);
/* ??? We could also use iconst_3/ldc followed by i2f/i2d
for other float/double when the value is a small integer. */
else
{