PATCH: makes pj backend compile again.
Steve Chamberlain
sac@transmeta.com
Mon Feb 28 17:33:00 GMT 2000
This patch makes the picoJava backend compile again.
2000-02-28 Steve Chamberlain <sac@pobox.com>
* pj.c (pj_expand_prologue): current_function->args_info is
now current_function_args_info.
* pj.h (STORE_FLAG_VALUE, USER_LABEL_PREFIX,
LOCAL_LABEL_PREFIX, ASM_GENERATE_INTERNAL_LABEL,
ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_SKIP): Define.
Index: config/pj/pj.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pj/pj.c,v
retrieving revision 1.2
diff -u -p -r1.2 pj.c
--- pj.c 2000/01/19 22:39:31 1.2
+++ pj.c 2000/02/29 01:28:54
@@ -900,18 +900,18 @@ pj_expand_prologue ()
{
int i;
int off = 0;
- int arg_words = current_function->args_info.named_words;
+ int arg_words = current_function_args_info.named_words;
memset (pj_si_vars_offset_vec, -1, sizeof (pj_si_vars_offset_vec));
memset (pj_di_vars_offset_vec, -1, sizeof (pj_di_vars_offset_vec));
/* Work out the register numbers of the named arguments. */
- for (i = 0; i < current_function->args_info.named_words; i++)
+ for (i = 0; i < current_function_args_info.named_words; i++)
{
pj_debugreg_renumber_vec[I0_REG + i]
- = off + R0_REG + current_function->args_info.arg_adjust[i];
+ = off + R0_REG + current_function_args_info.arg_adjust[i];
pj_si_vars_offset_vec[I0_REG + i]
- = off + current_function->args_info.arg_adjust[i];
+ = off + current_function_args_info.arg_adjust[i];
pj_di_vars_offset_vec[I0_REG + i] = off;
off++;
}
@@ -1009,7 +1009,7 @@ pj_expand_epilogue ()
if (current_function_varargs || current_function_stdarg)
emit_insn (gen_varargs_finish
- (GEN_INT (current_function->args_info.named_words + 1)));
+ (GEN_INT (current_function_args_info.named_words + 1)));
emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode, OPTOP_REG)));
}
Index: config/pj/pj.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pj/pj.h,v
retrieving revision 1.1
diff -u -p -r1.1 pj.h
--- pj.h 2000/01/05 05:57:17 1.1
+++ pj.h 2000/02/29 01:28:55
@@ -923,6 +923,11 @@ struct pj_args
#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
+/* We assume that the store-condition-codes instructions store 0 for false
+ and some other value for true. This is the value stored for true. */
+
+#define STORE_FLAG_VALUE 1
+
/* Define if loading short immediate values into registers sign extends. */
#define SHORT_IMMEDIATES_SIGN_EXTEND
@@ -1144,14 +1149,21 @@ do { fputs (current_function_varargs ||
/* The prefix to add to user-visible assembler symbols. */
-//#define USER_LABEL_PREFIX ""
+#define USER_LABEL_PREFIX ""
/* The prefix to add to an internally generated label. */
-//#define LOCAL_LABEL_PREFIX ""
+#define LOCAL_LABEL_PREFIX ""
-/* Construct a private name. */
+/* Make an internal label into a string. */
+#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
+ sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
+
+/* Output an internal label definition. */
+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
+ asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
+/* Construct a private name. */
#define ASM_FORMAT_PRIVATE_NAME(OUTVAR,NAME,NUMBER) \
((OUTVAR) = (char *) alloca (strlen (NAME) + 10), \
sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER)))
@@ -1199,6 +1211,12 @@ do { char dstr[30];
#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
fprintf ((STREAM), "\t.byte\t%d\n", (VALUE))
+/* This is how to output an assembler line
+ that says to advance the location counter by SIZE bytes. */
+
+#define ASM_OUTPUT_SKIP(FILE,SIZE) \
+ fprintf ((FILE), "\t.space %d\n", (SIZE))
+
/* This says how to output an assembler line
to define a global common symbol. */
@@ -1322,8 +1340,8 @@ do {
/* Define the codes that are matched by predicates in pj.c. */
#define PREDICATE_CODES \
- {"pj_dest_operand", {SUBREG, REG, MEM,}}, \
- {"pj_signed_comparison_operator", {EQ, NE, LE, LT, GE, GT}}, \
+ {"pj_dest_operand", {SUBREG, REG, MEM}}, \
+ {"pj_signed_comparison_operator", {EQ, NE, LE, LT, GE,GT}}, \
{"pj_unsigned_comparison_operator", {LEU, LTU, GEU, GTU}}, \
{"pj_source_operand", {CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, \
More information about the Gcc-patches
mailing list