From: Godmar Back (gback@cs.utah.edu)
Date: Tue Jan 26 1999 - 10:44:25 EST
FYI
Forwarded message:
>From max@immsp.kiev.ua Tue Jan 26 02:14:43 1999
Sender: max@simple.immsp.kiev.ua
Message-ID: <36AD8071.F85D4AC2@immsp.kiev.ua>
Date: Tue, 26 Jan 1999 10:44:33 +0200
From: Maxim Kizub <max@immsp.kiev.ua>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i586)
MIME-Version: 1.0
To: Godmar Back <gback@cs.utah.edu>
Subject: Re: Bug un tableswitch (fwd)
References: <199901260046.RAA07682@sal.cs.utah.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Compiler was javac.
Yes, I did look in bytecode by javap. The code
is correct... I mean - javap shows -1,0,1 values
in tableswitch.
I tested compiler (jit) only.
PS JavaCC offten uses this value (0x7fffffff),
and I use
switch(i) {
case -1: add_opcode(opc_iconst_m1); break;
case 0: add_opcode(opc_iconst_0); break;
...
}
in codegenerator. Under kaffe jit this
adds opcode
opc_iconst_m1
, instead of
opc_ldc 0x7fffffff
I didn't found any other combination of argument
and swicth value that is incorrect...
I think, this may be the problem of i386 code
generator, if this test work correct under
other platforms. Maybe some kind of overflow
at generation or execution time?
I did report, that kiev already works under kaffe,
but generates wrong bytecode. Those two errors
(Float.valueOf and opc_tableswitch) are first
I'm found. There are must be some more...
I'm trying to debug type parametrization/closures,
and all tests works, but the biggest application
that uses them is kiev compiler itself.
I'm trying make it working under kaffe in optimized
mode, befo sending patches.
Godmar Back wrote:
>
> What java compiler are you using (javac/pizza)?
> Did you look at the bytecode?
> Does it happen for both intr and compiler?
>
> - Godmar
>
> Forwarded message:
> > From kaffe@rufus.w3.org Mon Jan 25 15:53:35 1999
> > Resent-From: kaffe@rufus.w3.org
> > Resent-Date: Mon, 25 Jan 1999 17:42:55 -0500
> > Resent-Message-Id: <199901252242.RAA19024@rpmfind.net>
> > X-Authentication-Warning: rpmfind.net: majordom set sender to owner-kaffe@rufus.w3.org using -f
> > Message-ID: <36ACF12F.4FDC8EF4@immsp.kiev.ua>
> > Date: Tue, 26 Jan 1999 00:33:19 +0200
> > From: Maxim Kizub <max@immsp.kiev.ua>
> > X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i586)
> > MIME-Version: 1.0
> > To: kaffe@rufus.w3.org
> > Subject: Bug un tableswitch
> > References: <199901252143.NAA17068@bubba.whistle.com>
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> > Sender: owner-kaffe@rufus.w3.org
> > Precedence: bulk
> > Reply-To: kaffe@rufus.w3.org
> > Errors-To: kaffe-error@rufus.w3.org
> > X-loop: kaffe@rufus.w3.org
> > X-mailing-list: kaffe@rufus.w3.org
> >
> > Here is a test src:
> >
> > public class Test {
> >
> > public static void main(String[] args) {
> > int i = 0x7fffffff;
> > System.out.println("switch("+i+")");
> > switch(i) {
> > case -1: System.out.println("-1"); break;
> > case 0: System.out.println("0"); break;
> > case 1: System.out.println("1"); break;
> > default: System.out.println("default"); break;
> > }
> > }
> >
> > }
> >
> > > javac Test.java
> > > java Test
> > switch(2147483647)
> > default
> >
> > > kaffe Test
> > switch(2147483647)
> > -1
> >
> >
> > There's something wring in tableswitch generation.
> >
> > PS Linux x86, RedHat 5.1
> >
> > Regards
> > Maxim Kizub
> >
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:48 EDT