This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gcj bytecode generation patch
- To: gcc-patches at sourceware dot cygnus dot com
- Subject: gcj bytecode generation patch
- From: Anthony Green <green at cygnus dot com>
- Date: Sun, 30 Jan 2000 14:10:24 -0800
- Reply-to: green at redhat dot com
Gcj wasn't tracking stack sizes correctly on targets with 64-bit
pointers. I'm not clear on whether we need to do this for RECORD_TYPE
or not. Alex?
2000-01-30 Anthony Green <green@redhat.com>
* jcf-write.c (generate_bytecode_insns): Bytecode pointers use one
stack slot regardless of the target's pointer size.
Index: gcc/java/jcf-write.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf-write.c,v
retrieving revision 1.46
diff -u -r1.46 jcf-write.c
--- jcf-write.c 2000/01/29 22:40:07 1.46
+++ jcf-write.c 2000/01/30 22:05:48
@@ -1625,7 +1625,14 @@
/* COND_EXPR can be used in a binop. The stack must be adjusted. */
if (TREE_TYPE (exp) != void_type_node)
- NOTE_POP (TYPE_PRECISION (TREE_TYPE (exp)) > 32 ? 2 : 1);
+ {
+ /* Pointers use 1 stack slot no matter what the target's
+ pointer size is. */
+ if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE)
+ NOTE_POP (1);
+ else
+ NOTE_POP (TYPE_PRECISION (TREE_TYPE (exp)) > 32 ? 2 : 1);
+ }
}
break;
case CASE_EXPR:
--
Anthony Green Red Hat
Sunnyvale, California