--- gcc/config/convex.h 2018/04/24 17:51:37 1.1.1.1 +++ gcc/config/convex.h 2018/04/24 18:06:02 1.1.1.4 @@ -69,7 +69,7 @@ extern char *output_call (); #define TARGET_C2 (target_flags & 2) #define TARGET_C34 (target_flags & 4) #define TARGET_C38 (target_flags & 010) -#define TARGET_INDIRECTS (target_flags & 020) +#define TARGET_INDIRECTS (1) #define TARGET_ARGCOUNT (target_flags & 040) /* Macro to define tables used to set the flags. @@ -85,7 +85,7 @@ extern char *output_call (); { "c34", 006 }, \ { "c38", 012 }, \ { "noc1", -001 }, \ - { "noc2", -022 }, \ + { "noc2", -002 }, \ { "argcount", 040 }, \ { "noargcount", -040 }, \ { "", TARGET_DEFAULT }} @@ -112,7 +112,7 @@ extern char *output_call (); /* Define this if most significant word of a multiword number is numbered. */ #define WORDS_BIG_ENDIAN 1 -/* Number of bits in an addressible storage unit */ +/* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 /* Width in bits of a "word", which is the contents of a machine register. @@ -150,9 +150,9 @@ extern char *output_call (); /* beware of doubles in structs -- 64 is incompatible with pcc */ #define BIGGEST_ALIGNMENT 32 -/* Define this if move instructions will actually fail to work +/* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ -/* #define STRICT_ALIGNMENT */ +#define STRICT_ALIGNMENT 0 /* Define sizes of basic C types to conform to ordinary usage -- these types depend on BITS_PER_WORD otherwise. */ @@ -315,7 +315,10 @@ enum reg_class { /* S regs use the letter 'd' because 's' is taken. */ #define REG_CLASS_FROM_LETTER(C) \ - ((C) == 'a' ? A_REGS : (C) == 'd' ? S_REGS : NO_REGS) + ((C) == 'a' ? A_REGS : \ + (C) == 'd' ? S_REGS : \ + (C) == 'A' ? INDEX_REGS : \ + NO_REGS) /* The letters I, J, K, L and M in a register constraint string can be used to stand for particular ranges of immediate operands. @@ -399,7 +402,7 @@ enum reg_class { /* The standard Convex call, with arg count word, includes popping the args as part of the call template. We optionally omit the arg count word and let gcc combine the arg pops. */ -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) (TARGET_ARGCOUNT) +#define RETURN_POPS_ARGS(FUNTYPE, SIZE) (TARGET_ARGCOUNT ? (SIZE) : 0) /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). @@ -607,10 +610,14 @@ enum reg_class { /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */ -#define REG_OK_FOR_INDEX_P(X) (REGNO (X) > 8) +#define REG_OK_FOR_INDEX_P(X) \ + (REGNO (X) > 8 \ + && REGNO (X) != VIRTUAL_STACK_VARS_REGNUM \ + && REGNO (X) != VIRTUAL_STACK_DYNAMIC_REGNUM \ + && REGNO (X) != VIRTUAL_OUTGOING_ARGS_REGNUM) /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ -#define REG_OK_FOR_BASE_P(X) (REGNO (X) > 8) +#define REG_OK_FOR_BASE_P(X) REG_OK_FOR_INDEX_P (X) #else @@ -723,7 +730,7 @@ enum reg_class { /* Define if shifts truncate the shift count which implies one can omit a sign-extension or zero-extension of a shift count. */ -#define SHIFT_COUNT_TRUNCATED +/* #define SHIFT_COUNT_TRUNCATED */ /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */ @@ -751,7 +758,7 @@ enum reg_class { of a switch statement. If the code is computed here, return it with a return statement. Otherwise, break from the switch. */ -#define CONST_COSTS(RTX,CODE) \ +#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ case CONST: \ case LABEL_REF: \ case SYMBOL_REF: \ @@ -764,7 +771,7 @@ enum reg_class { switch on CODE. On C1 and C2, multiply is faster than shift. */ -#define RTX_COSTS(RTX,CODE) \ +#define RTX_COSTS(RTX,CODE,OUTER_CODE) \ case MULT: \ total = COSTS_N_INSNS (4); \ break; \ @@ -837,6 +844,12 @@ enum reg_class { #define ASM_APP_OFF ";NO_APP\n" +/* Output something following the gcc2_compiled tag to keep that label from + hiding a real function name for tools like adb and prof. */ + +#define ASM_IDENTIFY_GCC(FILE) \ + fprintf (FILE, "gcc2_compiled.:\n\tds.h 0\n"); + /* Alignment with Convex's assembler goes like this: .text can be .aligned up to a halfword. .data and .bss can be .aligned up to a longword. @@ -1164,20 +1177,17 @@ bss_section () \ #define SET_DECL_VINDEX(DECL, INDEX) \ (DECL_VINDEX (DECL) = (INDEX)) +#if 0 /* collect2.c should no longer need these. */ /* Defs for compiling collect2.c in -pcc mode during bootstrap. */ #ifdef COLLECT -#ifdef __STDC__ - -#define HAVE_STRERROR - -#else +#ifndef __STDC__ -#define vfprintf(file,fmt,args) _doprnt (fmt, args, file) #define WTERMSIG(x) (((union wait *) &(x))->w_termsig) #define WEXITSTATUS(x) (((union wait *) &(x))->w_retcode) #endif #endif /* COLLECT */ +#endif /* 0 */