Commit a490d1be by Roger Sayle Committed by Roger Sayle

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

From-SVN: r71524
parent b2bc3339
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.
......
......@@ -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
{
......
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