From 9ba3994aa3584c234fa59359fc50877a77c4d25c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 4 Mar 1998 18:50:12 -0800 Subject: [PATCH] alpha.h (TARGET_WINDOWS_NT, [...]): Just make them real constants, since they can't be changed. * alpha/alpha.h (TARGET_WINDOWS_NT, TARGET_OPEN_VMS): Just make them real constants, since they can't be changed. (TARGET_AS_CAN_SUBTRACT_LABELS): New. * alpha/alpha.md (builtin_setjmp_receiver): Use it. * alpha/osf.h (TARGET_AS_CAN_SUBTRACT_LABELS): New. * alpha/osf2or3.h (TARGET_AS_CAN_SUBTRACT_LABELS): New. * alpha/vms.h (TARGET_OPEN_VMS): New. * alpha/win-nt.h (TARGET_WINDOWS_NT): New. From-SVN: r18417 --- gcc/ChangeLog | 11 +++++++++++ gcc/config/alpha/alpha.h | 25 ++++++++++++++----------- gcc/config/alpha/alpha.md | 9 +++++++-- gcc/config/alpha/osf.h | 6 +++++- gcc/config/alpha/osf2or3.h | 6 ++++++ gcc/config/alpha/vms.h | 7 +++++-- gcc/config/alpha/win-nt.h | 7 +++++-- 7 files changed, 53 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f5bb3fc1e3a..59167e5ed3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +Thu Mar 5 02:45:48 1998 Richard Henderson + + * alpha/alpha.h (TARGET_WINDOWS_NT, TARGET_OPEN_VMS): Just make them + real constants, since they can't be changed. + (TARGET_AS_CAN_SUBTRACT_LABELS): New. + * alpha/alpha.md (builtin_setjmp_receiver): Use it. + * alpha/osf.h (TARGET_AS_CAN_SUBTRACT_LABELS): New. + * alpha/osf2or3.h (TARGET_AS_CAN_SUBTRACT_LABELS): New. + * alpha/vms.h (TARGET_OPEN_VMS): New. + * alpha/win-nt.h (TARGET_WINDOWS_NT): New. + Thu Mar 5 02:41:27 1998 Richard Henderson * reload.c (find_reloads): Always force (subreg (mem)) to be diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 4386084416e..0e02a640801 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha. - Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. @@ -122,22 +122,12 @@ extern enum alpha_fp_trap_mode alpha_fptm; #define MASK_IEEE_WITH_INEXACT 32 #define TARGET_IEEE_WITH_INEXACT (target_flags & MASK_IEEE_WITH_INEXACT) -/* This means we are compiling for Windows NT. */ - -#define MASK_WINDOWS_NT 64 -#define TARGET_WINDOWS_NT (target_flags & MASK_WINDOWS_NT) - /* This means we must construct all constants rather than emitting them as literal data. */ #define MASK_BUILD_CONSTANTS 128 #define TARGET_BUILD_CONSTANTS (target_flags & MASK_BUILD_CONSTANTS) -/* This means we are compiling for openVMS. */ - -#define MASK_OPEN_VMS 256 -#define TARGET_OPEN_VMS (target_flags & MASK_OPEN_VMS) - /* This means we handle floating points in VAX F- (float) or G- (double) Format. */ @@ -170,6 +160,19 @@ extern enum alpha_fp_trap_mode alpha_fptm; #define MASK_SUPPORT_ARCH 32768 #define TARGET_SUPPORT_ARCH (target_flags & MASK_SUPPORT_ARCH) +/* These are for target os support and cannot be changed at runtime. */ +#ifndef TARGET_WINDOWS_NT +#define TARGET_WINDOWS_NT 0 +#endif +#ifndef TARGET_OPEN_VMS +#define TARGET_OPEN_VMS 0 +#endif + +#ifndef TARGET_AS_CAN_SUBTRACT_LABELS +#define TARGET_AS_CAN_SUBTRACT_LABELS TARGET_GAS +#endif + + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index b1cbc3bcbfd..7c3ec5237e5 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -1,5 +1,5 @@ ;; Machine description for DEC Alpha for GNU C compiler -;; Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; This file is part of GNU CC. @@ -5076,9 +5076,14 @@ (define_insn "builtin_setjmp_receiver" [(unspec_volatile [(match_operand 0 "" "")] 2)] - "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" + "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT && TARGET_AS_CAN_SUBTRACT_LABELS" "\\n$LSJ%=:\;ldgp $29,$LSJ%=-%l0($27)") +(define_insn "" + [(unspec_volatile [(match_operand 0 "" "")] 2)] + "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" + "br $27,$LSJ%=\\n$LSJ%=:\;ldgp $29,0($27)") + (define_expand "nonlocal_goto_receiver" [(unspec_volatile [(const_int 0)] 1) (set (reg:DI 27) (mem:DI (reg:DI 29))) diff --git a/gcc/config/alpha/osf.h b/gcc/config/alpha/osf.h index eb7765aaf54..ae4170d25e3 100644 --- a/gcc/config/alpha/osf.h +++ b/gcc/config/alpha/osf.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1. - Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. @@ -19,6 +19,10 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* As of OSF 4.0, as can subtract adjacent labels. */ + +#undef TARGET_AS_CAN_SUBTRACT_LABELS +#define TARGET_AS_CAN_SUBTRACT_LABELS 1 /* Names to predefine in the preprocessor for this target machine. */ diff --git a/gcc/config/alpha/osf2or3.h b/gcc/config/alpha/osf2or3.h index 03bc58a61e3..5abdb0e98b1 100644 --- a/gcc/config/alpha/osf2or3.h +++ b/gcc/config/alpha/osf2or3.h @@ -22,3 +22,9 @@ Boston, MA 02111-1307, USA. */ #undef LIB_SPEC #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc" + +/* As of OSF 3.2, as still can't subtract adjacent labels. */ + +#undef TARGET_AS_CAN_SUBTRACT_LABELS +#define TARGET_AS_CAN_SUBTRACT_LABELS 0 + diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index c149ecf4211..2ef5de1ada1 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -1,5 +1,5 @@ /* Output variables, constants and external declarations, for GNU compiler. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -75,7 +75,10 @@ Boston, MA 02111-1307, USA. */ #define DOLLARS_IN_IDENTIFIERS 2 #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FP|MASK_FPREGS|MASK_GAS|MASK_OPEN_VMS) +#define TARGET_DEFAULT (MASK_FP|MASK_FPREGS|MASK_GAS) +#undef TARGET_OPEN_VMS +#define TARGET_OPEN_VMS 1 + #undef TARGET_NAME #define TARGET_NAME "OpenVMS/Alpha" #undef TARGET_VERSION diff --git a/gcc/config/alpha/win-nt.h b/gcc/config/alpha/win-nt.h index cd21c30a45c..30c8d6d07cd 100644 --- a/gcc/config/alpha/win-nt.h +++ b/gcc/config/alpha/win-nt.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for DEC Alpha running Windows/NT. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GNU CC. @@ -21,7 +21,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_WINDOWS_NT) +#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS) + +#undef TARGET_WINDOWS_NT +#define TARGET_WINDOWS_NT 1 /* Names to predefine in the preprocessor for this target machine. */ -- 2.30.2