Remove alpha-winnt code from the backend.

From-SVN: r171312
This commit is contained in:
Richard Henderson 2011-03-22 15:28:18 -07:00 committed by Richard Henderson
parent c59ddd2b82
commit 800d1de151
5 changed files with 26 additions and 104 deletions

View File

@ -1,3 +1,16 @@
2011-03-22 Richard Henderson <rth@redhat.com>
* 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 <joseph@codesourcery.com>
* config/alpha/alpha.c (alpha_handle_option): Access target_flags

View File

@ -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);

View File

@ -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

View File

@ -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.

View File

@ -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