From: Mark Wielaard <mark@klomp.org>
To: java@gcc.gnu.org
Subject: real_zerop thinks -0 == 0
Date: Mon, 15 Apr 2002 18:22:00 -0000 [thread overview]
Message-ID: <1018914537.30925.36.camel@elsschot> (raw)
Hi,
The following seems to fix a couple of the remaining Mauve failures (the
mauve tests are first compiled to byte-code).
--- jcf-write.c 12 Mar 2002 10:33:57 -0000 1.99.2.1
+++ jcf-write.c 15 Apr 2002 23:37:46 -0000
@@ -1536,9 +1536,7 @@
{
int prec = TYPE_PRECISION (type) >> 5;
RESERVE(1);
- if (real_zerop (exp))
- OP1 (prec == 1 ? OPCODE_fconst_0 : OPCODE_dconst_0);
- else if (real_onep (exp))
+ 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
This isn't a real solution, but I don't know how to correctly test for
positive zero and I really must get some sleep now. Maybe someone more
familiar with this code can suggest the proper solution.
The example code to try is:
public class Z
{
public static void main(String[] args)
{
System.out.println(-0.0f);
}
}
Compile with gcj -C and run with gij. Output should be -0.0.
Good night,
Mark
next reply other threads:[~2002-04-15 23:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-15 18:22 Mark Wielaard [this message]
2002-04-16 8:47 ` Tom Tromey
2002-04-16 8:58 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1018914537.30925.36.camel@elsschot \
--to=mark@klomp.org \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).