From 1b803a4f58f81fc8c4a444ac0bfe9d6673d2a7e8 Mon Sep 17 00:00:00 2001 From: rth Date: Tue, 22 Mar 2011 22:28:18 +0000 Subject: [PATCH] Remove alpha-winnt code from the backend. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171312 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 13 +++++++ gcc/config/alpha/alpha.c | 18 ++------- gcc/config/alpha/alpha.h | 8 ++-- gcc/config/alpha/alpha.md | 87 +++--------------------------------------- gcc/config/alpha/predicates.md | 4 +- 5 files changed, 26 insertions(+), 104 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9f72500..5cc8ec5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-03-22 Richard Henderson + + * 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. + 2011-03-22 Joseph Myers * config/alpha/alpha.c (alpha_handle_option): Access target_flags diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index f97b2aa..2b2c3da 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -7777,19 +7777,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; @@ -8142,8 +8134,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 -- 2.7.4