Commit e7a42772 by Jan Brittenson

changed bytecode rtx structure references into macros

From-SVN: r5435
parent 5b7ded0d
...@@ -5738,13 +5738,14 @@ bc_expand_expr (exp) ...@@ -5738,13 +5738,14 @@ bc_expand_expr (exp)
abort (); abort ();
#if 0 #if 0
if (DECL_RTL (exp)->label) if (BYTECODE_LABEL (DECL_RTL (exp)))
bc_load_externaddr (DECL_RTL (exp)); bc_load_externaddr (DECL_RTL (exp));
else else
bc_load_localaddr (DECL_RTL (exp)); bc_load_localaddr (DECL_RTL (exp));
#endif #endif
if (TREE_PUBLIC (exp)) if (TREE_PUBLIC (exp))
bc_load_externaddr_id (DECL_ASSEMBLER_NAME (exp), DECL_RTL (exp)->offset); bc_load_externaddr_id (DECL_ASSEMBLER_NAME (exp),
BYTECODE_BC_LABEL (DECL_RTL (exp))->offset);
else else
bc_load_localaddr (DECL_RTL (exp)); bc_load_localaddr (DECL_RTL (exp));
...@@ -9103,7 +9104,8 @@ bc_load_externaddr (externaddr) ...@@ -9103,7 +9104,8 @@ bc_load_externaddr (externaddr)
rtx externaddr; rtx externaddr;
{ {
bc_emit_bytecode (constP); bc_emit_bytecode (constP);
bc_emit_code_labelref (externaddr->label, externaddr->offset); bc_emit_code_labelref (BYTECODE_LABEL (externaddr),
BYTECODE_BC_LABEL (externaddr)->offset);
#ifdef DEBUG_PRINT_CODE #ifdef DEBUG_PRINT_CODE
fputc ('\n', stderr); fputc ('\n', stderr);
...@@ -9144,7 +9146,7 @@ void ...@@ -9144,7 +9146,7 @@ void
bc_load_localaddr (localaddr) bc_load_localaddr (localaddr)
rtx localaddr; rtx localaddr;
{ {
bc_emit_instruction (localP, (HOST_WIDE_INT) localaddr->offset); bc_emit_instruction (localP, (HOST_WIDE_INT) BYTECODE_BC_LABEL (localaddr)->offset);
} }
...@@ -9154,7 +9156,8 @@ void ...@@ -9154,7 +9156,8 @@ void
bc_load_parmaddr (parmaddr) bc_load_parmaddr (parmaddr)
rtx parmaddr; rtx parmaddr;
{ {
bc_emit_instruction (argP, (HOST_WIDE_INT) parmaddr->offset / BITS_PER_UNIT); bc_emit_instruction (argP, ((HOST_WIDE_INT) BYTECODE_BC_LABEL (parmaddr)->offset
/ BITS_PER_UNIT));
} }
...@@ -9301,7 +9304,8 @@ bc_expand_address (exp) ...@@ -9301,7 +9304,8 @@ bc_expand_address (exp)
case FUNCTION_DECL: case FUNCTION_DECL:
bc_load_externaddr_id (DECL_ASSEMBLER_NAME (exp), DECL_RTL (exp)->offset); bc_load_externaddr_id (DECL_ASSEMBLER_NAME (exp),
BYTECODE_BC_LABEL (DECL_RTL (exp))->offset);
break; break;
case PARM_DECL: case PARM_DECL:
...@@ -9328,12 +9332,13 @@ bc_expand_address (exp) ...@@ -9328,12 +9332,13 @@ bc_expand_address (exp)
case VAR_DECL: case VAR_DECL:
#if 0 #if 0
if (DECL_RTL (exp)->label) if (BYTECODE_LABEL (DECL_RTL (exp)))
bc_load_externaddr (DECL_RTL (exp)); bc_load_externaddr (DECL_RTL (exp));
#endif #endif
if (DECL_EXTERNAL (exp)) if (DECL_EXTERNAL (exp))
bc_load_externaddr_id (DECL_ASSEMBLER_NAME (exp), DECL_RTL (exp)->offset); bc_load_externaddr_id (DECL_ASSEMBLER_NAME (exp),
BYTECODE_BC_OFFSET (DECL_RTL (exp)));
else else
bc_load_localaddr (DECL_RTL (exp)); bc_load_localaddr (DECL_RTL (exp));
...@@ -9355,7 +9360,7 @@ bc_expand_address (exp) ...@@ -9355,7 +9360,7 @@ bc_expand_address (exp)
bc_emit_bytecode (constP); bc_emit_bytecode (constP);
r = output_constant_def (exp); r = output_constant_def (exp);
bc_emit_code_labelref (r->label, r->offset); bc_emit_code_labelref (BYTECODE_LABEL (r), BYTECODE_BC_LABEL (r)->offset);
#ifdef DEBUG_PRINT_CODE #ifdef DEBUG_PRINT_CODE
fputc ('\n', stderr); fputc ('\n', stderr);
......
...@@ -4590,7 +4590,8 @@ bc_expand_function_start (subr, parms_have_cleanups) ...@@ -4590,7 +4590,8 @@ bc_expand_function_start (subr, parms_have_cleanups)
++nlab; ++nlab;
name = (char *) obstack_copy0 (&permanent_obstack, label, strlen (label)); name = (char *) obstack_copy0 (&permanent_obstack, label, strlen (label));
this_function_callinfo = bc_gen_rtx (name, 0, (struct bc_label *) 0); this_function_callinfo = bc_gen_rtx (name, 0, (struct bc_label *) 0);
this_function_bytecode = bc_emit_trampoline (this_function_callinfo->label); this_function_bytecode =
bc_emit_trampoline (BYTECODE_LABEL (this_function_callinfo));
} }
...@@ -4616,12 +4617,12 @@ bc_expand_function_end () ...@@ -4616,12 +4617,12 @@ bc_expand_function_end ()
/* If this changes also make sure to change bc-interp.h! */ /* If this changes also make sure to change bc-interp.h! */
bc_emit_const_labeldef (this_function_callinfo->label); bc_emit_const_labeldef (BYTECODE_LABEL (this_function_callinfo));
bc_emit_const ((char *) &max_stack_depth, sizeof max_stack_depth); bc_emit_const ((char *) &max_stack_depth, sizeof max_stack_depth);
bc_emit_const ((char *) &local_vars_size, sizeof local_vars_size); bc_emit_const ((char *) &local_vars_size, sizeof local_vars_size);
bc_emit_const_labelref (this_function_bytecode, 0); bc_emit_const_labelref (this_function_bytecode, 0);
bc_emit_const_labelref (ptrconsts, 0); bc_emit_const_labelref (ptrconsts, 0);
bc_emit_const_labelref (this_function_calldesc->label, 0); bc_emit_const_labelref (BYTECODE_LABEL (this_function_calldesc), 0);
} }
......
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