re PR java/5812 (GCJ 3.0.2 segfaults on class file from Sun JDK 1.3 compiler)
Fix for PR java/5812. * expr.c (build_java_jsr): Take pc arguments, and do lookup_label gere instead of in JSR macro. Likewise with load_type_state call. Do the latter on if the return_pc has been verified (the jsr returns). (JSR): No just call build_java_jsr. From-SVN: r50455
This commit is contained in:
parent
c51d95ecef
commit
5295f849ca
@ -1,3 +1,11 @@
|
|||||||
|
2002-03-08 Per Bothner <per@bothner.com>
|
||||||
|
|
||||||
|
Fix for PR java/5812.
|
||||||
|
* expr.c (build_java_jsr): Take pc arguments, and do lookup_label
|
||||||
|
gere instead of in JSR macro. Likewise with load_type_state call.
|
||||||
|
Do the latter on if the return_pc has been verified (the jsr returns).
|
||||||
|
(JSR): No just call build_java_jsr.
|
||||||
|
|
||||||
2002-03-07 Jeff Sturm <jsturm@one-point.com>
|
2002-03-07 Jeff Sturm <jsturm@one-point.com>
|
||||||
|
|
||||||
* java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
|
* java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
|
||||||
|
@ -48,7 +48,7 @@ static tree pop_value PARAMS ((tree));
|
|||||||
static void java_stack_swap PARAMS ((void));
|
static void java_stack_swap PARAMS ((void));
|
||||||
static void java_stack_dup PARAMS ((int, int));
|
static void java_stack_dup PARAMS ((int, int));
|
||||||
static void build_java_athrow PARAMS ((tree));
|
static void build_java_athrow PARAMS ((tree));
|
||||||
static void build_java_jsr PARAMS ((tree, tree));
|
static void build_java_jsr PARAMS ((int, int));
|
||||||
static void build_java_ret PARAMS ((tree));
|
static void build_java_ret PARAMS ((tree));
|
||||||
static void expand_java_multianewarray PARAMS ((tree, int));
|
static void expand_java_multianewarray PARAMS ((tree, int));
|
||||||
static void expand_java_arraystore PARAMS ((tree));
|
static void expand_java_arraystore PARAMS ((tree));
|
||||||
@ -607,15 +607,18 @@ build_java_athrow (node)
|
|||||||
/* Implementation for jsr/ret */
|
/* Implementation for jsr/ret */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_java_jsr (where, ret)
|
build_java_jsr (target_pc, return_pc)
|
||||||
tree where;
|
int target_pc, return_pc;
|
||||||
tree ret;
|
|
||||||
{
|
{
|
||||||
|
tree where = lookup_label (target_pc);
|
||||||
|
tree ret = lookup_label (return_pc);
|
||||||
tree ret_label = fold (build1 (ADDR_EXPR, return_address_type_node, ret));
|
tree ret_label = fold (build1 (ADDR_EXPR, return_address_type_node, ret));
|
||||||
push_value (ret_label);
|
push_value (ret_label);
|
||||||
flush_quick_stack ();
|
flush_quick_stack ();
|
||||||
emit_jump (label_rtx (where));
|
emit_jump (label_rtx (where));
|
||||||
expand_label (ret);
|
expand_label (ret);
|
||||||
|
if (instruction_bits [return_pc] & BCODE_VERIFIED)
|
||||||
|
load_type_state (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2968,13 +2971,8 @@ process_jvm_instruction (PC, byte_ops, length)
|
|||||||
build_java_ret (find_local_variable (index, ptr_type_node, oldpc)); \
|
build_java_ret (find_local_variable (index, ptr_type_node, oldpc)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define JSR(OPERAND_TYPE, OPERAND_VALUE) \
|
#define JSR(OPERAND_TYPE, OPERAND_VALUE) \
|
||||||
{ \
|
build_java_jsr (oldpc+OPERAND_VALUE, PC);
|
||||||
tree where = lookup_label (oldpc+OPERAND_VALUE); \
|
|
||||||
tree ret = lookup_label (PC); \
|
|
||||||
build_java_jsr (where, ret); \
|
|
||||||
load_type_state (ret); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Push a constant onto the stack. */
|
/* Push a constant onto the stack. */
|
||||||
#define PUSHC(OPERAND_TYPE, OPERAND_VALUE) \
|
#define PUSHC(OPERAND_TYPE, OPERAND_VALUE) \
|
||||||
|
Loading…
Reference in New Issue
Block a user