This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Removing remaining bones of Windows NT on PowerPC
- To: gcc-patches at gcc dot gnu dot org
- Subject: Removing remaining bones of Windows NT on PowerPC
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Fri, 28 Jan 2000 17:21:35 -0800
I'm just about to do this, on the newppc branch. There wasn't much of
the port left after years of neglect...
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/rs6000-nont.patch==================
2000-01-28 Geoff Keating <geoffk@cygnus.com>
* ../../configure.in: Delete powerpcle-*-winnt*
and powerpcle-*-pe|powerpcle-*-cygwin*.
* ../../configure: Regenerated.
* cygwin.h: Delete.
* rs6000.h (OBJECT_WINDOWS_NT): Delete.
(TARGET_WINDOWS_NT): Delete.
(ABI_NT): Delete.
(CALL_NT_DLLIMPORT): Delete.
Delete NT-specific code.
* rs6000.md, rs6000.c, sysv4.h: Delete NT-specific code.
* win-nt.h: Delete.
* t-winnt: Delete.
* nt-ci.asm: Delete.
* nt-cn.asm: Delete.
* ntstack.asm: Delete.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.317.2.3
diff -p -u -u -p -r1.317.2.3 configure.in
--- configure.in 2000/01/20 02:21:53 1.317.2.3
+++ configure.in 2000/01/29 01:13:49
@@ -3088,27 +3088,6 @@ changequote([,])dnl
fi
extra_headers=ppc-asm.h
;;
- powerpcle-*-winnt* )
- tm_file=rs6000/win-nt.h
- tmake_file=rs6000/t-winnt
-# extra_objs=pe.o
- if test x$enable_threads = xyes; then
- thread_file='win32'
- fi
- extra_headers=ppc-asm.h
- ;;
- powerpcle-*-pe | powerpcle-*-cygwin*)
- tm_file=rs6000/cygwin.h
- xm_file="rs6000/xm-cygwin.h ${xm_file}"
- tmake_file=rs6000/t-winnt
- xmake_file=rs6000/x-cygwin
-# extra_objs=pe.o
- if test x$enable_threads = xyes; then
- thread_file='win32'
- fi
- exeext=.exe
- extra_headers=ppc-asm.h
- ;;
powerpcle-*-solaris2*)
tm_file=rs6000/sol2.h
xm_file="rs6000/xm-sysv4.h"
Index: config/rs6000/cygwin.h
===================================================================
RCS file: cygwin.h
diff -N cygwin.h
--- /sourceware/cvs-tmp/cvsqnfXAr Fri Jan 28 17:13:50 2000
+++ /dev/null Tue May 5 13:32:27 1998
@@ -1,67 +0,0 @@
-/* Operating system specific defines to be used when targeting GCC for
- hosting on Windows NT 3.x, using the Cygnus API
-
- This is different to the winnt.h file, since that is used
- to build GCC for use with a windows style library and tool
- set, winnt.h uses the Microsoft tools to do that.
-
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-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. */
-
-
-/* Ugly hack */
-#include "rs6000/win-nt.h"
-
-
-#ifdef CPP_PREDEFINES
-#undef CPP_PREDEFINES
-#endif
-
-#define CPP_PREDEFINES "-D_WIN32 -DWINNT -D__CYGWIN__ -D__CYGWIN32__ -DPOSIX \
- -D_POWER -D_ARCH_PPC -D__PPC__ -Asystem(winnt) -Acpu(powerpc) -Amachine(powerpc)"
-
-#undef CPP_SPEC
-#define CPP_SPEC "-remap %{posix: -D_POSIX_SOURCE} %(cpp_cpu)"
-
-/* We have to dynamic link to get to the system DLLs. All of libc, libm and
- the Unix stuff is in cygwin.dll. The import library is called
- 'libcygwin.a'. For Windows applications, include more libraries, but
- always include kernel32. We'd like to specific subsystem windows to
- ld, but that doesn't work just yet. */
-
-#undef LIB_SPEC
-#define LIB_SPEC "-lcygwin %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32"
-
-#undef LINK_SPEC
-#define LINK_SPEC "%{v:-V}"
-
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "crti%O%s crt0%O%s"
-
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC "crtn%O%s"
-
-#define PTRDIFF_TYPE "int"
-#define WCHAR_UNSIGNED 1
-#define WCHAR_TYPE_SIZE 16
-#define WCHAR_TYPE "short unsigned int"
-
-#define DBX_DEBUGGING_INFO
-#undef SDB_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
Index: config/rs6000/nt-ci.asm
===================================================================
RCS file: nt-ci.asm
diff -N nt-ci.asm
--- /sourceware/cvs-tmp/cvsSQ0iZe Fri Jan 28 17:13:50 2000
+++ /dev/null Tue May 5 13:32:27 1998
@@ -1,48 +0,0 @@
-# crti.s for Windows NT
-
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Written By Michael Meissner
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2, or (at your option) any
-# later version.
-#
-# In addition to the permissions in the GNU General Public License, the
-# Free Software Foundation gives you unlimited permission to link the
-# compiled version of this file with other programs, and to distribute
-# those programs without any restriction coming from the use of this
-# file. (The General Public License restrictions do apply in other
-# respects; for example, they cover modification of the file, and
-# distribution when not linked into another program.)
-#
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-#
-# As a special exception, if you link this library with files
-# compiled with GCC to produce an executable, this does not cause
-# the resulting executable to be covered by the GNU General Public License.
-# This exception does not however invalidate any other reasons why
-# the executable file might be covered by the GNU General Public License.
-#
-
-# This file just supplies labeled starting points for the static constructors
-# and destructors. It is linked in first before other modules.
-
- .file "crti.s"
- .ident "GNU C crti.s"
-
- .section .ctors,"w"
- .globl __CTOR_LIST__
-__CTOR_LIST__:
-
- .section .dtors,"w"
- .globl __DTOR_LIST__
-__DTOR_LIST__:
Index: config/rs6000/nt-cn.asm
===================================================================
RCS file: nt-cn.asm
diff -N nt-cn.asm
--- /sourceware/cvs-tmp/cvsaFdC23 Fri Jan 28 17:13:50 2000
+++ /dev/null Tue May 5 13:32:27 1998
@@ -1,48 +0,0 @@
-# crtn.s for Windows NT
-
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Written By Michael Meissner
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2, or (at your option) any
-# later version.
-#
-# In addition to the permissions in the GNU General Public License, the
-# Free Software Foundation gives you unlimited permission to link the
-# compiled version of this file with other programs, and to distribute
-# those programs without any restriction coming from the use of this
-# file. (The General Public License restrictions do apply in other
-# respects; for example, they cover modification of the file, and
-# distribution when not linked into another program.)
-#
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-#
-# As a special exception, if you link this library with files
-# compiled with GCC to produce an executable, this does not cause
-# the resulting executable to be covered by the GNU General Public License.
-# This exception does not however invalidate any other reasons why
-# the executable file might be covered by the GNU General Public License.
-#
-
-# This file just supplies labeled ending points for the static constructors
-# and destructors. It is linked in last after other modules.
-
- .file "crtn.s"
- .ident "GNU C crtn.s"
-
- .section .ctors,"w"
- .globl __CTOR_END__
-__CTOR_END__:
-
- .section .dtors,"w"
- .globl __DTOR_END__
-__DTOR_END__:
Index: config/rs6000/ntstack.asm
===================================================================
RCS file: ntstack.asm
diff -N ntstack.asm
--- /sourceware/cvs-tmp/cvscdC9CS Fri Jan 28 17:13:50 2000
+++ /dev/null Tue May 5 13:32:27 1998
@@ -1,42 +0,0 @@
-# Allocate stack for NT, inserting stack probes every 4k pages
-
- .file "ntstack.asm"
-
-# Setup MS Structured-Exception-Handling
- .pdata
- .align 2
- .ualong ..__allocate_stack,__allocate_stack.e,0,0,__allocate_stack.b
-
-# Switch to the relocation section
- .reldata
- .globl __allocate_stack
- .globl ..__allocate_stack
-__allocate_stack:
- .ualong ..__allocate_stack,.toc
-
- .text
- .align 2
-..__allocate_stack:
- .function ..__allocate_stack
-__allocate_stack.b:
- addi 3,3,15 # round up to 16 byte alignment
- lwz 0,0(1) # old stack link
- rlwinm 3,3,0,0,28
- srawi. 4,3,12 # get # of pages to check
- neg 3,3 # negate so we can use stwux
- bgt- 0,.Lcheck
- stwux 0,1,3 # small request, just decrement and return
- blr
-
-.Lcheck:
- mtctr 4 # number of pages to check
- mr 5,1 # tmp pointer
-.Lloop:
- lwzu 6,-4096(5) # touch the page
- bdnz+ .Lloop # and loop back
-
- stwux 0,1,3 # update stack pointer
- blr
-
-__allocate_stack.e:
-FE_MOT_RESVD..__allocate_stack:
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.108.2.10
diff -p -u -u -p -r1.108.2.10 rs6000.c
--- rs6000.c 2000/01/27 19:57:26 1.108.2.10
+++ rs6000.c 2000/01/29 01:13:49
@@ -1181,12 +1181,6 @@ input_operand (op, mode)
if (LEGITIMATE_CONSTANT_POOL_ADDRESS_P (op))
return 1;
- /* Windows NT allows SYMBOL_REFs and LABEL_REFs against the TOC
- directly in the instruction stream */
- if (DEFAULT_ABI == ABI_NT
- && (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF))
- return 1;
-
/* V.4 allows SYMBOL_REFs and CONSTs that are in the small data region
to be valid. */
if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
@@ -1282,15 +1276,9 @@ init_cumulative_args (cum, fntype, libna
cum->nargs_prototype = 0;
cum->orig_nargs = cum->nargs_prototype;
-
- /* Check for DLL import functions */
- if (abi == ABI_NT
- && fntype
- && lookup_attribute ("dllimport", TYPE_ATTRIBUTES (fntype)))
- cum->call_cookie = CALL_NT_DLLIMPORT;
- /* Also check for longcall's */
- else if (fntype && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)))
+ /* Check for longcall's */
+ if (fntype && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)))
cum->call_cookie = CALL_LONG;
if (TARGET_DEBUG_ARG)
@@ -1303,9 +1291,6 @@ init_cumulative_args (cum, fntype, libna
tree_code_name[ (int)TREE_CODE (ret_type) ]);
}
- if (cum->call_cookie & CALL_NT_DLLIMPORT)
- fprintf (stderr, " dllimport,");
-
if (cum->call_cookie & CALL_LONG)
fprintf (stderr, " longcall,");
@@ -1345,8 +1330,6 @@ function_arg_padding (mode, type)
of an argument with the specified mode and type. If it is not defined,
PARM_BOUNDARY is used for all arguments.
- Windows NT wants anything >= 8 bytes to be double word aligned.
-
V.4 wants long longs to be double word aligned. */
int
@@ -1357,14 +1340,8 @@ function_arg_boundary (mode, type)
if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
&& (mode == DImode || mode == DFmode))
return 64;
-
- if (DEFAULT_ABI != ABI_NT || TARGET_64BIT)
+ else
return PARM_BOUNDARY;
-
- if (mode != BLKmode)
- return (GET_MODE_SIZE (mode)) >= 8 ? 64 : 32;
-
- return (int_size_in_bytes (type) >= 8) ? 64 : 32;
}
/* Update the data in CUM to advance over an argument
@@ -3666,10 +3643,6 @@ print_operand (file, x, code)
case ABI_AIX_NODESC:
case ABI_SOLARIS:
break;
-
- case ABI_NT:
- fputs ("..", file);
- break;
}
}
RS6000_OUTPUT_BASENAME (file, XSTR (x, 0));
@@ -3917,53 +3890,6 @@ first_fp_reg_to_save ()
-mno-eabi libraries can be used with -meabi programs.)
- A PowerPC Windows/NT frame looks like:
-
- SP----> +---------------------------------------+
- | back chain to caller | 0
- +---------------------------------------+
- | reserved | 4
- +---------------------------------------+
- | reserved | 8
- +---------------------------------------+
- | reserved | 12
- +---------------------------------------+
- | reserved | 16
- +---------------------------------------+
- | reserved | 20
- +---------------------------------------+
- | Parameter save area (P) | 24
- +---------------------------------------+
- | Alloca space (A) | 24+P
- +---------------------------------------+
- | Local variable space (L) | 24+P+A
- +---------------------------------------+
- | Float/int conversion temporary (X) | 24+P+A+L
- +---------------------------------------+
- | Save area for FP registers (F) | 24+P+A+L+X
- +---------------------------------------+
- | Possible alignment area (Y) | 24+P+A+L+X+F
- +---------------------------------------+
- | Save area for GP registers (G) | 24+P+A+L+X+F+Y
- +---------------------------------------+
- | Save area for CR (C) | 24+P+A+L+X+F+Y+G
- +---------------------------------------+
- | Save area for TOC (T) | 24+P+A+L+X+F+Y+G+C
- +---------------------------------------+
- | Save area for LR (R) | 24+P+A+L+X+F+Y+G+C+T
- +---------------------------------------+
- old SP->| back chain to caller's caller |
- +---------------------------------------+
-
- For NT, there is no specific order to save the registers, but in
- order to support __builtin_return_address, the save area for the
- link register needs to be in a known place, so we use -4 off of the
- old SP. To support calls through pointers, we also allocate a
- fixed slot to store the TOC, -8 off the old SP.
-
- The required alignment for NT is 16 bytes.
-
-
The EABI configuration defaults to the V.4 layout, unless
-mcall-aix is used, in which case the AIX layout is used. However,
the stack alignment requirements may differ. If -mno-eabi is not
@@ -4007,13 +3933,6 @@ rs6000_stack_info ()
/* Does this function call anything? */
info_ptr->calls_p = ! current_function_is_leaf;
- /* Allocate space to save the toc. */
- if (abi == ABI_NT && info_ptr->calls_p)
- {
- info_ptr->toc_save_p = 1;
- info_ptr->toc_size = reg_size;
- }
-
/* Does this machine need the float/int conversion area? */
info_ptr->fpmem_p = regs_ever_live[FPMEM_REGNUM];
@@ -4031,15 +3950,13 @@ rs6000_stack_info ()
{
info_ptr->lr_save_p = 1;
regs_ever_live[LINK_REGISTER_REGNUM] = 1;
- if (abi == ABI_NT)
- info_ptr->lr_size = reg_size;
}
/* Determine if we need to save the condition code registers. */
if (regs_ever_live[70] || regs_ever_live[71] || regs_ever_live[72])
{
info_ptr->cr_save_p = 1;
- if (abi == ABI_V4 || abi == ABI_NT || abi == ABI_SOLARIS)
+ if (abi == ABI_V4 || abi == ABI_SOLARIS)
info_ptr->cr_size = reg_size;
}
@@ -4081,16 +3998,6 @@ rs6000_stack_info ()
info_ptr->fpmem_offset = info_ptr->toc_save_offset - info_ptr->fpmem_size;
info_ptr->lr_save_offset = reg_size;
break;
-
- case ABI_NT:
- info_ptr->lr_save_offset = -reg_size;
- info_ptr->toc_save_offset = info_ptr->lr_save_offset - info_ptr->lr_size;
- info_ptr->cr_save_offset = info_ptr->toc_save_offset - info_ptr->toc_size;
- info_ptr->gp_save_offset = info_ptr->cr_save_offset - info_ptr->cr_size - info_ptr->gp_size + reg_size;
- info_ptr->fp_save_offset = info_ptr->gp_save_offset - info_ptr->fp_size;
- if (info_ptr->fp_size && ((- info_ptr->fp_save_offset) % 8) != 0)
- info_ptr->fp_save_offset -= reg_size;
- break;
}
/* Ensure that fpmem_offset will be aligned to an 8-byte boundary. */
@@ -4124,10 +4031,9 @@ rs6000_stack_info ()
if (info_ptr->calls_p)
info_ptr->push_p = 1;
- else if (abi == ABI_V4 || abi == ABI_NT || abi == ABI_SOLARIS)
+ else if (abi == ABI_V4 || abi == ABI_SOLARIS)
info_ptr->push_p = (total_raw_size > info_ptr->fixed_size
- || (abi == ABI_NT ? info_ptr->lr_save_p
- : info_ptr->calls_p));
+ || info_ptr->calls_p);
else
info_ptr->push_p = (frame_pointer_needed
@@ -4186,7 +4092,6 @@ debug_stack_info (info)
case ABI_AIX_NODESC: abi_string = "AIX"; break;
case ABI_V4: abi_string = "V.4"; break;
case ABI_SOLARIS: abi_string = "Solaris"; break;
- case ABI_NT: abi_string = "NT"; break;
}
fprintf (stderr, "\tABI = %5s\n", abi_string);
@@ -5231,14 +5136,6 @@ output_epilog (file, size)
if (frame_pointer_needed)
fputs ("\t.byte 31\n", file);
}
-
- if (DEFAULT_ABI == ABI_NT)
- {
- RS6000_OUTPUT_BASENAME (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
- fputs (".e:\nFE_MOT_RESVD..", file);
- RS6000_OUTPUT_BASENAME (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
- fputs (":\n", file);
- }
}
/* A C compound statement that outputs the assembler code for a thunk function,
@@ -5346,10 +5243,6 @@ output_mi_thunk (file, thunk_fndecl, del
case ABI_SOLARIS:
prefix = "";
break;
-
- case ABI_NT:
- prefix = "..";
- break;
}
/* If the function is compiled in this module, jump to it directly.
@@ -5372,7 +5265,6 @@ output_mi_thunk (file, thunk_fndecl, del
switch (DEFAULT_ABI)
{
default:
- case ABI_NT:
abort ();
case ABI_AIX:
@@ -6158,68 +6050,6 @@ int get_issue_rate()
}
-/* Output assembler code for a block containing the constant parts
- of a trampoline, leaving space for the variable parts.
-
- The trampoline should set the static chain pointer to value placed
- into the trampoline and should branch to the specified routine. */
-
-void
-rs6000_trampoline_template (file)
- FILE *file;
-{
- const char *sc = reg_names[STATIC_CHAIN_REGNUM];
- const char *r0 = reg_names[0];
- const char *r2 = reg_names[2];
-
- switch (DEFAULT_ABI)
- {
- default:
- abort ();
-
- /* Under AIX, this is not code at all, but merely a data area,
- since that is the way all functions are called. The first word is
- the address of the function, the second word is the TOC pointer (r2),
- and the third word is the static chain value. */
- case ABI_AIX:
- break;
-
-
- /* V.4/eabi function pointers are just a single pointer, so we need to
- do the full gory code to load up the static chain. */
- case ABI_V4:
- case ABI_SOLARIS:
- case ABI_AIX_NODESC:
- break;
-
- /* NT function pointers point to a two word area (real address, TOC)
- which unfortunately does not include a static chain field. So we
- use the function field to point to ..LTRAMP1 and the toc field
- to point to the whole table. */
- case ABI_NT:
- if (STATIC_CHAIN_REGNUM == 0
- || STATIC_CHAIN_REGNUM == 2
- || TARGET_64BIT
- || !TARGET_NEW_MNEMONICS)
- abort ();
-
- fprintf (file, "\t.ualong 0\n"); /* offset 0 */
- fprintf (file, "\t.ualong 0\n"); /* offset 4 */
- fprintf (file, "\t.ualong 0\n"); /* offset 8 */
- fprintf (file, "\t.ualong 0\n"); /* offset 12 */
- fprintf (file, "\t.ualong 0\n"); /* offset 16 */
- fprintf (file, "..LTRAMP1..0:\n"); /* offset 20 */
- fprintf (file, "\tlwz %s,8(%s)\n", r0, r2); /* offset 24 */
- fprintf (file, "\tlwz %s,12(%s)\n", sc, r2); /* offset 28 */
- fprintf (file, "\tmtctr %s\n", r0); /* offset 32 */
- fprintf (file, "\tlwz %s,16(%s)\n", r2, r2); /* offset 36 */
- fprintf (file, "\tbctr\n"); /* offset 40 */
- break;
- }
-
- return;
-}
-
/* Length in units of the trampoline for entering a nested function. */
int
@@ -6241,10 +6071,6 @@ rs6000_trampoline_size ()
case ABI_AIX_NODESC:
ret = (TARGET_32BIT) ? 40 : 48;
break;
-
- case ABI_NT:
- ret = 20;
- break;
}
return ret;
@@ -6298,27 +6124,6 @@ rs6000_initialize_trampoline (addr, fnad
fnaddr, pmode,
ctx_reg, pmode);
break;
-
- /* Under NT, update the first word to point to the ..LTRAMP1..0 header,
- the second word will point to the whole trampoline, third-fifth words
- will then have the real address, static chain, and toc value. */
- case ABI_NT:
- {
- rtx tramp_reg = gen_reg_rtx (pmode);
- rtx fn_reg = gen_reg_rtx (pmode);
- rtx toc_reg = gen_reg_rtx (pmode);
-
- emit_move_insn (tramp_reg, gen_rtx_SYMBOL_REF (pmode, "..LTRAMP1..0"));
- addr = force_reg (pmode, addr);
- emit_move_insn (fn_reg, MEM_DEREF (fnaddr));
- emit_move_insn (toc_reg, MEM_PLUS (fnaddr, regsize));
- emit_move_insn (MEM_DEREF (addr), tramp_reg);
- emit_move_insn (MEM_PLUS (addr, regsize), addr);
- emit_move_insn (MEM_PLUS (addr, 2*regsize), fn_reg);
- emit_move_insn (MEM_PLUS (addr, 3*regsize), ctx_reg);
- emit_move_insn (MEM_PLUS (addr, 4*regsize), gen_rtx_REG (pmode, 2));
- }
- break;
}
return;
@@ -6360,51 +6165,6 @@ rs6000_valid_type_attribute_p (type, att
if (is_attribute_p ("longcall", identifier))
return (args == NULL_TREE);
- if (DEFAULT_ABI == ABI_NT)
- {
- /* Stdcall attribute says callee is responsible for popping arguments
- if they are not variable. */
- if (is_attribute_p ("stdcall", identifier))
- return (args == NULL_TREE);
-
- /* Cdecl attribute says the callee is a normal C declaration */
- if (is_attribute_p ("cdecl", identifier))
- return (args == NULL_TREE);
-
- /* Dllimport attribute says the caller is to call the function
- indirectly through a __imp_<name> pointer. */
- if (is_attribute_p ("dllimport", identifier))
- return (args == NULL_TREE);
-
- /* Dllexport attribute says the callee is to create a __imp_<name>
- pointer. */
- if (is_attribute_p ("dllexport", identifier))
- return (args == NULL_TREE);
-
- /* Exception attribute allows the user to specify 1-2 strings
- or identifiers that will fill in the 3rd and 4th fields
- of the structured exception table. */
- if (is_attribute_p ("exception", identifier))
- {
- int i;
-
- if (args == NULL_TREE)
- return 0;
-
- for (i = 0; i < 2 && args != NULL_TREE; i++)
- {
- tree this_arg = TREE_VALUE (args);
- args = TREE_PURPOSE (args);
-
- if (TREE_CODE (this_arg) != STRING_CST
- && TREE_CODE (this_arg) != IDENTIFIER_NODE)
- return 0;
- }
-
- return (args == NULL_TREE);
- }
- }
-
return 0;
}
@@ -6566,7 +6326,7 @@ rs6000_select_section (decl, reloc)
/* If we are referencing a function that is static or is known to be
in this file, make the SYMBOL_REF special. We can use this to indicate
that we can branch to this function without emitting a no-op after the
- call. For real AIX and NT calling sequences, we also replace the
+ call. For real AIX calling sequences, we also replace the
function name with the real name (1 or 2 leading .'s), rather than
the function descriptor name. This saves a lot of overriding code
to read the prefixes. */
@@ -6582,7 +6342,7 @@ rs6000_encode_section_info (decl)
&& ! DECL_WEAK (decl))
SYMBOL_REF_FLAG (sym_ref) = 1;
- if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
+ if (DEFAULT_ABI == ABI_AIX)
{
size_t len1 = (DEFAULT_ABI == ABI_AIX) ? 1 : 2;
size_t len2 = strlen (XSTR (sym_ref, 0));
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.64.2.10
diff -p -u -u -p -r1.64.2.10 rs6000.h
--- rs6000.h 2000/01/27 23:42:36 1.64.2.10
+++ rs6000.h 2000/01/29 01:13:49
@@ -28,12 +28,10 @@ Boston, MA 02111-1307, USA. */
#define OBJECT_XCOFF 1
#define OBJECT_ELF 2
-#define OBJECT_WINDOWS_NT 3
-#define OBJECT_PEF 4
+#define OBJECT_PEF 3
#define TARGET_ELF (TARGET_OBJECT_FORMAT == OBJECT_ELF)
#define TARGET_AIX (TARGET_OBJECT_FORMAT == OBJECT_XCOFF)
-#define TARGET_WINDOWS_NT (TARGET_OBJECT_FORMAT == OBJECT_WINDOWS_NT)
#define TARGET_MACOS (TARGET_OBJECT_FORMAT == OBJECT_PEF)
/* Print subsidiary information on the compiler version in use. */
@@ -1149,7 +1147,6 @@ enum rs6000_abi {
ABI_AIX, /* IBM's AIX */
ABI_AIX_NODESC, /* AIX calling sequence minus function descriptors */
ABI_V4, /* System V.4/eabi */
- ABI_NT, /* Windows/NT */
ABI_SOLARIS /* Solaris */
};
@@ -1361,7 +1358,7 @@ extern int rs6000_sysv_varargs_p;
/* Flags for the call/call_value rtl operations set up by function_arg */
#define CALL_NORMAL 0x00000000 /* no special processing */
-#define CALL_NT_DLLIMPORT 0x00000001 /* NT, this is a DLL import call */
+/* Bits in 0x00000001 are unused. */
#define CALL_V4_CLEAR_FP_ARGS 0x00000002 /* V.4, no FP args passed */
#define CALL_V4_SET_FP_ARGS 0x00000004 /* V.4, FP args were passed */
#define CALL_LONG 0x00000008 /* always call indirect */
@@ -1628,7 +1625,6 @@ typedef struct rs6000_args
|| DEFAULT_ABI == ABI_AIX_NODESC) ? 8 : \
(DEFAULT_ABI == ABI_V4 \
|| DEFAULT_ABI == ABI_SOLARIS) ? (TARGET_32BIT ? 4 : 8) : \
- (DEFAULT_ABI == ABI_NT) ? -4 : \
(fatal ("RETURN_ADDRESS_OFFSET not supported"), 0))
/* The current return address is in link register (65). The return address
@@ -2925,7 +2921,6 @@ extern void rs6000_gen_section_name ();
extern void output_function_profiler ();
extern int rs6000_adjust_cost ();
extern int rs6000_adjust_priority ();
-extern void rs6000_trampoline_template ();
extern int rs6000_trampoline_size ();
extern void rs6000_initialize_trampoline ();
extern int rs6000_comp_type_attributes ();
Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.79.2.11
diff -p -u -u -p -r1.79.2.11 rs6000.md
--- rs6000.md 2000/01/24 21:15:04 1.79.2.11
+++ rs6000.md 2000/01/29 01:13:50
@@ -27,7 +27,6 @@
;; 0/v blockage
;; 1/v nonlocal_goto_receiver for MINIMAL_TOC
;; 6 address of a word pointing to the TOC
-;; 7 clobber SP for NT
;; 7 address of the TOC (more-or-less)
;; 8 movsi_got
;; 10 fctiwz
@@ -5902,9 +5901,9 @@
{
rtx target = (no_new_pseudos ? operands[0] : gen_reg_rtx (SImode));
- /* If this is a function address on -mcall-aixdesc or -mcall-nt,
+ /* If this is a function address on -mcall-aixdesc,
convert it to the address of the descriptor. */
- if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
+ if (DEFAULT_ABI == ABI_AIX
&& GET_CODE (operands[1]) == SYMBOL_REF
&& XSTR (operands[1], 0)[0] == '.')
{
@@ -5925,31 +5924,7 @@
DONE;
}
- if (GET_CODE (operands[1]) == CONST
- && DEFAULT_ABI == ABI_NT
- && ! side_effects_p (operands[0]))
- {
- rtx const_term = const0_rtx;
- rtx sym = eliminate_constant_term (XEXP (operands[1], 0), &const_term);
- if (sym && GET_CODE (const_term) == CONST_INT
- && (GET_CODE (sym) == SYMBOL_REF || GET_CODE (sym) == LABEL_REF))
- {
- unsigned HOST_WIDE_INT value = INTVAL (const_term);
- int new_reg_p = (flag_expensive_optimizations && ! no_new_pseudos);
- rtx tmp1 = ((new_reg_p && value != 0)
- ? gen_reg_rtx (SImode) : operands[0]);
-
- emit_insn (gen_movsi (tmp1, sym));
- if (INTVAL (const_term) != 0)
- emit_insn (gen_addsi3 (operands[0], tmp1, GEN_INT (value)));
- DONE;
- }
- else
- rs6000_fatal_bad_address (operands[1]);
- }
-
- if ((! TARGET_WINDOWS_NT || DEFAULT_ABI != ABI_NT)
- && CONSTANT_P (operands[1])
+ if (CONSTANT_P (operands[1])
&& GET_CODE (operands[1]) != CONST_INT
&& GET_CODE (operands[1]) != HIGH
&& ! LEGITIMATE_CONSTANT_POOL_ADDRESS_P (operands[1]))
@@ -7783,21 +7758,6 @@
emit_insn (gen_cond_trap (LTU, available, operands[1], const0_rtx));
}
- /* Under Windows NT, we need to add stack probes for large/variable
- allocations, so do it via a call to the external function alloca
- instead of doing it inline. */
- if (DEFAULT_ABI == ABI_NT
- && (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) > 4096))
- {
- rtx tmp = gen_reg_rtx (Pmode);
- emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode,
- \"__allocate_stack\"),
- tmp, 0, Pmode, 1, operands[1], Pmode);
- emit_insn (gen_set_sp (tmp));
- emit_move_insn (operands[0], tmp);
- DONE;
- }
-
if (GET_CODE (operands[1]) != CONST_INT
|| INTVAL (operands[1]) < -32767
|| INTVAL (operands[1]) > 32768)
@@ -7826,16 +7786,6 @@
DONE;
}")
-;; Marker to indicate that the stack pointer was changed under NT in
-;; ways not known to the compiler
-
-(define_insn "set_sp"
- [(set (reg:SI 1)
- (unspec:SI [(match_operand:SI 0 "register_operand" "r")] 7))]
- ""
- ""
- [(set_attr "length" "0")])
-
;; These patterns say how to save and restore the stack pointer. We need not
;; save the stack pointer at function level since we are careful to
;; preserve the backchain. At block level, we have to restore the backchain
@@ -8085,49 +8035,6 @@
[(set_attr "type" "load")
(set_attr "length" "28")])
-;; A function pointer undef NT is a pointer to a data area whose first word
-;; contains the actual address of the function, whose second word contains a
-;; pointer to its TOC. The static chain is not stored under NT, which means
-;; that we need a trampoline.
-;;
-;; operands[0] is an SImode pseudo in which we place the address of the function.
-;; operands[1] is the stack size to clean up
-;; operands[2] is the value FUNCTION_ARG returns for the VOID argument (must be 0 for NT)
-;; operands[3] is location to store the TOC
-;; operands[4] is the TOC register
-;;
-;; We do not break this into separate insns, so that the scheduler will not try
-;; to move the load of the new TOC before any loads from the TOC.
-
-(define_insn "call_indirect_nt"
- [(call (mem:SI (match_operand:SI 0 "gpc_reg_operand" "b"))
- (match_operand 1 "const_int_operand" "n"))
- (use (match_operand 2 "const_int_operand" "n"))
- (use (match_operand 3 "offsettable_mem_operand" "o"))
- (use (match_operand 4 "gpc_reg_operand" "r"))
- (clobber (match_scratch:SI 5 "=&r"))
- (clobber (match_scratch:SI 6 "=l"))]
- "DEFAULT_ABI == ABI_NT
- && (INTVAL (operands[2]) == CALL_NORMAL || (INTVAL (operands[2]) & CALL_LONG) != 0)"
- "{st|stw} %4,%a3\;{l|lwz} %5,0(%0)\;{l|lwz} %4,4(%0)\;mt%6 %5\;{brl|blrl}\;{l|lwz} %4,%a3"
- [(set_attr "type" "load")
- (set_attr "length" "24")])
-
-(define_insn "call_value_indirect_nt"
- [(set (match_operand 0 "" "")
- (call (mem:SI (match_operand:SI 1 "gpc_reg_operand" "b"))
- (match_operand 2 "const_int_operand" "n")))
- (use (match_operand 3 "const_int_operand" "n"))
- (use (match_operand 4 "offsettable_mem_operand" "o"))
- (use (match_operand 5 "gpc_reg_operand" "r"))
- (clobber (match_scratch:SI 6 "=&r"))
- (clobber (match_scratch:SI 7 "=l"))]
- "DEFAULT_ABI == ABI_NT
- && (INTVAL (operands[3]) == CALL_NORMAL || (INTVAL (operands[3]) & CALL_LONG) != 0)"
- "{st|stw} %5,%a4\;{l|lwz} %6,0(%1)\;{l|lwz} %5,4(%1)\;mt%7 %6\;{brl|blrl}\;{l|lwz} %5,%a4"
- [(set_attr "type" "load")
- (set_attr "length" "24")])
-
;; A function pointer under System V is just a normal pointer
;; operands[0] is the function pointer
;; operands[1] is the stack size to clean up
@@ -8186,14 +8093,6 @@
operands[0] = XEXP (operands[0], 0);
- /* Convert NT DLL imports into an indirect call. */
- if (GET_CODE (operands[0]) == SYMBOL_REF
- && (INTVAL (operands[2]) & CALL_NT_DLLIMPORT) != 0)
- {
- operands[0] = rs6000_dll_import_ref (operands[0]);
- operands[2] = GEN_INT ((int)CALL_NORMAL);
- }
-
if (GET_CODE (operands[0]) != SYMBOL_REF
|| (INTVAL (operands[2]) & CALL_LONG) != 0)
{
@@ -8221,13 +8120,6 @@
operands[1], operands[2],
toc_addr, toc_reg, static_chain));
}
- else if (DEFAULT_ABI == ABI_NT)
- {
- /* NT function pointers are really pointers to a two word area */
- emit_call_insn (gen_call_indirect_nt (force_reg (Pmode, operands[0]),
- operands[1], operands[2],
- toc_addr, toc_reg));
- }
else
abort ();
}
@@ -8249,14 +8141,6 @@
operands[1] = XEXP (operands[1], 0);
- /* Convert NT DLL imports into an indirect call. */
- if (GET_CODE (operands[1]) == SYMBOL_REF
- && (INTVAL (operands[3]) & CALL_NT_DLLIMPORT) != 0)
- {
- operands[1] = rs6000_dll_import_ref (operands[1]);
- operands[3] = GEN_INT ((int)CALL_NORMAL);
- }
-
if (GET_CODE (operands[1]) != SYMBOL_REF
|| (INTVAL (operands[3]) & CALL_LONG) != 0)
{
@@ -8286,14 +8170,6 @@
operands[2], operands[3],
toc_addr, toc_reg, static_chain));
}
- else if (DEFAULT_ABI == ABI_NT)
- {
- /* NT function pointers are really pointers to a two word area */
- emit_call_insn (gen_call_value_indirect_nt (operands[0],
- force_reg (Pmode, operands[1]),
- operands[2], operands[3],
- toc_addr, toc_reg));
- }
else
abort ();
}
@@ -8398,7 +8274,7 @@
(match_operand 1 "" "fg,fg"))
(use (match_operand:SI 2 "immediate_operand" "O,n"))
(clobber (match_scratch:SI 3 "=l,l"))]
- "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
+ "DEFAULT_ABI == ABI_AIX
&& (INTVAL (operands[2]) & CALL_LONG) == 0"
"*
{
@@ -8412,7 +8288,7 @@
else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
output_asm_insn (\"creqv 6,6,6\", operands);
- return (TARGET_WINDOWS_NT) ? \"bl %z0\;.znop %z0\" : \"bl %z0\;%.\";
+ return \"bl %z0\;%.\";
}"
[(set_attr "type" "branch")
(set_attr "length" "8,12")])
@@ -8422,7 +8298,8 @@
(match_operand 1 "" "fg,fg"))
(use (match_operand:SI 2 "immediate_operand" "O,n"))
(clobber (match_scratch:SI 3 "=l,l"))]
- "TARGET_64BIT && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
+ "TARGET_64BIT
+ && DEFAULT_ABI == ABI_AIX
&& (INTVAL (operands[2]) & CALL_LONG) == 0"
"*
{
@@ -8436,7 +8313,7 @@
else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
output_asm_insn (\"creqv 6,6,6\", operands);
- return (TARGET_WINDOWS_NT) ? \"bl %z0\;.znop %z0\" : \"bl %z0\;%.\";
+ return \"bl %z0\;%.\";
}"
[(set_attr "type" "branch")
(set_attr "length" "8,12")])
@@ -8471,7 +8348,7 @@
(match_operand 2 "" "fg,fg")))
(use (match_operand:SI 3 "immediate_operand" "O,n"))
(clobber (match_scratch:SI 4 "=l,l"))]
- "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
+ "DEFAULT_ABI == ABI_AIX
&& (INTVAL (operands[3]) & CALL_LONG) == 0"
"*
{
@@ -8485,7 +8362,7 @@
else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
output_asm_insn (\"creqv 6,6,6\", operands);
- return (TARGET_WINDOWS_NT) ? \"bl %z1\;.znop %z1\" : \"bl %z1\;%.\";
+ return \"bl %z1\;%.\";
}"
[(set_attr "type" "branch")
(set_attr "length" "8,12")])
@@ -8496,7 +8373,8 @@
(match_operand 2 "" "fg,fg")))
(use (match_operand:SI 3 "immediate_operand" "O,n"))
(clobber (match_scratch:SI 4 "=l,l"))]
- "TARGET_64BIT && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)
+ "TARGET_64BIT
+ && DEFAULT_ABI == ABI_AIX
&& (INTVAL (operands[3]) & CALL_LONG) == 0"
"*
{
@@ -8510,7 +8388,7 @@
else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
output_asm_insn (\"creqv 6,6,6\", operands);
- return (TARGET_WINDOWS_NT) ? \"bl %z1\;.znop %z1\" : \"bl %z1\;%.\";
+ return \"bl %z1\;%.\";
}"
[(set_attr "type" "branch")
(set_attr "length" "8,12")])
Index: config/rs6000/sysv4.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.23.4.5
diff -p -u -u -p -r1.23.4.5 sysv4.h
--- sysv4.h 2000/01/12 22:01:44 1.23.4.5
+++ sysv4.h 2000/01/29 01:13:50
@@ -72,8 +72,7 @@ extern enum rs6000_sdata_type rs6000_sda
|| ((target_flags & (MASK_RELOCATABLE \
| MASK_MINIMAL_TOC)) \
&& flag_pic > 1) \
- || DEFAULT_ABI == ABI_AIX \
- || DEFAULT_ABI == ABI_NT)
+ || DEFAULT_ABI == ABI_AIX)
#define TARGET_BITFIELD_TYPE (! TARGET_NO_BITFIELD_TYPE)
#define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
@@ -174,8 +173,6 @@ do { \
} \
else if (!strcmp (rs6000_abi_name, "aixdesc")) \
rs6000_current_abi = ABI_AIX; \
- else if (!strcmp (rs6000_abi_name, "nt")) \
- rs6000_current_abi = ABI_NT; \
else if (!strcmp (rs6000_abi_name, "linux")) \
rs6000_current_abi = ABI_V4; \
else if (!strcmp (rs6000_abi_name, "solaris")) \
@@ -243,16 +240,14 @@ do { \
error ("-mrelocatable and -mno-minimal-toc are incompatible."); \
} \
\
- if (TARGET_RELOCATABLE && \
- (rs6000_current_abi == ABI_AIX || rs6000_current_abi == ABI_NT)) \
+ if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX) \
{ \
target_flags &= ~MASK_RELOCATABLE; \
error ("-mrelocatable and -mcall-%s are incompatible.", \
rs6000_abi_name); \
} \
\
- if (flag_pic > 1 && \
- (rs6000_current_abi == ABI_AIX || rs6000_current_abi == ABI_NT)) \
+ if (flag_pic > 1 && rs6000_current_abi == ABI_AIX) \
{ \
flag_pic = 0; \
error ("-fPIC and -mcall-%s are incompatible.", \
@@ -265,12 +260,6 @@ do { \
error ("-mcall-aixdesc must be big endian"); \
} \
\
- if (rs6000_current_abi == ABI_NT && TARGET_BIG_ENDIAN) \
- { \
- target_flags |= MASK_LITTLE_ENDIAN; \
- error ("-mcall-nt must be little endian"); \
- } \
- \
/* Treat -fPIC the same as -mrelocatable */ \
if (flag_pic > 1) \
target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \
@@ -433,7 +422,7 @@ toc_section () \
if (in_section != in_toc) \
{ \
in_section = in_toc; \
- if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) \
+ if (DEFAULT_ABI == ABI_AIX \
&& TARGET_MINIMAL_TOC \
&& !TARGET_RELOCATABLE) \
{ \
@@ -454,8 +443,7 @@ toc_section () \
else \
fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
} \
- else if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) \
- && !TARGET_RELOCATABLE) \
+ else if (DEFAULT_ABI == ABI_AIX && !TARGET_RELOCATABLE) \
fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \
else \
{ \
@@ -609,7 +597,7 @@ extern int rs6000_pic_labelno;
putc ('\n', FILE); \
ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
\
- if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) \
+ if (DEFAULT_ABI == ABI_AIX) \
{ \
const char *desc_name = orig_name; \
\
@@ -778,12 +766,12 @@ do { \
fprintf (FILE, "\t.previous\n"); \
recurse = 0; \
} \
- /* Remove initial .'s to turn a -mcall-aixdesc or -mcall-nt function \
+ /* Remove initial .'s to turn a -mcall-aixdesc function \
address into the address of the descriptor, not the function \
itself. */ \
else if (GET_CODE (VALUE) == SYMBOL_REF \
&& XSTR (VALUE, 0)[0] == '.' \
- && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT)) \
+ && DEFAULT_ABI == ABI_AIX) \
{ \
char *name = XSTR (VALUE, 0); \
while (*name == '.') \
@@ -812,10 +800,10 @@ do { \
/* If we are referencing a function that is static or is known to be
in this file, make the SYMBOL_REF special. We can use this to indicate
that we can branch to this function without emitting a no-op after the
- call. For real AIX and NT calling sequences, we also replace the
+ call. For real AIX calling sequences, we also replace the
function name with the real name (1 or 2 leading .'s), rather than
the function descriptor name. This saves a lot of overriding code
- to readd the prefixes. */
+ to read the prefixes. */
#undef ENCODE_SECTION_INFO
#define ENCODE_SECTION_INFO(DECL) rs6000_encode_section_info (DECL)
@@ -983,13 +971,12 @@ do { \
%{mlittle: %(cc1_endian_little)} %{!mlittle: %{mlittle-endian: %(cc1_endian_little)}} \
%{mbig: %(cc1_endian_big)} %{!mbig: %{mbig-endian: %(cc1_endian_big)}} \
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
- %{mcall-nt: -mlittle %(cc1_endian_little) } \
%{mcall-aixdesc: -mbig %(cc1_endian_big) } \
%{mcall-solaris: -mlittle %(cc1_endian_little) } \
%{mcall-linux: -mbig %(cc1_endian_big) } \
- %{!mcall-nt: %{!mcall-aixdesc: %{!mcall-solaris: %{!mcall-linux: \
+ %{!mcall-aixdesc: %{!mcall-solaris: %{!mcall-linux: \
%(cc1_endian_default) \
- }}}} \
+ }}} \
}}}} \
%{mcall-solaris: -mregnames } \
%{mno-sdata: -msdata=none } \
@@ -1088,9 +1075,9 @@ do { \
"%{mrelocatable*: -D_RELOCATABLE} \
%{fpic: -D__PIC__=1 -D__pic__=1} \
%{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}} \
-%{mcall-sysv: -D_CALL_SYSV} %{mcall-nt: -D_CALL_NT} \
+%{mcall-sysv: -D_CALL_SYSV} \
%{mcall-aix: -D_CALL_AIX} %{mcall-aixdesc: -D_CALL_AIX -D_CALL_AIXDESC} \
-%{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %{!mcall-nt: %(cpp_sysv_default) }}}} \
+%{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %(cpp_sysv_default) }}} \
%{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}"
#define CPP_SYSV_DEFAULT_SPEC "-D_CALL_SYSV"
@@ -1109,10 +1096,9 @@ do { \
%{mbig-endian: %(cpp_endian_big) } \
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
%{mcall-solaris: %(cpp_endian_solaris) } \
- %{mcall-nt: %(cpp_endian_little) } \
%{mcall-linux: %(cpp_endian_big) } \
%{mcall-aixdesc: %(cpp_endian_big) } \
- %{!mcall-solaris: %{!mcall-linux: %{!mcall-nt: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}"
+ %{!mcall-solaris: %{!mcall-linux: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}"
#define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_big)"
Index: config/rs6000/t-winnt
===================================================================
RCS file: t-winnt
diff -N t-winnt
--- /sourceware/cvs-tmp/cvsVHAqQs Fri Jan 28 17:13:51 2000
+++ /dev/null Tue May 5 13:32:27 1998
@@ -1,41 +0,0 @@
-# Do not build libgcc1.
-LIBGCC1 =
-CROSS_LIBGCC1 =
-
-EXTRA_PARTS = crti.o crtn.o
-
-# These are really part of libgcc1, but this will cause them to be
-# built correctly, so... [taken from t-sparclite]
-LIB2FUNCS_EXTRA = ntstack.S
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-ntstack.S: $(srcdir)/config/rs6000/ntstack.asm
- cat $(srcdir)/config/rs6000/ntstack.asm > ntstack.S
-
-# For NT we build crti.o and crtn.o which serve to add begin and
-# end labels for the static constructors and destructors.
-
-# Assemble startup files.
-crti.s: $(srcdir)/config/rs6000/nt-ci.asm
- cat $(srcdir)/config/rs6000/nt-ci.asm >crti.s
-
-crtn.s: $(srcdir)/config/rs6000/nt-cn.asm
- cat $(srcdir)/config/rs6000/nt-cn.asm >crtn.s
-
-crti.o: crti.s
- $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crti.o crti.s
-
-crtn.o: crtn.s
- $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtn.o crtn.s
Index: config/rs6000/win-nt.h
===================================================================
RCS file: win-nt.h
diff -N win-nt.h
--- /sourceware/cvs-tmp/cvssjhaBc Fri Jan 28 17:13:51 2000
+++ /dev/null Tue May 5 13:32:27 1998
@@ -1,481 +0,0 @@
-/* Definitions of target machine for GNU compiler, for PowerPC
- running Windows/NT.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-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. */
-
-/* Say this is Windows/NT for the other config files. */
-#define WINDOWS_NT 1
-#define COFF_WITH_PE 1
-
-/* Default ABI to compile code for */
-#define DEFAULT_ABI ABI_NT
-
-#define CPP_DEFAULT_SPEC "-D_ARCH_PPC"
-
-#define ASM_DEFAULT_SPEC "-mppc"
-
-/* Pseudo target that we can test in the md file. */
-#define TARGET_WINDOWS_NT 1
-
-#include "rs6000/rs6000.h"
-
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
-
-#undef PROCESSOR_DEFAULT
-#define PROCESSOR_DEFAULT PROCESSOR_POWERPC
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-DWIN32 -D_WIN32 \
- -DWINNT -D__STDC__=0 -DALMOST_STDC \
- -D_POWER -D_ARCH_PPC -D__PPC__ -Asystem(winnt) -Acpu(powerpc) -Amachine(powerpc)"
-
-#if 0
-#include "winnt/win-nt.h"
-#endif
-
-#undef LIB_SPEC
-#define LIB_SPEC "%{mwindows:-subsystem:windows -entry:WinMainCRTStartup \
- USER32.LIB GDI32.LIB COMDLG32.LIB WINSPOOL.LIB} \
- %{!mwindows:-subsystem console -e mainCRTStartup} \
- %{mcrtmt:LIBCMT.LIB KERNEL32.LIB} %{!mcrtmt:-lkernel32 -lcygwin} \
- %{v}"
-
-#undef LINK_SPEC
-#define LINK_SPEC "%{v:-V}"
-
-/* Allow switches specified in LIB_SPEC, but don't do anything with them
- in the compiler. */
-#undef SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES \
- { "windows", 0 }, \
- { "crtmt", 0 },
-
-/* this is pure coff, not xcoff */
-#define SDB_DEBUGGING_INFO
-#define DBX_DEBUGGING_INFO
-
-#undef SDB_DELIM
-#define SDB_DELIM ";"
-
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
-/* NT always runs little endian */
-#undef BYTES_BIG_ENDIAN
-#define BYTES_BIG_ENDIAN 0
-
-#undef WORDS_BIG_ENDIAN
-#define WORDS_BIG_ENDIAN 0
-
-/* Define cutoff for using external functions to save floating point.
- Currently on NT, always use inline stores */
-#undef FP_SAVE_INLINE
-#define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 64)
-
-/* Note, little endian systems trap on unaligned addresses, so never
- turn off strict alignment in that case. */
-
-#undef STRICT_ALIGNMENT
-#define STRICT_ALIGNMENT 1
-
-/* Align stack to 16 byte boundaries */
-#undef STACK_BOUNDARY
-#define STACK_BOUNDARY 128
-
-/* No data type wants to be aligned rounder than this. */
-#undef BIGGEST_ALIGNMENT
-#define BIGGEST_ALIGNMENT 128
-
-/* NT aligns internal doubles in structures on dword boundaries. */
-#undef BIGGEST_FIELD_ALIGNMENT
-#define BIGGEST_FIELD_ALIGNMENT 64
-
-#undef ADJUST_FIELD_ALIGN
-#undef ROUND_TYPE_ALIGN
-
-#undef TARGET_VERSION
-#define TARGET_VERSION fprintf (stderr, " (PowerPC PE)");
-
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_NO_FP_IN_TOC | MASK_NO_SUM_IN_TOC)
-
-/* MEM representing address to save the TOC register */
-#undef RS6000_SAVE_TOC
-#define RS6000_SAVE_TOC gen_rtx_MEM (Pmode, \
- plus_constant (virtual_incoming_args_rtx,
- -RS6000_SAVE_AREA - 8))
-
-/* Windows NT specifies that r13 is reserved to the OS, so it is not available
- to the normal user. */
-
-#undef FIXED_R13
-#define FIXED_R13 1
-
-/* This says how to output an assembler line
- to define a global common symbol. */
-
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGNMENT) \
- do { fputs ("\t.comm \t", (FILE)); \
- assemble_name ((FILE), (NAME)); \
- if ( (SIZE) > 4) \
- fprintf ((FILE), ",%d,%d\n", (SIZE), 3); \
- else \
- fprintf( (FILE), ",%d\n", (SIZE)); \
- } while (0)
-
-#undef ASM_OUTPUT_ALIGNED_LOCAL
-
-/* This says how to output an assembler line
- to define a global common symbol. */
-
-#undef ASM_OUTPUT_COMMON
-#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
- do { fputs ("\t.comm \t", (FILE)); \
- assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), ",%d\n", (SIZE)); } while (0)
-
-/* This says how to output an assembler line
- to define an aligned local common symbol. */
-
-#undef ASM_OUTPUT_ALIGNED_LOCAL
-#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
-do { \
- bss_section (); \
- ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
- ASM_OUTPUT_LABEL (FILE, NAME); \
- ASM_OUTPUT_SKIP (FILE, SIZE); \
-} while (0)
-
-/* Describe how to emit uninitialized external linkage items */
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-do { \
- ASM_GLOBALIZE_LABEL (FILE, NAME); \
- ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
-} while (0)
-
-/* This says out to put a global symbol in the BSS section */
-#undef ASM_OUTPUT_ALIGNED_BSS
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
- asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
-
-
-/* Stuff to force fit us into the Motorola PPC assembler */
-
-#undef ASM_FILE_START
-#define ASM_FILE_START(FILE) \
-do { \
- output_file_directive ((FILE), main_input_filename); \
- rs6000_file_start (FILE, TARGET_CPU_DEFAULT); \
- data_section (); \
-} while (0)
-
-#undef ASM_FILE_END
-
-#undef ASM_DECLARE_FUNCTION_NAME
-#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
-{ \
- tree exception_args; \
- int i; \
- \
- if (TREE_PUBLIC (DECL)) \
- { \
- fprintf (FILE, "\t.globl .."); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } \
- \
- fprintf (FILE, "\n#\tFunction: '.."); \
- assemble_name (FILE, NAME); \
- fputs ("'\n", FILE); \
- fputs ("#\tText in section: <default>\n\n", FILE); \
- fputs ("#\tSetup MS Structured-Exception-Handling\n", FILE); \
- fputs ("\t.pdata\n", FILE); \
- fputs ("\t.align 2\n", FILE); \
- fputs ("\t.ualong ..", FILE); \
- assemble_name (FILE, NAME); \
- fputs (",", FILE); \
- assemble_name (FILE, NAME); \
- fputs (".e,", FILE); \
- exception_args = lookup_attribute ("exception", \
- TYPE_ATTRIBUTES (TREE_TYPE (DECL))); \
- \
- if (exception_args) \
- exception_args = TREE_VALUE (exception_args); \
- \
- for (i = 0; i < 2; i++) \
- { \
- if (!exception_args) \
- fputs ("0,", FILE); \
- else \
- { \
- tree field = TREE_VALUE (exception_args); \
- exception_args = TREE_PURPOSE (exception_args); \
- if (TREE_CODE (field) == STRING_CST) \
- fprintf (FILE, "%.*s,", TREE_STRING_LENGTH (field), \
- TREE_STRING_POINTER (field)); \
- else if (TREE_CODE (field) == IDENTIFIER_NODE) \
- fprintf (FILE, "%.*s,", IDENTIFIER_LENGTH (field), \
- IDENTIFIER_POINTER (field)); \
- else \
- abort (); \
- } \
- } \
- \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ".b\n\n"); \
- fprintf (FILE, "#\tSwitch to the relocation section\n"); \
- fprintf (FILE, "\t.reldata\n"); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ":\n"); \
- fprintf (FILE, "\t.ualong .."); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ",.toc\n"); \
- \
- if (lookup_attribute ("dllexport", \
- TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \
- { \
- fprintf (FILE, "\t.globl __imp_"); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n__imp_"); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ":\n\t.ulong "); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } \
- \
- fprintf (FILE, "\t.section .text\n\t.align 2\n.."); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ":\n"); \
- fprintf (FILE, "\t.function\t.."); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
-}
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.ualong 0x%lx\n\t.long 0x%lx\n", \
- t[0] & 0xffffffff, t[1] & 0xffffffff); \
- } \
- else \
- { \
- char str[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \
- fprintf (FILE, "\t.double %s\n", str); \
- } \
- }
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.ualong 0x%lx\n", t & 0xffffffff); \
- } \
- else \
- { \
- char str[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.float %s\n", str); \
- } \
- }
-
-/* Output before instructions. */
-#undef TEXT_SECTION_ASM_OP
-#define TEXT_SECTION_ASM_OP "\t.text"
-
-/* Output before writable data. */
-#undef DATA_SECTION_ASM_OP
-#define DATA_SECTION_ASM_OP "\t.data"
-
-/* Output to the bss section. */
-#undef BSS_SECTION_ASM_OP
-#define BSS_SECTION_ASM_OP "\t.section .bss"
-
-/* Define the extra sections we need. We define a dummy TOC section,
- plus sections to hold the list of static constructors (.ctors) and
- destructors (.dtors). */
-
-#undef READONLY_DATA_SECTION
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_toc, in_ctors, in_dtors
-
-/* Define the routines to implement these extra sections. */
-
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS \
- CTORS_SECTION_FUNCTION \
- DTORS_SECTION_FUNCTION \
- TOC_SECTION_FUNCTION \
-
-#define TOC_SECTION_FUNCTION \
-void \
-toc_section () \
-{ \
-}
-
-#define CTORS_SECTION_ASM_OP ".section\t.ctors"
-#define CTORS_SECTION_FUNCTION \
-void \
-ctors_section () \
-{ \
- if (in_section != in_ctors) \
- { \
- fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
- in_section = in_ctors; \
- } \
-}
-
-#define DTORS_SECTION_ASM_OP ".section\t.dtors"
-#define DTORS_SECTION_FUNCTION \
-void \
-dtors_section () \
-{ \
- if (in_section != in_dtors) \
- { \
- fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
- in_section = in_dtors; \
- } \
-}
-
-#undef SELECT_SECTION
-#undef SELECT_RTX_SECTION
-
-/* Make sure __main gets called */
-#define INVOKE__main 1
-
-/* A C statement (sans semicolon) to output an element in the table of
- global constructors. */
-#undef ASM_OUTPUT_CONSTRUCTOR
-#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
- do { \
- ctors_section (); \
- fprintf (FILE, "\t.ualong "); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } while (0)
-
-/* A C statement (sans semicolon) to output an element in the table of
- global destructors. */
-#undef ASM_OUTPUT_DESTRUCTOR
-#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
- do { \
- dtors_section (); \
- fprintf (FILE, "\t.ualong "); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } while (0)
-
-
-/* Text to write out after a CALL that may be replaced by glue code by
- the loader. The motorola asm demands that, for dll support, a .znop
- be issued after a bl instruction, and the symbol on the .znop is the
- symbol on the bl instruction */
-
-#undef RS6000_CALL_GLUE
-#define RS6000_CALL_GLUE "nop #\tFIXME: only works for non-dll calls."
-
-#define RS6000_CALL_GLUE2 ".znop "
-
-#undef ASM_OUTPUT_SPECIAL_POOL_ENTRY
-
-/* Output something to declare an external symbol to the assembler. Most
- assemblers don't need this. */
-
-#undef ASM_OUTPUT_EXTERNAL
-
-#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
-{ \
- char *_name; \
- rtx _symref = XEXP (DECL_RTL (DECL), 0); \
- if ((TREE_CODE (DECL) == VAR_DECL \
- || TREE_CODE (DECL) == FUNCTION_DECL) \
- && (NAME)[strlen (NAME) - 1] != ']') \
- { \
- _name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
- strcpy (_name, XSTR (_symref, 0)); \
- XSTR (_symref, 0) = _name; \
- } \
- else \
- _name = XSTR (_symref, 0); \
- \
- if (DECL_FUNCTION_CODE (DECL) == 0) \
- { \
- fputs ("\t.extern ", FILE); \
- assemble_name (FILE, _name); \
- putc ('\n', FILE); \
- if (TREE_CODE (DECL) == FUNCTION_DECL) \
- { \
- fputs ("\t.extern ..", FILE); \
- assemble_name (FILE, _name); \
- putc ('\n', FILE); \
- } \
- } \
-}
-
-/* Similar, but for libcall. We only have to worry about the function name,
- not that of the descriptor. */
-
-#undef ASM_OUTPUT_EXTERNAL_LIBCALL
-
-#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
-{ fprintf (FILE, "\t.extern .."); \
- assemble_name (FILE, XSTR (FUN, 0)); \
- fprintf (FILE, "\n"); \
-}
-
-/* The prefix to add to user-visible assembler symbols. */
-
-#define USER_LABEL_PREFIX ".."
-
-/* Eliminate AIX style constant pool processing */
-#undef LEGITIMATE_CONSTANT_POOL_BASE_P
-#define LEGITIMATE_CONSTANT_POOL_BASE_P(X) 0
-
-#undef LEGITIMATE_CONSTANT_POOL_ADDRESS_P
-#define LEGITIMATE_CONSTANT_POOL_ADDRESS_P(X) 0
-
-#undef ASM_OUTPUT_SPECIAL_POOL_ENTRY
-
-#undef ASM_IDENTIFY_GCC
-#define ASM_IDENTIFY_GCC(x)
-
-/* Output assembler code for a block containing the constant parts
- of a trampoline, leaving space for the variable parts.
-
- The trampoline should set the static chain pointer to value placed
- into the trampoline and should branch to the specified routine. */
-#define TRAMPOLINE_TEMPLATE(FILE) rs6000_trampoline_template (FILE)
============================================================