From patchwork Tue Mar 22 22:39:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 87966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 6641AB6F77 for ; Wed, 23 Mar 2011 09:39:55 +1100 (EST) Received: (qmail 3460 invoked by alias); 22 Mar 2011 22:39:46 -0000 Received: (qmail 3108 invoked by uid 22791); 22 Mar 2011 22:39:38 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_SM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 22:39:11 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2MMd9Th029960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Mar 2011 18:39:09 -0400 Received: from anchor.twiddle.home (ovpn-113-104.phx2.redhat.com [10.3.113.104]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2MMd80s021338 for ; Tue, 22 Mar 2011 18:39:09 -0400 Message-ID: <4D89250C.4000907@redhat.com> Date: Tue, 22 Mar 2011 15:39:08 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: GCC Patches Subject: [alpha] purge windows nt code from the backend X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Sadly, this lag is even longer than the cray port. Best I can tell, 2001-02-24 Zack Weinberg (i750a-*-*): Error here if hosting on i750a. (alpha*-*-winnt*, ix86-*-winnt3*): Remove stanzas entirely. ... I.e. more than a decade ago the configury was removed. r~ * config/alpha/alpha.c (alpha_expand_prologue): Don't test TARGET_ABI_WINDOWS_NT. (alpha_output_function_end_prologue): Likewise. * config/alpha/alpha.h (TARGET_ABI_OSF): Likewise. (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (call, call_value, tablejump): Likewise. (trap, *movsi_nt_vms): Likewise. (call_nt, call_value_nt, *call_nt_1, *call_value_nt_1): Remove. (*tablejump_osf_nt_internal): Remove. * config/alpha/predicates.md (input_operand): Only test Pmode. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 1e3c3a9..b9a86e5 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -7769,19 +7769,11 @@ alpha_expand_prologue (void) emit_move_insn (last, const0_rtx); } - if (TARGET_ABI_WINDOWS_NT || flag_stack_check) + if (flag_stack_check) { - /* For NT stack unwind (done by 'reverse execution'), it's - not OK to take the result of a loop, even though the value - is already in ptr, so we reload it via a single operation - and subtract it to sp. - - Same if -fstack-check is specified, because the probed stack - size is not equal to the frame size. - - Yes, that's correct -- we have to reload the whole constant - into a temporary via ldah+lda then subtract from sp. */ - + /* If -fstack-check is specified we have to load the entire + constant into a register and subtract from the sp in one go, + because the probed stack size is not equal to the frame size. */ HOST_WIDE_INT lo, hi; lo = ((frame_size & 0xffff) ^ 0x8000) - 0x8000; hi = frame_size - lo; @@ -8134,8 +8126,6 @@ alpha_output_function_end_prologue (FILE *file) { if (TARGET_ABI_OPEN_VMS) fputs ("\t.prologue\n", file); - else if (TARGET_ABI_WINDOWS_NT) - fputs ("\t.prologue 0\n", file); else if (!flag_inhibit_size_directive) fprintf (file, "\t.prologue %d\n", alpha_function_needs_gp || cfun->is_thunk); diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index f116f1f..14fc731 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -146,9 +146,8 @@ extern enum alpha_fp_trap_mode alpha_fptm; #define TARGET_FP (!TARGET_SOFT_FP) /* These are for target os support and cannot be changed at runtime. */ -#define TARGET_ABI_WINDOWS_NT 0 -#define TARGET_ABI_OPEN_VMS 0 -#define TARGET_ABI_OSF (!TARGET_ABI_WINDOWS_NT && !TARGET_ABI_OPEN_VMS) +#define TARGET_ABI_OPEN_VMS 0 +#define TARGET_ABI_OSF (!TARGET_ABI_OPEN_VMS) #ifndef TARGET_AS_CAN_SUBTRACT_LABELS #define TARGET_AS_CAN_SUBTRACT_LABELS TARGET_GAS @@ -1123,8 +1122,7 @@ do { \ /* This is how to output an element of a case-vector that is relative. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.%s $L%d\n", TARGET_ABI_WINDOWS_NT ? "long" : "gprel32", \ - (VALUE)) + fprintf (FILE, "\t.gprel32 $L%d\n", (VALUE)) /* This is how to output an assembler line that says to advance the location counter diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 80e8ea4..d25af88 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -4252,9 +4252,7 @@ (use (match_operand 3 "" ""))] "" { - if (TARGET_ABI_WINDOWS_NT) - emit_call_insn (gen_call_nt (operands[0], operands[1])); - else if (TARGET_ABI_OPEN_VMS) + if (TARGET_ABI_OPEN_VMS) emit_call_insn (gen_call_vms (operands[0], operands[2])); else emit_call_insn (gen_call_osf (operands[0], operands[1])); @@ -4285,19 +4283,6 @@ operands[0] = copy_to_mode_reg (Pmode, operands[0]); }) -(define_expand "call_nt" - [(parallel [(call (mem:DI (match_operand 0 "" "")) - (match_operand 1 "" "")) - (clobber (reg:DI 26))])] - "" -{ - gcc_assert (MEM_P (operands[0])); - - operands[0] = XEXP (operands[0], 0); - if (GET_CODE (operands[0]) != SYMBOL_REF && !REG_P (operands[0])) - operands[0] = force_reg (DImode, operands[0]); -}) - ;; ;; call openvms/alpha ;; op 0: symbol ref for called function @@ -4344,9 +4329,7 @@ (use (match_operand 4 "" ""))] "" { - if (TARGET_ABI_WINDOWS_NT) - emit_call_insn (gen_call_value_nt (operands[0], operands[1], operands[2])); - else if (TARGET_ABI_OPEN_VMS) + if (TARGET_ABI_OPEN_VMS) emit_call_insn (gen_call_value_vms (operands[0], operands[1], operands[3])); else @@ -4381,20 +4364,6 @@ operands[1] = copy_to_mode_reg (Pmode, operands[1]); }) -(define_expand "call_value_nt" - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand 1 "" "")) - (match_operand 2 "" ""))) - (clobber (reg:DI 26))])] - "" -{ - gcc_assert (MEM_P (operands[1])); - - operands[1] = XEXP (operands[1], 0); - if (GET_CODE (operands[1]) != SYMBOL_REF && !REG_P (operands[1])) - operands[1] = force_reg (DImode, operands[1]); -}) - (define_expand "call_value_vms" [(parallel [(set (match_operand 0 "" "") (call (mem:DI (match_operand:DI 1 "" "")) @@ -4601,18 +4570,6 @@ [(set_attr "type" "jsr") (set_attr "length" "*,8")]) -(define_insn "*call_nt_1" - [(call (mem:DI (match_operand:DI 0 "call_operand" "r,R,s")) - (match_operand 1 "" "")) - (clobber (reg:DI 26))] - "TARGET_ABI_WINDOWS_NT" - "@ - jsr $26,(%0) - bsr $26,%0 - jsr $26,%0" - [(set_attr "type" "jsr") - (set_attr "length" "*,*,12")]) - ; GAS relies on the order and position of instructions output below in order ; to generate relocs for VMS link to potentially optimize the call. ; Please do not molest. @@ -4708,13 +4665,7 @@ (use (label_ref:DI (match_operand 1 "" "")))])] "" { - if (TARGET_ABI_WINDOWS_NT) - { - rtx dest = gen_reg_rtx (DImode); - emit_insn (gen_extendsidi2 (dest, operands[0])); - operands[0] = dest; - } - else if (TARGET_ABI_OSF) + if (TARGET_ABI_OSF) { rtx dest = gen_reg_rtx (DImode); emit_insn (gen_extendsidi2 (dest, operands[0])); @@ -4723,18 +4674,6 @@ } }) -(define_insn "*tablejump_osf_nt_internal" - [(set (pc) - (match_operand:DI 0 "register_operand" "r")) - (use (label_ref:DI (match_operand 1 "" "")))] - "(TARGET_ABI_OSF || TARGET_ABI_WINDOWS_NT) - && alpha_tablejump_addr_vec (insn)" -{ - operands[2] = alpha_tablejump_best_label (insn); - return "jmp $31,(%0),%2"; -} - [(set_attr "type" "ibr")]) - (define_insn "*tablejump_internal" [(set (pc) (match_operand:DI 0 "register_operand" "r")) @@ -4752,12 +4691,9 @@ [(set_attr "type" "callpal")]) ;; BUGCHK is documented common to OSF/1 and VMS PALcode. -;; NT does not document anything at 0x81 -- presumably it would generate -;; the equivalent of SIGILL, but this isn't that important. -;; ??? Presuming unicosmk uses either OSF/1 or VMS PALcode. (define_insn "trap" [(trap_if (const_int 1) (const_int 0))] - "!TARGET_ABI_WINDOWS_NT" + "" "call_pal 0x81" [(set_attr "type" "callpal")]) @@ -4972,7 +4908,7 @@ (define_insn "*movsi_nt_vms" [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m") (match_operand:SI 1 "input_operand" "rJ,K,L,s,n,m,rJ"))] - "(TARGET_ABI_WINDOWS_NT || TARGET_ABI_OPEN_VMS) + "TARGET_ABI_OPEN_VMS && (register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode))" "@ @@ -7670,19 +7606,6 @@ [(set_attr "type" "jsr") (set_attr "length" "*,8")]) -(define_insn "*call_value_nt_1" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "r,R,s")) - (match_operand 2 "" ""))) - (clobber (reg:DI 26))] - "TARGET_ABI_WINDOWS_NT" - "@ - jsr $26,(%1) - bsr $26,%1 - jsr $26,%1" - [(set_attr "type" "jsr") - (set_attr "length" "*,*,12")]) - ; GAS relies on the order and position of instructions output below in order ; to generate relocs for VMS link to potentially optimize the call. ; Please do not molest. diff --git a/gcc/config/alpha/predicates.md b/gcc/config/alpha/predicates.md index e41b070..9514b8a 100644 --- a/gcc/config/alpha/predicates.md +++ b/gcc/config/alpha/predicates.md @@ -195,9 +195,7 @@ || gotdtp_symbolic_operand (op, mode) || gottp_symbolic_operand (op, mode)); } - - /* This handles both the Windows/NT and OSF cases. */ - return mode == ptr_mode || mode == DImode; + return mode == Pmode; case HIGH: return (TARGET_EXPLICIT_RELOCS