diff options
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/linux.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/linux64.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 35 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 7 | ||||
-rw-r--r-- | gcc/config/sparc/sysv4.h | 10 | ||||
-rw-r--r-- | gcc/config/sparc/xm-linux.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/xm-sol2.h | 2 |
7 files changed, 25 insertions, 35 deletions
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index f9f869320c0..a5807ecc632 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -1,5 +1,5 @@ /* Definitions for SPARC running Linux-based GNU systems with ELF. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by Eddie C. Dost (ecd@skynet.be) This file is part of GNU CC. diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index aba0417c850..b676e72a50f 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -1,5 +1,5 @@ /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF. - Copyright 1996, 1997 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by David S. Miller (davem@caip.rutgers.edu) This file is part of GNU CC. diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 327ee2730b5..36ccb15095f 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1505,6 +1505,10 @@ pic_setup_code () start_sequence (); + /* If -O0, show the PIC register remains live before this. */ + if (obey_regdecls) + emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx)); + l1 = gen_label_rtx (); pic_pc_rtx = gen_rtx (CONST, Pmode, @@ -5124,14 +5128,14 @@ sparc_type_code (type) register tree type; { register unsigned long qualifiers = 0; - register unsigned shift = 6; + register unsigned shift; /* Only the first 30 bits of the qualifier are valid. We must refrain from setting more, since some assemblers will give an error for this. Also, we must be careful to avoid shifts of 32 bits or more to avoid getting unpredictable results. */ - for (;;) + for (shift = 6; shift < 30; shift += 2, type = TREE_TYPE (type)) { switch (TREE_CODE (type)) { @@ -5139,27 +5143,18 @@ sparc_type_code (type) return qualifiers; case ARRAY_TYPE: - if (shift < 30) - qualifiers |= (3 << shift); - shift += 2; - type = TREE_TYPE (type); + qualifiers |= (3 << shift); break; case FUNCTION_TYPE: case METHOD_TYPE: - if (shift < 30) - qualifiers |= (2 << shift); - shift += 2; - type = TREE_TYPE (type); + qualifiers |= (2 << shift); break; case POINTER_TYPE: case REFERENCE_TYPE: case OFFSET_TYPE: - if (shift < 30) - qualifiers |= (1 << shift); - shift += 2; - type = TREE_TYPE (type); + qualifiers |= (1 << shift); break; case RECORD_TYPE: @@ -5179,10 +5174,7 @@ sparc_type_code (type) /* If this is a range type, consider it to be the underlying type. */ if (TREE_TYPE (type) != 0) - { - type = TREE_TYPE (type); - break; - } + break; /* Carefully distinguish all the standard types of C, without messing up if the language is not C. We do this by @@ -5208,6 +5200,11 @@ sparc_type_code (type) return (qualifiers | (TREE_UNSIGNED (type) ? 15 : 5)); case REAL_TYPE: + /* If this is a range type, consider it to be the underlying + type. */ + if (TREE_TYPE (type) != 0) + break; + /* Carefully distinguish all the standard types of C, without messing up if the language is not C. */ @@ -5234,6 +5231,8 @@ sparc_type_code (type) abort (); /* Not a type! */ } } + + return qualifiers; } /* Nested function support. */ diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index ce57192135b..1659e68b22e 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for Sun SPARC. - Copyright (C) 1987, 88, 89, 92, 94-7, 1998 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92, 94-97, 1998 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com). 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, at Cygnus Support. @@ -2162,9 +2162,8 @@ extern struct rtx_def *sparc_builtin_saveregs (); is defined, then all arguments are treated as named. Otherwise, all named arguments except the last are treated as named. For the v9 we want NAMED to mean what it says it means. */ -/* ??? This needn't be set for v8, but I don't want to make this runtime - selectable if I don't have to. */ -#define STRICT_ARGUMENT_NAMING + +#define STRICT_ARGUMENT_NAMING TARGET_V9 /* Generate RTL to flush the register windows so as to make arbitrary frames available. */ diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index e8a9a603b6f..3a1a82d9fe9 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -1,7 +1,6 @@ /* Target definitions for GNU compiler for Sparc running System V.4 - Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - - Written by Ron Guilmette (rfg@netcom.com). + Copyright (C) 1991, 92, 95, 96, 97, 1998 Free Software Foundation, Inc. + Contributed by Ron Guilmette (rfg@monkeys.com). This file is part of GNU CC. @@ -136,10 +135,7 @@ do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3); \ f0-f31 32-63 40-71 */ -#define DBX_REGISTER_NUMBER(REGNO) \ - (((REGNO) < 32) ? (REGNO) \ - : ((REGNO) < 63) ? ((REGNO) + 8) \ - : (abort (), 0)) +#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 32 ? (REGNO) : (REGNO) + 8) /* A set of symbol definitions for assembly pseudo-ops which will get us switched to various sections of interest. These are used diff --git a/gcc/config/sparc/xm-linux.h b/gcc/config/sparc/xm-linux.h index f68f5715662..691c7d16784 100644 --- a/gcc/config/sparc/xm-linux.h +++ b/gcc/config/sparc/xm-linux.h @@ -24,5 +24,3 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <string.h> #endif - -#include <xm-linux.h> diff --git a/gcc/config/sparc/xm-sol2.h b/gcc/config/sparc/xm-sol2.h index a799f12b946..5613b086b57 100644 --- a/gcc/config/sparc/xm-sol2.h +++ b/gcc/config/sparc/xm-sol2.h @@ -1,5 +1,3 @@ -#include "sparc/xm-sysv4.h" - /* If not compiled with GNU C, include the system's <alloca.h> header. */ #ifndef __GNUC__ #include <alloca.h> |