Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
This commit is contained in:
parent
bb84e66919
commit
e9a25f70a0
2727
gcc/ChangeLog.11
2727
gcc/ChangeLog.11
File diff suppressed because it is too large
Load Diff
334
gcc/INSTALL
334
gcc/INSTALL
|
@ -66,8 +66,7 @@ and includes all the necessary compilation tools and libraries.
|
|||
aliases. For example, `sun3' stands for `m68k-sun', so
|
||||
`sun3-sunos4.1' is another way to specify a Sun 3. You can also
|
||||
use simply `sun3-sunos', since the version of SunOS is assumed by
|
||||
default to be version 4. `sun3-bsd' also works, since `configure'
|
||||
knows that the only BSD variant on a Sun 3 is SunOS.
|
||||
default to be version 4.
|
||||
|
||||
You can specify a version number after any of the system types,
|
||||
and some of the CPU types. In most cases, the version is
|
||||
|
@ -104,11 +103,11 @@ and includes all the necessary compilation tools and libraries.
|
|||
are
|
||||
`hppa1.0-ANY-ANY', `hppa1.1-ANY-ANY', `i386-ANY-sysv',
|
||||
`i386-ANY-isc',
|
||||
`i860-ANY-bsd', `m68k-bull-sysv', `m68k-hp-hpux',
|
||||
`m68k-sony-bsd',
|
||||
`m68k-altos-sysv', `m68000-hp-hpux', `m68000-att-sysv',
|
||||
`ANY-lynx-lynxos', and `mips-ANY'). On any other system,
|
||||
`--with-gnu-as' has no effect.
|
||||
`i860-ANY-bsd', `m68k-bull-sysv',
|
||||
`m68k-hp-hpux', `m68k-sony-bsd',
|
||||
`m68k-altos-sysv', `m68000-hp-hpux',
|
||||
`m68000-att-sysv', `ANY-lynx-lynxos', and `mips-ANY'). On
|
||||
any other system, `--with-gnu-as' has no effect.
|
||||
|
||||
On the systems listed above (except for the HP-PA, for ISC on
|
||||
the 386, and for `mips-sgi-irix5.*'), if you use GAS, you
|
||||
|
@ -162,6 +161,16 @@ and includes all the necessary compilation tools and libraries.
|
|||
`--nfp' currently has no effect, though perhaps there are
|
||||
other systems where it could usefully make a difference.
|
||||
|
||||
`--enable-objcthreads=TYPE'
|
||||
Certain systems, notably Linux-based GNU systems, can't be
|
||||
relied on to supply a threads facility for the Objective C
|
||||
runtime and so will default to single-threaded runtime. They
|
||||
may, however, have a library threads implementation
|
||||
available, in which case threads can be enabled with this
|
||||
option by supplying a suitable TYPE, probably `posix'. The
|
||||
possibilities for TYPE are `single', `posix', `win32',
|
||||
`solaris', `irix' and `mach'.
|
||||
|
||||
The `configure' script searches subdirectories of the source
|
||||
directory for other compilers that are to be integrated into GNU
|
||||
CC. The GNU compiler for C++, called G++ is in a subdirectory
|
||||
|
@ -217,6 +226,17 @@ and includes all the necessary compilation tools and libraries.
|
|||
different convention (not `/usr/local') for where to put
|
||||
site-specific files.
|
||||
|
||||
The default value for `--local-prefix' is `/usr/local' regardless
|
||||
of the value of `--prefix'. Specifying `--prefix' has no effect
|
||||
on which directory GNU CC searches for local header files. This
|
||||
may seem counterintuitive, but actually it is logical.
|
||||
|
||||
The purpose of `--prefix' is to specify where to *install GNU CC*.
|
||||
The local header files in `/usr/local/include'--if you put any in
|
||||
that directory--are not part of GNU CC. They are part of other
|
||||
programs--perhaps many others. (GNU CC installs its own header
|
||||
files in another directory which is based on the `--prefix' value.)
|
||||
|
||||
*Do not* specify `/usr' as the `--local-prefix'! The directory
|
||||
you use for `--local-prefix' *must not* contain any of the
|
||||
system's standard header files. If it did contain them, certain
|
||||
|
@ -224,6 +244,11 @@ and includes all the necessary compilation tools and libraries.
|
|||
targets), because this would override and nullify the header file
|
||||
corrections made by the `fixincludes' script.
|
||||
|
||||
Indications are that people who use this option use it based on
|
||||
mistaken ideas of what it is for. People use it as if it specified
|
||||
where to install part of GNU CC. Perhaps they make this assumption
|
||||
because installing GNU CC creates the directory.
|
||||
|
||||
6. Make sure the Bison parser generator is installed. (This is
|
||||
unnecessary if the Bison output files `c-parse.c' and `cexp.c' are
|
||||
more recent than `c-parse.y' and `cexp.y' and you do not plan to
|
||||
|
@ -400,11 +425,14 @@ and includes all the necessary compilation tools and libraries.
|
|||
compiler driver program looks for them. Here TARGET is the target
|
||||
machine type specified when you ran `configure', and VERSION is
|
||||
the version number of GNU CC. This naming scheme permits various
|
||||
versions and/or cross-compilers to coexist.
|
||||
versions and/or cross-compilers to coexist. It also copies the
|
||||
executables for compilers for other languages (e.g., `cc1plus' for
|
||||
C++) to the same directory.
|
||||
|
||||
This also copies the driver program `xgcc' into
|
||||
`/usr/local/bin/gcc', so that it appears in typical execution
|
||||
search paths.
|
||||
search paths. It also copies `gcc.1' into `/usr/local/man/man1'
|
||||
and info pages into `/usr/local/info'.
|
||||
|
||||
On some systems, this command causes recompilation of some files.
|
||||
This is usually due to bugs in `make'. You should either ignore
|
||||
|
@ -427,23 +455,65 @@ and includes all the necessary compilation tools and libraries.
|
|||
a C++ run-time library. All I/O functionality, special class
|
||||
libraries, etc., are available in the libg++ distribution.
|
||||
|
||||
17. GNU CC includes a runtime library for Objective-C because it is an
|
||||
integral part of the language. You can find the files associated
|
||||
with the library in the subdirectory `objc'. The GNU Objective-C
|
||||
Runtime Library requires header files for the target's C library in
|
||||
order to be compiled,and also requires the header files for the
|
||||
target's thread library if you want thread support. *Note
|
||||
Cross-Compilers and Header Files: Cross Headers, for discussion
|
||||
about header files issues for cross-compilation.
|
||||
|
||||
When you run `configure', it picks the appropriate Objective-C
|
||||
thread implementation file for the target platform. In some
|
||||
situations, you may wish to choose a different back-end as some
|
||||
platforms support multiple thread implementations or you may wish
|
||||
to disable thread support completely. You do this by specifying a
|
||||
value for the OBJC_THREAD_FILE makefile variable on the command
|
||||
line when you run make, for example:
|
||||
|
||||
make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" OBJC_THREAD_FILE=thr-single
|
||||
|
||||
Below is a list of the currently available back-ends.
|
||||
|
||||
* thr-single Disable thread support, should work for all
|
||||
platforms.
|
||||
|
||||
* thr-decosf1 DEC OSF/1 thread support.
|
||||
|
||||
* thr-irix SGI IRIX thread support.
|
||||
|
||||
* thr-mach Generic MACH thread support, known to work on
|
||||
NEXTSTEP.
|
||||
|
||||
* thr-os2 IBM OS/2 thread support.
|
||||
|
||||
* thr-posix Generix POSIX thread support.
|
||||
|
||||
* thr-pthreads PCThreads on Linux-based GNU systems.
|
||||
|
||||
* thr-solaris SUN Solaris thread support.
|
||||
|
||||
* thr-win32 Microsoft Win32 API thread support.
|
||||
|
||||
Configurations Supported by GNU CC
|
||||
==================================
|
||||
|
||||
Here are the possible CPU types:
|
||||
|
||||
1750a, a29k, alpha, arm, cN, clipper, dsp16xx, elxsi, h8300,
|
||||
hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m68000, m68k,
|
||||
m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, powerpcle,
|
||||
pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, vax, we32k.
|
||||
hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m32r,
|
||||
m68000, m68k, m88k, mips, mipsel, mips64, mips64el, ns32k,
|
||||
powerpc, powerpcle, pyramid, romp, rs6000, sh, sparc, sparclite,
|
||||
sparc64, vax, we32k.
|
||||
|
||||
Here are the recognized company names. As you can see, customary
|
||||
abbreviations are used rather than the longer official names.
|
||||
|
||||
acorn, alliant, altos, apollo, att, bull, cbm, convergent, convex,
|
||||
crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp, ibm,
|
||||
intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus,
|
||||
sequent, sgi, sony, sun, tti, unicom, wrs.
|
||||
acorn, alliant, altos, apollo, apple, att, bull, cbm, convergent,
|
||||
convex, crds, dec, dg, dolphin, elxsi, encore, harris, hitachi,
|
||||
hp, ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron,
|
||||
plexus, sequent, sgi, sony, sun, tti, unicom, wrs.
|
||||
|
||||
The company name is meaningful only to disambiguate when the rest of
|
||||
the information supplied is insufficient. You can omit it, writing
|
||||
|
@ -452,9 +522,9 @@ is equivalent to `vax-dec-ultrix4.2'.
|
|||
|
||||
Here is a list of system types:
|
||||
|
||||
386bsd, aix, acis, amigaos, aos, aout, bosx, bsd, clix, coff,
|
||||
386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff,
|
||||
ctix, cxux, dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms,
|
||||
genix, gnu, gnu/linux, hiux, hpux, iris, irix, isc, luna, lynxos,
|
||||
genix, gnu, linux-gnu, hiux, hpux, iris, irix, isc, luna, lynxos,
|
||||
mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf, osfrose,
|
||||
ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym, sysv,
|
||||
udi, ultrix, unicos, uniplus, unos, vms, vsta, vxworks, winnt,
|
||||
|
@ -505,12 +575,11 @@ special things you must know:
|
|||
`1750a-*-*'
|
||||
MIL-STD-1750A processors.
|
||||
|
||||
Starting with GCC 2.6.1, the MIL-STD-1750A cross configuration no
|
||||
longer supports the Tektronix Assembler, but instead produces
|
||||
output for `as1750', an assembler/linker available under the GNU
|
||||
Public License for the 1750A. Contact *kellogg@space.otn.dasa.de*
|
||||
for more details on obtaining `as1750'. A similarly licensed
|
||||
simulator for the 1750A is available from same address.
|
||||
The MIL-STD-1750A cross configuration produces output for
|
||||
`as1750', an assembler/linker available under the GNU Public
|
||||
License for the 1750A. `as1750' can be obtained at
|
||||
*ftp://ftp.fta-berlin.de/pub/crossgcc/1750gals/*. A similarly
|
||||
licensed simulator for the 1750A is available from same address.
|
||||
|
||||
You should ignore a fatal error during the building of libgcc
|
||||
(libgcc is not yet implemented for the 1750A.)
|
||||
|
@ -589,15 +658,27 @@ special things you must know:
|
|||
DBX. DEC is now aware of this problem with the assembler and
|
||||
hopes to provide a fix shortly.
|
||||
|
||||
`arm'
|
||||
`arc-*-elf'
|
||||
Argonaut ARC processor. This configuration is intended for
|
||||
embedded systems.
|
||||
|
||||
`arm-*-aout'
|
||||
Advanced RISC Machines ARM-family processors. These are often
|
||||
used in embedded applications. There are no standard Unix
|
||||
configurations. This configuration corresponds to the basic
|
||||
instruction sequences and will produce a.out format object modules.
|
||||
instruction sequences and will produce `a.out' format object
|
||||
modules.
|
||||
|
||||
You may need to make a variant of the file `arm.h' for your
|
||||
particular configuration.
|
||||
|
||||
`arm-*-linuxaout'
|
||||
Any of the ARM family processors running the Linux-based GNU
|
||||
system with the `a.out' binary format (ELF is not yet supported).
|
||||
You must use version 2.8.1.0.7 or later of the Linux binutils,
|
||||
which you can download from `sunsite.unc.edu:/pub/Linux/GCC' and
|
||||
other mirror sites for Linux-based GNU systems.
|
||||
|
||||
`arm-*-riscix'
|
||||
The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD
|
||||
Unix. If you are running a version of RISC iX prior to 1.2 then
|
||||
|
@ -651,82 +732,55 @@ special things you must know:
|
|||
A port to the AT&T DSP1610 family of processors.
|
||||
|
||||
`h8300-*-*'
|
||||
Hitachi H8/300 series of processors.
|
||||
|
||||
The calling convention and structure layout has changed in release
|
||||
2.6. All code must be recompiled. The calling convention now
|
||||
passes the first three arguments in function calls in registers.
|
||||
Structures are no longer a multiple of 2 bytes.
|
||||
|
||||
`hppa*-*-*'
|
||||
There are two variants of this CPU, called 1.0 and 1.1, which have
|
||||
different machine descriptions. You must use the right one for
|
||||
your machine. All 7NN machines and 8N7 machines use 1.1, while
|
||||
all other 8NN machines use 1.0.
|
||||
|
||||
The easiest way to handle this problem is to use `configure hpNNN'
|
||||
or `configure hpNNN-hpux', where NNN is the model number of the
|
||||
machine. Then `configure' will figure out if the machine is a 1.0
|
||||
or 1.1. Use `uname -a' to find out the model number of your
|
||||
machine.
|
||||
There are several variants of the HP-PA processor which run a
|
||||
variety of operating systems. GNU CC must be configured to use
|
||||
the correct processor type and operating system, or GNU CC will
|
||||
not function correctly. The easiest way to handle this problem is
|
||||
to *not* specify a target when configuring GNU CC, the `configure'
|
||||
script will try to automatically determine the right processor
|
||||
type and operating system.
|
||||
|
||||
`-g' does not work on HP-UX, since that system uses a peculiar
|
||||
debugging format which GNU CC does not know about. However, `-g'
|
||||
will work if you also use GAS and GDB in conjunction with GCC. We
|
||||
highly recommend using GAS for all HP-PA configurations.
|
||||
|
||||
You should be using GAS-2.3 (or later) along with GDB-4.12 (or
|
||||
You should be using GAS-2.6 (or later) along with GDB-4.16 (or
|
||||
later). These can be retrieved from all the traditional GNU ftp
|
||||
archive sites.
|
||||
|
||||
Build GAS and install the resulting binary as:
|
||||
GAS will need to be installed into a directory before `/bin',
|
||||
`/usr/bin', and `/usr/ccs/bin' in your search path. You should
|
||||
install GAS before you build GNU CC.
|
||||
|
||||
/usr/local/lib/gcc-lib/CONFIGURATION/GCCVERSION/as
|
||||
|
||||
where CONFIGURATION is the configuration name (perhaps
|
||||
`hpNNN-hpux') and GCCVERSION is the GNU CC version number. Do
|
||||
this *before* starting the build process, otherwise you will get
|
||||
errors from the HPUX assembler while building `libgcc2.a'. The
|
||||
command
|
||||
|
||||
make install-dir
|
||||
|
||||
will create the necessary directory hierarchy so you can install
|
||||
GAS before building GCC.
|
||||
|
||||
To enable debugging, configure GNU CC with the `--with-gnu-as'
|
||||
option before building.
|
||||
|
||||
It has been reported that GNU CC produces invalid assembly code for
|
||||
1.1 machines running HP-UX 8.02 when using the HP assembler.
|
||||
Typically the errors look like this:
|
||||
as: bug.s @line#15 [err#1060]
|
||||
Argument 0 or 2 in FARG upper
|
||||
- lookahead = ARGW1=FR,RTNVAL=GR
|
||||
as: foo.s @line#28 [err#1060]
|
||||
Argument 0 or 2 in FARG upper
|
||||
- lookahead = ARGW1=FR
|
||||
|
||||
You can check the version of HP-UX you are running by executing
|
||||
the command `uname -r'. If you are indeed running HP-UX 8.02 on
|
||||
a PA and using the HP assembler then configure GCC with
|
||||
"hpNNN-hpux8.02".
|
||||
To enable debugging, you must configure GNU CC with the
|
||||
`--with-gnu-as' option before building.
|
||||
|
||||
`i370-*-*'
|
||||
This port is very preliminary and has many known bugs. We hope to
|
||||
have a higher-quality port for this machine soon.
|
||||
|
||||
`i386-*-linuxoldld'
|
||||
Use this configuration to generate a.out binaries on Linux if you
|
||||
do not have gas/binutils version 2.5.2 or later installed. This is
|
||||
an obsolete configuration.
|
||||
`i386-*-linux-gnuoldld'
|
||||
Use this configuration to generate `a.out' binaries on Linux-based
|
||||
GNU systems if you do not have gas/binutils version 2.5.2 or later
|
||||
installed. This is an obsolete configuration.
|
||||
|
||||
`i386-*-linuxaout'
|
||||
Use this configuration to generate a.out binaries on Linux. This
|
||||
configuration is being superseded. You must use gas/binutils
|
||||
version 2.5.2 or later.
|
||||
`i386-*-linux-gnuaout'
|
||||
Use this configuration to generate `a.out' binaries on Linux-based
|
||||
GNU systems. This configuration is being superseded. You must use
|
||||
gas/binutils version 2.5.2 or later.
|
||||
|
||||
`i386-*-linux'
|
||||
Use this configuration to generate ELF binaries on Linux. You must
|
||||
use gas/binutils version 2.5.2 or later.
|
||||
`i386-*-linux-gnu'
|
||||
Use this configuration to generate ELF binaries on Linux-based GNU
|
||||
systems. You must use gas/binutils version 2.5.2 or later.
|
||||
|
||||
`i386-*-sco'
|
||||
Compilation with RCC is recommended. Also, it may be a good idea
|
||||
|
@ -736,6 +790,27 @@ special things you must know:
|
|||
`i386-*-sco3.2v4'
|
||||
Use this configuration for SCO release 3.2 version 4.
|
||||
|
||||
`i386-*-sco3.2v5*'
|
||||
Use this for the SCO OpenServer Release family including 5.0.0,
|
||||
5.0.2, 5.0.4, Internet FastStart 1.0, and Internet FastStart 1.1.
|
||||
|
||||
GNU CC can generate ELF binaries (if you specify `-melf') or COFF
|
||||
binaries (the default). If you are going to build your compiler
|
||||
in ELF mode (once you have bootstrapped the first stage compiler)
|
||||
you *must* specify `-melf' as part of `CC', *not* `CFLAGS', for
|
||||
example as `CC="stage1/xgcc -melf -Bstage1/" '. If you do not do
|
||||
this, the bootstrap will generate incorrect versions of `libgcc.a'.
|
||||
|
||||
You must have TLS597 (from ftp.sco.com/TLS) installed for ELF
|
||||
binaries to work correctly. Note that Open Server 5.0.2 *does*
|
||||
need TLS597 installed.
|
||||
|
||||
*NOTE:* You must follow the instructions about invoking `make
|
||||
bootstrap' because the native OpenServer compiler builds a
|
||||
`cc1plus' that will not correctly parse many valid C++ programs.
|
||||
You must do a `make bootstrap' if you are building with the native
|
||||
compiler.
|
||||
|
||||
`i386-*-isc'
|
||||
It may be a good idea to link with GNU malloc instead of the
|
||||
malloc that comes with the system.
|
||||
|
@ -748,8 +823,8 @@ special things you must know:
|
|||
that comes with the system.
|
||||
|
||||
`i386-ibm-aix'
|
||||
You need to use GAS version 2.1 or later, and and LD from GNU
|
||||
binutils version 2.2 or later.
|
||||
You need to use GAS version 2.1 or later, and LD from GNU binutils
|
||||
version 2.2 or later.
|
||||
|
||||
`i386-sequent-bsd'
|
||||
Go to the Berkeley universe before compiling. In addition, you
|
||||
|
@ -773,7 +848,7 @@ special things you must know:
|
|||
Sun systems.
|
||||
|
||||
`i[345]86-*-winnt3.5'
|
||||
This version requires a GAS that has not let been released. Until
|
||||
This version requires a GAS that has not yet been released. Until
|
||||
it is, you can get a prebuilt binary version via anonymous ftp from
|
||||
`cs.washington.edu:pub/gnat' or `cs.nyu.edu:pub/gnat'. You must
|
||||
also use the Microsoft header files from the Windows NT 3.5 SDK.
|
||||
|
@ -829,9 +904,13 @@ special things you must know:
|
|||
You can tell GNU CC to use the GNU assembler and linker, by
|
||||
specifying `--with-gnu-as --with-gnu-ld' when configuring. These
|
||||
will produce COFF format object files and executables; otherwise
|
||||
GNU CC will use the installed tools, which produce a.out format
|
||||
GNU CC will use the installed tools, which produce `a.out' format
|
||||
executables.
|
||||
|
||||
`m32r-*-elf'
|
||||
Mitsubishi M32R processor. This configuration is intended for
|
||||
embedded systems.
|
||||
|
||||
`m68000-hp-bsd'
|
||||
HP 9000 series 200 running BSD. Note that the C compiler that
|
||||
comes with this system cannot compile GNU CC; contact
|
||||
|
@ -842,6 +921,20 @@ special things you must know:
|
|||
Also, you must fix a kernel bug. Details in the file
|
||||
`README.ALTOS'.
|
||||
|
||||
`m68k-apple-aux'
|
||||
Apple Macintosh running A/UX. You may configure GCC to use
|
||||
either the system assembler and linker or the GNU assembler and
|
||||
linker. You should use the GNU configuration if you can,
|
||||
especially if you also want to use GNU C++. You enabled that
|
||||
configuration with + the `--with-gnu-as' and `--with-gnu-ld'
|
||||
options to `configure'.
|
||||
|
||||
Note the C compiler that comes with this system cannot compile GNU
|
||||
CC. You can fine binaries of GNU CC for bootstrapping on
|
||||
`jagubox.gsfc.nasa.gov'. You will also a patched version of
|
||||
`/bin/ld' there that raises some of the arbitrary limits found in
|
||||
the original.
|
||||
|
||||
`m68k-att-sysv'
|
||||
AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to
|
||||
compile GNU CC with this machine's standard C compiler, due to
|
||||
|
@ -853,7 +946,7 @@ special things you must know:
|
|||
However, the following procedure might work. We are unable to
|
||||
test it.
|
||||
|
||||
1. Comment out the `#include "config.h"' line on line 37 of
|
||||
1. Comment out the `#include "config.h"' line near the start of
|
||||
`cccp.c' and do `make cpp'. This makes a preliminary version
|
||||
of GNU cpp.
|
||||
|
||||
|
@ -1148,48 +1241,79 @@ special things you must know:
|
|||
prevent the linker from producing a correct library or runnable
|
||||
executable.
|
||||
|
||||
By default, AIX 4.1 produces code that can be used on either Power
|
||||
or PowerPC processors.
|
||||
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpc-*-elf'
|
||||
`powerpc-*-sysv4'
|
||||
PowerPC system in big endian mode, running System V.4.
|
||||
|
||||
This configuration is currently under development.
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpc-*-linux-gnu'
|
||||
PowerPC system in big endian mode, running the Linux-based GNU
|
||||
system.
|
||||
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpc-*-eabiaix'
|
||||
Embedded PowerPC system in big endian mode with -mcall-aix
|
||||
selected as the default. This system is currently under
|
||||
development.
|
||||
selected as the default.
|
||||
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpc-*-eabisim'
|
||||
Embedded PowerPC system in big endian mode for use in running
|
||||
under the PSIM simulator. This system is currently under
|
||||
development.
|
||||
under the PSIM simulator.
|
||||
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpc-*-eabi'
|
||||
Embedded PowerPC system in big endian mode.
|
||||
|
||||
This configuration is currently under development.
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpcle-*-elf'
|
||||
`powerpcle-*-sysv4'
|
||||
PowerPC system in little endian mode, running System V.4.
|
||||
|
||||
This configuration is currently under development.
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpcle-*-sysv4'
|
||||
Embedded PowerPC system in little endian mode.
|
||||
`powerpcle-*-solaris2*'
|
||||
PowerPC system in little endian mode, running Solaris 2.5.1 or
|
||||
higher.
|
||||
|
||||
This system is currently under development.
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE. Beta
|
||||
versions of the Sun 4.0 compiler do not seem to be able to build
|
||||
GNU CC correctly. There are also problems with the host assembler
|
||||
and linker that are fixed by using the GNU versions of these tools.
|
||||
|
||||
`powerpcle-*-eabisim'
|
||||
Embedded PowerPC system in little endian mode for use in running
|
||||
under the PSIM simulator.
|
||||
|
||||
This system is currently under development.
|
||||
|
||||
`powerpcle-*-eabi'
|
||||
Embedded PowerPC system in little endian mode.
|
||||
|
||||
This configuration is currently under development.
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`powerpcle-*-winnt'
|
||||
`powerpcle-*-pe'
|
||||
PowerPC system in little endian mode running Windows NT.
|
||||
|
||||
You can specify a default version for the `-mcpu='CPU_TYPE switch
|
||||
by using the configure option `--with-cpu-'CPU_TYPE.
|
||||
|
||||
`vax-dec-ultrix'
|
||||
Don't try compiling with Vax C (`vcc'). It produces incorrect code
|
||||
|
@ -1380,10 +1504,10 @@ supports.
|
|||
|
||||
If you want to install libraries to use with the cross-compiler,
|
||||
such as a standard C library, put them in the directory
|
||||
`/usr/local/TARGET/lib'; installation of GNU CC copies all all the
|
||||
files in that subdirectory into the proper place for GNU CC to find
|
||||
them and link with them. Here's an example of copying some libraries
|
||||
from a target machine:
|
||||
`/usr/local/TARGET/lib'; installation of GNU CC copies all the files in
|
||||
that subdirectory into the proper place for GNU CC to find them and
|
||||
link with them. Here's an example of copying some libraries from a
|
||||
target machine:
|
||||
|
||||
ftp TARGET-MACHINE
|
||||
lcd /usr/local/TARGET/lib
|
||||
|
@ -1524,7 +1648,7 @@ from the host machine, the cross-compiler can use them also.
|
|||
Otherwise, you're on your own in finding header files to use when
|
||||
cross-compiling.
|
||||
|
||||
When you have found suitable header files, put them in
|
||||
When you have found suitable header files, put them in the directory
|
||||
`/usr/local/TARGET/include', before building the cross compiler. Then
|
||||
installation will run fixincludes properly and install the corrected
|
||||
versions of the header files where the compiler will use them.
|
||||
|
@ -1604,6 +1728,12 @@ it by using the following command to compile GNU CC with Sun CC:
|
|||
|
||||
make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
|
||||
|
||||
SunOS 4.1.3 and 4.1.3_U1 have bugs that can cause intermittent core
|
||||
dumps when compiling GNU CC. A common symptom is an internal compiler
|
||||
error which does not recur if you run it again. To fix the problem,
|
||||
install Sun recommended patch 100726 (for SunOS 4.1.3) or 101508 (for
|
||||
SunOS 4.1.3_U1), or upgrade to a later SunOS release.
|
||||
|
||||
Installing GNU CC on VMS
|
||||
========================
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ LEX = flex
|
|||
LEXFLAGS =
|
||||
AR = ar
|
||||
AR_FLAGS = rc
|
||||
LN = @symbolic_link@
|
||||
DLLTOOL = dlltool
|
||||
SHELL = /bin/sh
|
||||
# on sysV, define this as cp.
|
||||
|
@ -174,6 +175,14 @@ SYSTEM_HEADER_DIR = /usr/include
|
|||
# Control whether to run fixproto.
|
||||
STMP_FIXPROTO = stmp-fixproto
|
||||
|
||||
# Test to see whether <float.h> exists in the system header files,
|
||||
# and is not derived from GCC.
|
||||
FLOAT_H_TEST = \
|
||||
[ -f $(SYSTEM_HEADER_DIR)/float.h ] && \
|
||||
if grep 'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR)/float.h >/dev/null; \
|
||||
then false; \
|
||||
else :; fi
|
||||
|
||||
# Test to see whether <limits.h> exists in the system header files.
|
||||
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
|
||||
|
||||
|
@ -427,6 +436,9 @@ CRTSTUFF_T_CFLAGS =
|
|||
# Extra flags to use when compiling [m]crt0.o.
|
||||
CRT0STUFF_T_CFLAGS =
|
||||
|
||||
# "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
|
||||
T =
|
||||
|
||||
# End of variables for you to override.
|
||||
|
||||
# Definition of `all' is here so that new rules inserted by sed
|
||||
|
@ -647,9 +659,6 @@ RTL_H = rtl.h rtl.def machmode.h machmode.def
|
|||
TREE_H = tree.h real.h tree.def machmode.h machmode.def
|
||||
BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
|
||||
BASIC_BLOCK_H = basic-block.h bitmap.h
|
||||
|
||||
# "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
|
||||
T =
|
||||
#
|
||||
# Language makefile fragments.
|
||||
|
||||
|
@ -702,9 +711,9 @@ $(srcdir)/config.in: $(srcdir)/cstamp-h.in
|
|||
$(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
|
||||
cd $(srcdir) && autoheader
|
||||
echo timestamp > $(srcdir)/cstamp-h.in
|
||||
config.h: cstamp-h ; @true
|
||||
auto-config.h: cstamp-h ; @true
|
||||
cstamp-h: config.in config.status
|
||||
CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
|
||||
CONFIG_HEADERS=auto-config.h:config.in $(SHELL) config.status
|
||||
|
||||
# Really, really stupid make features, such as SUN's KEEP_STATE, may force
|
||||
# a target to build even if it is up-to-date. So we must verify that
|
||||
|
@ -731,7 +740,7 @@ start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
|
|||
rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
|
||||
# This is what is made with the host's compiler
|
||||
# whether making a cross compiler or not.
|
||||
native: config.status config.h cpp $(LANGUAGES) \
|
||||
native: config.status auto-config.h cpp $(LANGUAGES) \
|
||||
$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
|
||||
|
||||
# Define the names for selecting languages in LANGUAGES.
|
||||
|
@ -766,8 +775,9 @@ stamp-objlist: $(OBJS) $(BC_OBJS)
|
|||
# We call this executable `xgcc' rather than `gcc'
|
||||
# to avoid confusion if the current directory is in the path
|
||||
# and CC is `gcc'. It is renamed to `gcc' when it is installed.
|
||||
xgcc: gcc.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o \
|
||||
xgcc: gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \
|
||||
$(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \
|
||||
choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
|
||||
|
||||
# Dump a specs file to make -B./ read these specs over installed ones.
|
||||
|
@ -790,8 +800,10 @@ gfloat.h: $(FLOAT_H)
|
|||
cp $(FLOAT_H) gfloat.h
|
||||
|
||||
# Create float.h source for the native machine.
|
||||
# Make it empty if we can use the system float.h without changes.
|
||||
float.h-nat: enquire
|
||||
-./enquire -f > tmp-float.h
|
||||
grep '#define [^_]' tmp-float.h >/dev/null || echo > tmp-float.h
|
||||
mv tmp-float.h float.h-nat
|
||||
|
||||
# Create a dummy float.h source for a cross-compiler.
|
||||
|
@ -808,8 +820,15 @@ float.h-cross:
|
|||
enquire: enquire.o $(GCC_PARTS)
|
||||
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
|
||||
enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
|
||||
# Breaking this line caused a problem with one version of GNU make.
|
||||
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
|
||||
rm -f include/float.h
|
||||
if $(FLOAT_H_TEST); then \
|
||||
SYS_FLOAT_H_WRAP=1; \
|
||||
else :; \
|
||||
SYS_FLOAT_H_WRAP=0; \
|
||||
fi; \
|
||||
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \
|
||||
-DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \
|
||||
-I. -c $(srcdir)/enquire.c
|
||||
|
||||
# Build the version of limits.h that we will install.
|
||||
xlimits.h: glimits.h limitx.h limity.h
|
||||
|
@ -1248,6 +1267,10 @@ version.o: version.c
|
|||
obstack.o: obstack.c
|
||||
choose-temp.o: choose-temp.c
|
||||
pexecute.o: pexecute.c
|
||||
prefix.o: prefix.c $(CONFIG_H) Makefile
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
|
||||
-DPREFIX=\"$(prefix)\" \
|
||||
-c `echo $(srcdir)/prefix.c | sed 's,^\./,,'`
|
||||
|
||||
convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
|
||||
|
||||
|
@ -1285,7 +1308,7 @@ expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
|
|||
typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
|
||||
bc-emit.h modemap.def hard-reg-set.h
|
||||
calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
|
||||
insn-flags.h
|
||||
insn-flags.h regs.h
|
||||
expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
|
||||
insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
|
||||
explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
|
||||
|
@ -1302,28 +1325,29 @@ dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
|
|||
dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
|
||||
insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h expr.h
|
||||
xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
|
||||
emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
|
||||
function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
|
||||
bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
|
||||
emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h except.h \
|
||||
function.h regs.h insn-config.h recog.h real.h expr.h obstack.h \
|
||||
bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h \
|
||||
bc-opname.h
|
||||
real.o : real.c $(CONFIG_H) $(TREE_H)
|
||||
getpwd.o : getpwd.c $(CONFIG_H)
|
||||
|
||||
integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
|
||||
insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
|
||||
bytecode.h
|
||||
bytecode.h output.h recog.h except.h
|
||||
|
||||
jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
|
||||
insn-config.h insn-flags.h insn-codes.h expr.h real.h
|
||||
insn-config.h insn-flags.h recog.h expr.h real.h except.h
|
||||
stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
|
||||
|
||||
cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
|
||||
insn-config.h recog.h
|
||||
profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
|
||||
tree.h output.h
|
||||
tree.h output.h regs.h
|
||||
loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
|
||||
insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
|
||||
unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
|
||||
integrate.h regs.h flags.h expr.h loop.h
|
||||
unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h integrate.h regs.h \
|
||||
recog.h flags.h expr.h loop.h
|
||||
flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
|
||||
$(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h
|
||||
combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
|
||||
|
@ -1722,8 +1746,8 @@ bytecode.maintainer-clean: bytecode.clean
|
|||
cpp: $(CCCP)
|
||||
-rm -f cpp$(exeext)
|
||||
$(LN) $(CCCP)$(exeext) cpp$(exeext)
|
||||
cccp: cccp.o cexp.o version.o $(LIBDEPS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
|
||||
cccp: cccp.o cexp.o version.o prefix.o $(LIBDEPS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o prefix.o \
|
||||
version.o $(LIBS)
|
||||
cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
|
||||
|
@ -1743,9 +1767,9 @@ cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
|
|||
-c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
|
||||
|
||||
cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
|
||||
version.o $(LIBDEPS)
|
||||
prefix.o version.o $(LIBDEPS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
|
||||
cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
|
||||
cppalloc.o cpperror.o cppexp.o prefix.o version.o $(LIBS)
|
||||
|
||||
cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
|
||||
|
||||
|
@ -1879,11 +1903,13 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
|
|||
chmod a+r include/README
|
||||
touch stmp-int-hdrs
|
||||
|
||||
# Build the complete include directory.
|
||||
# Build the complete include directory, including float.h.
|
||||
stmp-headers: stmp-int-hdrs gfloat.h
|
||||
rm -f include/float.h
|
||||
cp gfloat.h include/float.h
|
||||
chmod a+r include/float.h
|
||||
if [ -s gfloat.h ]; then \
|
||||
cp gfloat.h include/float.h && \
|
||||
chmod a+r include/float.h; \
|
||||
else :; fi
|
||||
touch stmp-headers
|
||||
|
||||
# Build fixed copies of system files.
|
||||
|
@ -1937,10 +1963,10 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefil
|
|||
rm -rf fixtmp.c
|
||||
|
||||
fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
|
||||
cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
|
||||
cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o prefix.o version.o
|
||||
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
|
||||
scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
|
||||
cppexp.o $(HOST_LIBS)
|
||||
scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
|
||||
version.o cppexp.o $(HOST_LIBS)
|
||||
|
||||
fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
|
||||
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
|
||||
|
@ -2041,7 +2067,7 @@ mostlyclean: bytecode.mostlyclean lang.mostlyclean
|
|||
-rm -f */stamp-* */tmp-*
|
||||
# Delete debugging dump files.
|
||||
-rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
|
||||
-rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.regmove
|
||||
-rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.addressof *.regmove
|
||||
-rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
|
||||
-rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
|
||||
-rm -f */*.sched2 */*.stack */*.regmove
|
||||
|
@ -2088,7 +2114,7 @@ clean: mostlyclean bytecode.clean lang.clean
|
|||
# Delete all files that users would normally create
|
||||
# while building and installing GCC.
|
||||
distclean: clean bytecode.distclean lang.distclean
|
||||
-rm -f tm.h config.h config2.h tconfig.h hconfig.h md cstamp-h
|
||||
-rm -f tm.h config.h auto-config.h tconfig.h hconfig.h md cstamp-h
|
||||
-rm -f config.status config.run config.cache config.bak
|
||||
-rm -f Make-lang Make-hooks Make-host Make-target
|
||||
-rm -f Makefile specs.h options.h *.oaux
|
||||
|
@ -2206,12 +2232,14 @@ install-common: native installdirs $(EXTRA_PARTS) lang.install-common
|
|||
if [ x"$$file" != x.. ]; then \
|
||||
rm -f $(libsubdir)/$$file; \
|
||||
$(INSTALL_DATA) $$file $(libsubdir)/$$file; \
|
||||
chmod a-x $(libsubdir)/$$file; \
|
||||
else true; fi; \
|
||||
done
|
||||
# Don't mess with specs if it doesn't exist yet.
|
||||
-if [ -f specs ] ; then \
|
||||
rm -f $(libsubdir)/specs; \
|
||||
$(INSTALL_DATA) specs $(libsubdir)/specs; \
|
||||
chmod a-x $(libsubdir)/specs; \
|
||||
fi
|
||||
# Install protoize if it was compiled.
|
||||
-if [ -f protoize$(exeext) ]; \
|
||||
|
@ -2265,7 +2293,7 @@ install-info: doc installdirs lang.install-info
|
|||
|
||||
# Install the man pages.
|
||||
install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
|
||||
-if [ -f gcc-cross ] ; then \
|
||||
-if [ -f gcc-cross$(exeext) ] ; then \
|
||||
rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
|
||||
$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
|
||||
chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
|
||||
|
@ -2483,7 +2511,7 @@ check-g77: testsuite/site.exp
|
|||
TAGS: force
|
||||
cd $(srcdir); \
|
||||
mkdir temp; \
|
||||
mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
|
||||
mv -f c-parse.[ch] cexp.c =*.[chy] temp; \
|
||||
etags *.y *.h *.c; \
|
||||
mv temp/* .; \
|
||||
rmdir temp
|
||||
|
@ -2507,8 +2535,7 @@ gcc.xtar: distdir
|
|||
# This target exists to do the initial work before the language specific
|
||||
# stuff gets done.
|
||||
distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
|
||||
$(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
|
||||
$(srcdir)/cexp.c
|
||||
$(srcdir)/c-parse.c $(srcdir)/cexp.c
|
||||
@if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
|
||||
then true; \
|
||||
else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
|
||||
|
@ -2525,7 +2552,6 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
|
|||
mkdir tmp
|
||||
mkdir tmp/config
|
||||
mkdir tmp/ginclude
|
||||
mkdir tmp/objc
|
||||
for file in *[0-9a-zA-Z+]; do \
|
||||
$(LN) $$file tmp; \
|
||||
done
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
|
||||
/* Include the old config.h as config2.h to simplify the transition
|
||||
to autoconf. */
|
||||
#include "config2.h"
|
||||
|
||||
/* Whether malloc must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_MALLOC
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Bytecode conversion definitions for GNU C-compiler.
|
||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
|
@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "machmode.h"
|
||||
|
|
|
@ -18,8 +18,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "flags.h"
|
||||
#include "obstack.h"
|
||||
|
|
|
@ -86,10 +86,10 @@ extern int bitmap_bit_p PROTO((bitmap, int));
|
|||
|
||||
/* Debug functions to print a bitmap linked list. */
|
||||
extern void bitmap_debug PROTO((bitmap));
|
||||
extern void bitmap_debug_file STDIO_PROTO((FILE *, bitmap));
|
||||
extern void bitmap_debug_file PROTO((FILE *, bitmap));
|
||||
|
||||
/* Print a bitmap */
|
||||
extern void bitmap_print STDIO_PROTO((FILE *, bitmap, char *, char *));
|
||||
extern void bitmap_print PROTO((FILE *, bitmap, char *, char *));
|
||||
|
||||
/* Initialize a bitmap header. */
|
||||
extern bitmap bitmap_initialize PROTO((bitmap));
|
||||
|
|
75
gcc/c-decl.c
75
gcc/c-decl.c
|
@ -27,12 +27,12 @@ Boston, MA 02111-1307, USA. */
|
|||
line numbers. For example, the CONST_DECLs for enum values. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
#include "output.h"
|
||||
#include "c-tree.h"
|
||||
#include "c-lex.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/* In grokdeclarator, distinguish syntactic contexts of declarators. */
|
||||
enum decl_context
|
||||
|
@ -471,9 +471,14 @@ int explicit_flag_signed_bitfields = 0;
|
|||
|
||||
int flag_no_ident = 0;
|
||||
|
||||
/* Nonzero means warn about implicit declarations. */
|
||||
/* Nonzero means warn about use of implicit int. */
|
||||
|
||||
int warn_implicit;
|
||||
int warn_implicit_int;
|
||||
|
||||
/* Nonzero means message about use of implicit function declarations;
|
||||
1 means warning; 2 means error. */
|
||||
|
||||
int mesg_implicit_function_declaration;
|
||||
|
||||
/* Nonzero means give string constants the type `const char *'
|
||||
to get extra warnings from them. These warnings will be too numerous
|
||||
|
@ -648,10 +653,24 @@ c_decode_option (p)
|
|||
flag_no_ident = 0;
|
||||
else if (!strcmp (p, "-ansi"))
|
||||
flag_no_asm = 1, flag_no_nonansi_builtin = 1;
|
||||
else if (!strcmp (p, "-Werror-implicit-function-declaration"))
|
||||
mesg_implicit_function_declaration = 2;
|
||||
else if (!strcmp (p, "-Wimplicit-function-declaration"))
|
||||
mesg_implicit_function_declaration = 1;
|
||||
else if (!strcmp (p, "-Wno-implicit-function-declaration"))
|
||||
mesg_implicit_function_declaration = 0;
|
||||
else if (!strcmp (p, "-Wimplicit-int"))
|
||||
warn_implicit_int = 1;
|
||||
else if (!strcmp (p, "-Wno-implicit-int"))
|
||||
warn_implicit_int = 0;
|
||||
else if (!strcmp (p, "-Wimplicit"))
|
||||
warn_implicit = 1;
|
||||
{
|
||||
warn_implicit_int = 1;
|
||||
if (mesg_implicit_function_declaration != 2)
|
||||
mesg_implicit_function_declaration = 1;
|
||||
}
|
||||
else if (!strcmp (p, "-Wno-implicit"))
|
||||
warn_implicit = 0;
|
||||
warn_implicit_int = 0, mesg_implicit_function_declaration = 0;
|
||||
else if (!strcmp (p, "-Wwrite-strings"))
|
||||
warn_write_strings = 1;
|
||||
else if (!strcmp (p, "-Wno-write-strings"))
|
||||
|
@ -751,7 +770,8 @@ c_decode_option (p)
|
|||
warning about not using it without also specifying -O. */
|
||||
if (warn_uninitialized != 1)
|
||||
warn_uninitialized = 2;
|
||||
warn_implicit = 1;
|
||||
warn_implicit_int = 1;
|
||||
mesg_implicit_function_declaration = 1;
|
||||
warn_return_type = 1;
|
||||
warn_unused = 1;
|
||||
warn_switch = 1;
|
||||
|
@ -2467,9 +2487,15 @@ implicitly_declare (functionid)
|
|||
|
||||
rest_of_decl_compilation (decl, NULL_PTR, 0, 0);
|
||||
|
||||
if (warn_implicit && implicit_warning)
|
||||
warning ("implicit declaration of function `%s'",
|
||||
IDENTIFIER_POINTER (functionid));
|
||||
if (mesg_implicit_function_declaration && implicit_warning)
|
||||
{
|
||||
if (mesg_implicit_function_declaration == 2)
|
||||
error ("implicit declaration of function `%s'",
|
||||
IDENTIFIER_POINTER (functionid));
|
||||
else
|
||||
warning ("implicit declaration of function `%s'",
|
||||
IDENTIFIER_POINTER (functionid));
|
||||
}
|
||||
else if (warn_traditional && traditional_warning)
|
||||
warning ("function `%s' was previously declared within a block",
|
||||
IDENTIFIER_POINTER (functionid));
|
||||
|
@ -3880,6 +3906,9 @@ finish_decl (decl, init, asmspec_tree)
|
|||
else
|
||||
error_with_decl (decl, "storage size of `%s' isn't constant");
|
||||
}
|
||||
|
||||
if (TREE_USED (type))
|
||||
TREE_USED (decl) = 1;
|
||||
}
|
||||
|
||||
/* If this is a function and an assembler name is specified, it isn't
|
||||
|
@ -4361,9 +4390,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
|
|||
For now, issue a warning if -Wreturn-type and this is a function,
|
||||
or if -Wimplicit; prefer the former warning since it is more
|
||||
explicit. */
|
||||
if ((warn_implicit || warn_return_type) && funcdef_flag)
|
||||
if ((warn_implicit_int || warn_return_type) && funcdef_flag)
|
||||
warn_about_return_type = 1;
|
||||
else if (warn_implicit)
|
||||
else if (warn_implicit_int)
|
||||
warning ("type defaults to `int' in declaration of `%s'", name);
|
||||
}
|
||||
|
||||
|
@ -4709,6 +4738,18 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
|
|||
convert (index_type, size),
|
||||
convert (index_type, size_one_node)));
|
||||
|
||||
/* If that overflowed, the array is too big.
|
||||
??? While a size of INT_MAX+1 technically shouldn't cause
|
||||
an overflow (because we subtract 1), the overflow is recorded
|
||||
during the conversion to index_type, before the subtraction.
|
||||
Handling this case seems like an unnecessary complication. */
|
||||
if (TREE_OVERFLOW (itype))
|
||||
{
|
||||
error ("size of array `%s' is too large", name);
|
||||
type = error_mark_node;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (size_varies)
|
||||
itype = variable_size (itype);
|
||||
itype = build_index_type (itype);
|
||||
|
@ -4884,6 +4925,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
|
|||
|
||||
/* Now TYPE has the actual type. */
|
||||
|
||||
/* Did array size calculations overflow? */
|
||||
|
||||
if (TREE_CODE (type) == ARRAY_TYPE
|
||||
&& TYPE_SIZE (type)
|
||||
&& TREE_OVERFLOW (TYPE_SIZE (type)))
|
||||
error ("size of array `%s' is too large", name);
|
||||
|
||||
/* If this is declaring a typedef name, return a TYPE_DECL. */
|
||||
|
||||
if (specbits & (1 << (int) RID_TYPEDEF))
|
||||
|
@ -6211,7 +6259,10 @@ start_function (declspecs, declarator, prefix_attributes, attributes, nested)
|
|||
/* If the declarator is not suitable for a function definition,
|
||||
cause a syntax error. */
|
||||
if (decl1 == 0)
|
||||
return 0;
|
||||
{
|
||||
immediate_size_expand = old_immediate_size_expand;
|
||||
return 0;
|
||||
}
|
||||
|
||||
decl_attributes (decl1, prefix_attributes, attributes);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Language-specific hook definitions for C front end.
|
||||
Copyright (C) 1991, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1995, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
|
|
35
gcc/c-lex.c
35
gcc/c-lex.c
|
@ -1,5 +1,5 @@
|
|||
/* Lexical analyzer for C and Objective C.
|
||||
Copyright (C) 1987, 88, 89, 92, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987, 88, 89, 92, 94-96, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
|
@ -18,12 +18,12 @@ 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. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "input.h"
|
||||
|
@ -118,6 +118,8 @@ char *token_buffer; /* Pointer to token buffer.
|
|||
Actual allocated length is maxtoken + 2.
|
||||
This is not static because objc-parse.y uses it. */
|
||||
|
||||
static int indent_level = 0; /* Number of { minus number of }. */
|
||||
|
||||
/* Nonzero if end-of-file has been seen on input. */
|
||||
static int end_of_file;
|
||||
|
||||
|
@ -747,6 +749,7 @@ linenum:
|
|||
input_file_stack->line = old_lineno;
|
||||
p->next = input_file_stack;
|
||||
p->name = input_filename;
|
||||
p->indent_level = indent_level;
|
||||
input_file_stack = p;
|
||||
input_file_stack_tick++;
|
||||
debug_start_source_file (input_filename);
|
||||
|
@ -758,6 +761,14 @@ linenum:
|
|||
if (input_file_stack->next)
|
||||
{
|
||||
struct file_stack *p = input_file_stack;
|
||||
if (indent_level != p->indent_level)
|
||||
{
|
||||
warning_with_file_and_line
|
||||
(p->name, old_lineno,
|
||||
"This file contains more `%c's than `%c's.",
|
||||
indent_level > p->indent_level ? '{' : '}',
|
||||
indent_level > p->indent_level ? '}' : '{');
|
||||
}
|
||||
input_file_stack = p->next;
|
||||
free (p);
|
||||
input_file_stack_tick++;
|
||||
|
@ -816,6 +827,10 @@ linenum:
|
|||
|
||||
/* skip the rest of this line. */
|
||||
skipline:
|
||||
#if !USE_CPPLIB
|
||||
if (c != '\n' && c != EOF && nextchar >= 0)
|
||||
c = nextchar, nextchar = -1;
|
||||
#endif
|
||||
while (c != '\n' && c != EOF)
|
||||
c = GETC();
|
||||
return c;
|
||||
|
@ -1731,8 +1746,6 @@ yylex ()
|
|||
else if (! spec_long_long)
|
||||
ansi_type = long_unsigned_type_node;
|
||||
else if (! spec_unsigned
|
||||
/* Verify value does not overflow into sign bit. */
|
||||
&& TREE_INT_CST_HIGH (yylval.ttype) >= 0
|
||||
&& int_fits_type_p (yylval.ttype,
|
||||
long_long_integer_type_node))
|
||||
ansi_type = long_long_integer_type_node;
|
||||
|
@ -2122,13 +2135,13 @@ yylex ()
|
|||
break;
|
||||
case '<':
|
||||
if (c1 == '%')
|
||||
{ value = '{'; goto done; }
|
||||
{ value = '{'; indent_level++; goto done; }
|
||||
if (c1 == ':')
|
||||
{ value = '['; goto done; }
|
||||
break;
|
||||
case '%':
|
||||
if (c1 == '>')
|
||||
{ value = '}'; goto done; }
|
||||
{ value = '}'; indent_level--; goto done; }
|
||||
break;
|
||||
}
|
||||
UNGETC (c1);
|
||||
|
@ -2145,6 +2158,16 @@ yylex ()
|
|||
value = 1;
|
||||
break;
|
||||
|
||||
case '{':
|
||||
indent_level++;
|
||||
value = c;
|
||||
break;
|
||||
|
||||
case '}':
|
||||
indent_level--;
|
||||
value = c;
|
||||
break;
|
||||
|
||||
default:
|
||||
value = c;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/* A Bison parser, made from c-parse.y
|
||||
by Bison version A2.5 (Andrew Consortium)
|
||||
by GNU Bison version 1.25
|
||||
*/
|
||||
|
||||
#define YYBISON 1 /* Identify Bison output. */
|
||||
|
@ -404,7 +404,7 @@ static const short yyrline[] = { 0,
|
|||
#endif
|
||||
|
||||
|
||||
#if YYDEBUG != 0
|
||||
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
|
||||
|
||||
static const char * const yytname[] = { "$","error","$undefined.","IDENTIFIER",
|
||||
"TYPENAME","SCSPEC","TYPESPEC","TYPE_QUAL","CONSTANT","STRING","ELLIPSIS","SIZEOF",
|
||||
|
@ -1170,7 +1170,7 @@ static const short yycheck[] = { 40,
|
|||
48, 49, 50, 51, 52
|
||||
};
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line 3 "/usr/share/bison.simple"
|
||||
#line 3 "/usr/cygnus/latest-940103/share/bison.simple"
|
||||
|
||||
/* Skeleton output parser for bison,
|
||||
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
|
||||
|
@ -1325,16 +1325,16 @@ int yyparse (void);
|
|||
#endif
|
||||
|
||||
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
||||
#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
|
||||
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
|
||||
#else /* not GNU C or C++ */
|
||||
#ifndef __cplusplus
|
||||
|
||||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
static void
|
||||
__yy_memcpy (from, to, count)
|
||||
char *from;
|
||||
__yy_memcpy (to, from, count)
|
||||
char *to;
|
||||
char *from;
|
||||
int count;
|
||||
{
|
||||
register char *f = from;
|
||||
|
@ -1350,7 +1350,7 @@ __yy_memcpy (from, to, count)
|
|||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
static void
|
||||
__yy_memcpy (char *from, char *to, int count)
|
||||
__yy_memcpy (char *to, char *from, int count)
|
||||
{
|
||||
register char *f = from;
|
||||
register char *t = to;
|
||||
|
@ -1363,7 +1363,7 @@ __yy_memcpy (char *from, char *to, int count)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#line 192 "/usr/share/bison.simple"
|
||||
#line 196 "/usr/cygnus/latest-940103/share/bison.simple"
|
||||
|
||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||
into yyparse. The argument should have type void *.
|
||||
|
@ -1372,14 +1372,20 @@ __yy_memcpy (char *from, char *to, int count)
|
|||
to the proper pointer type. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
|
||||
#else
|
||||
#define YYPARSE_PARAM
|
||||
#ifdef __cplusplus
|
||||
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#endif
|
||||
#else /* not __cplusplus */
|
||||
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
|
||||
#endif /* not __cplusplus */
|
||||
#else /* not YYPARSE_PARAM */
|
||||
#define YYPARSE_PARAM_ARG
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#endif /* not YYPARSE_PARAM */
|
||||
|
||||
int
|
||||
yyparse(YYPARSE_PARAM)
|
||||
yyparse(YYPARSE_PARAM_ARG)
|
||||
YYPARSE_PARAM_DECL
|
||||
{
|
||||
register int yystate;
|
||||
|
@ -1496,12 +1502,12 @@ yynewstate:
|
|||
if (yystacksize > YYMAXDEPTH)
|
||||
yystacksize = YYMAXDEPTH;
|
||||
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
|
||||
__yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
|
||||
__yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
|
||||
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
|
||||
__yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
|
||||
__yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
|
||||
#ifdef YYLSP_NEEDED
|
||||
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
|
||||
__yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
|
||||
__yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
|
||||
#endif
|
||||
#endif /* no yyoverflow */
|
||||
|
||||
|
@ -3646,7 +3652,7 @@ case 395:
|
|||
break;}
|
||||
}
|
||||
/* the action file gets copied in in place of this dollarsign */
|
||||
#line 487 "/usr/share/bison.simple"
|
||||
#line 498 "/usr/cygnus/latest-940103/share/bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
|
|
|
@ -261,6 +261,12 @@ common_type (t1, t2)
|
|||
return build_type_attribute_variant (t1, attributes);
|
||||
}
|
||||
|
||||
/* Likewise, prefer long double to double even if same size. */
|
||||
if (TYPE_MAIN_VARIANT (t1) == long_double_type_node
|
||||
|| TYPE_MAIN_VARIANT (t2) == long_double_type_node)
|
||||
return build_type_attribute_variant (long_double_type_node,
|
||||
attributes);
|
||||
|
||||
/* Otherwise prefer the unsigned one. */
|
||||
|
||||
if (TREE_UNSIGNED (t1))
|
||||
|
@ -507,6 +513,9 @@ comptypes (type1, type2)
|
|||
if (maybe_objc_comptypes (t1, t2, 0) == 1)
|
||||
val = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return attrval == 2 && val == 1 ? 2 : val;
|
||||
}
|
||||
|
@ -1008,13 +1017,14 @@ default_conversion (exp)
|
|||
type = type_for_size (MAX (TYPE_PRECISION (type),
|
||||
TYPE_PRECISION (integer_type_node)),
|
||||
((flag_traditional
|
||||
|| TYPE_PRECISION (type) >= TYPE_PRECISION (integer_type_node))
|
||||
|| (TYPE_PRECISION (type)
|
||||
>= TYPE_PRECISION (integer_type_node)))
|
||||
&& TREE_UNSIGNED (type)));
|
||||
return convert (type, exp);
|
||||
}
|
||||
|
||||
if (TREE_CODE (exp) == COMPONENT_REF
|
||||
&& DECL_BIT_FIELD (TREE_OPERAND (exp, 1)))
|
||||
&& DECL_C_BIT_FIELD (TREE_OPERAND (exp, 1)))
|
||||
{
|
||||
tree width = DECL_SIZE (TREE_OPERAND (exp, 1));
|
||||
HOST_WIDE_INT low = TREE_INT_CST_LOW (width);
|
||||
|
@ -1242,6 +1252,9 @@ build_component_ref (datum, component)
|
|||
(TREE_OPERAND (datum, 0),
|
||||
build_component_ref (TREE_OPERAND (datum, 1), component),
|
||||
build_component_ref (TREE_OPERAND (datum, 2), component));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* See if there is a field or component with name COMPONENT. */
|
||||
|
@ -1573,6 +1586,8 @@ build_function_call (function, params)
|
|||
if (coerced_params == 0)
|
||||
return integer_zero_node;
|
||||
return build_unary_op (ABS_EXPR, TREE_VALUE (coerced_params), 0);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -2333,6 +2348,9 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
|
|||
pedwarn ("comparison between pointer and integer");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE)
|
||||
|
@ -3112,6 +3130,9 @@ build_unary_op (code, xarg, noconvert)
|
|||
TREE_CONSTANT (addr) = 1;
|
||||
return addr;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!errstring)
|
||||
|
@ -3180,17 +3201,16 @@ lvalue_p (ref)
|
|||
case PARM_DECL:
|
||||
case RESULT_DECL:
|
||||
case ERROR_MARK:
|
||||
if (TREE_CODE (TREE_TYPE (ref)) != FUNCTION_TYPE
|
||||
&& TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE)
|
||||
return 1;
|
||||
break;
|
||||
return (TREE_CODE (TREE_TYPE (ref)) != FUNCTION_TYPE
|
||||
&& TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE);
|
||||
|
||||
case BIND_EXPR:
|
||||
case RTL_EXPR:
|
||||
if (TREE_CODE (TREE_TYPE (ref)) == ARRAY_TYPE)
|
||||
return 1;
|
||||
return TREE_CODE (TREE_TYPE (ref)) == ARRAY_TYPE;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return nonzero if REF is an lvalue valid for this language;
|
||||
|
@ -3222,7 +3242,12 @@ unary_complex_lvalue (code, arg)
|
|||
if (TREE_CODE (arg) == COMPOUND_EXPR)
|
||||
{
|
||||
tree real_result = build_unary_op (code, TREE_OPERAND (arg, 1), 0);
|
||||
pedantic_lvalue_warning (COMPOUND_EXPR);
|
||||
|
||||
/* If this returns a function type, it isn't really being used as
|
||||
an lvalue, so don't issue a warning about it. */
|
||||
if (TREE_CODE (TREE_TYPE (arg)) != FUNCTION_TYPE)
|
||||
pedantic_lvalue_warning (COMPOUND_EXPR);
|
||||
|
||||
return build (COMPOUND_EXPR, TREE_TYPE (real_result),
|
||||
TREE_OPERAND (arg, 0), real_result);
|
||||
}
|
||||
|
@ -3231,6 +3256,9 @@ unary_complex_lvalue (code, arg)
|
|||
if (TREE_CODE (arg) == COND_EXPR)
|
||||
{
|
||||
pedantic_lvalue_warning (COND_EXPR);
|
||||
if (TREE_CODE (TREE_TYPE (arg)) != FUNCTION_TYPE)
|
||||
pedantic_lvalue_warning (COMPOUND_EXPR);
|
||||
|
||||
return (build_conditional_expr
|
||||
(TREE_OPERAND (arg, 0),
|
||||
build_unary_op (code, TREE_OPERAND (arg, 1), 0),
|
||||
|
@ -3872,6 +3900,8 @@ build_modify_expr (lhs, modifycode, rhs)
|
|||
/* But cast it to void to avoid an "unused" error. */
|
||||
convert (void_type_node, rhs), cond);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* If a binary op has been requested, combine the old LHS value with the RHS
|
||||
|
@ -3913,6 +3943,9 @@ build_modify_expr (lhs, modifycode, rhs)
|
|||
pedantic_lvalue_warning (CONVERT_EXPR);
|
||||
return convert (TREE_TYPE (lhs), result);
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Now we have handled acceptable kinds of LHS that are not truly lvalues.
|
||||
|
@ -4426,9 +4459,10 @@ initializer_constant_valid_p (value, endtype)
|
|||
return null_pointer_node;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* If VALUE is a compound expr all of whose expressions are constant, then
|
||||
|
@ -6617,6 +6651,9 @@ c_expand_return (retval)
|
|||
&& DECL_CONTEXT (inner) == current_function_decl)
|
||||
warning ("function returns address of local variable");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
100
gcc/calls.c
100
gcc/calls.c
|
@ -19,10 +19,12 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
|
|||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
#include "expr.h"
|
||||
#include "regs.h"
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
|
@ -232,6 +234,9 @@ calls_function_1 (exp, which)
|
|||
|
||||
case RTL_EXPR:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
|
@ -267,15 +272,11 @@ prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen)
|
|||
/* Make a valid memory address and copy constants thru pseudo-regs,
|
||||
but not for a constant address if -fno-function-cse. */
|
||||
if (GET_CODE (funexp) != SYMBOL_REF)
|
||||
funexp =
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
/* If we are using registers for parameters, force the
|
||||
function address into a register now. */
|
||||
(SMALL_REGISTER_CLASSES && reg_parm_seen)
|
||||
? force_not_mem (memory_address (FUNCTION_MODE, funexp))
|
||||
:
|
||||
#endif
|
||||
memory_address (FUNCTION_MODE, funexp);
|
||||
function address into a register now. */
|
||||
funexp = ((SMALL_REGISTER_CLASSES && reg_parm_seen)
|
||||
? force_not_mem (memory_address (FUNCTION_MODE, funexp))
|
||||
: memory_address (FUNCTION_MODE, funexp));
|
||||
else
|
||||
{
|
||||
#ifndef NO_FUNCTION_CSE
|
||||
|
@ -695,7 +696,8 @@ expand_call (exp, target, ignore)
|
|||
structure_value_addr = XEXP (target, 0);
|
||||
else
|
||||
{
|
||||
/* Assign a temporary on the stack to hold the value. */
|
||||
/* Assign a temporary to hold the value. */
|
||||
tree d;
|
||||
|
||||
/* For variable-sized objects, we must be called with a target
|
||||
specified. If we were to allocate space on the stack here,
|
||||
|
@ -704,8 +706,12 @@ expand_call (exp, target, ignore)
|
|||
if (struct_value_size < 0)
|
||||
abort ();
|
||||
|
||||
structure_value_addr
|
||||
= XEXP (assign_stack_temp (BLKmode, struct_value_size, 1), 0);
|
||||
/* This DECL is just something to feed to mark_addressable;
|
||||
it doesn't get pushed. */
|
||||
d = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE (exp));
|
||||
DECL_RTL (d) = assign_temp (TREE_TYPE (exp), 1, 0, 1);
|
||||
mark_addressable (d);
|
||||
structure_value_addr = XEXP (DECL_RTL (d), 0);
|
||||
MEM_IN_STRUCT_P (structure_value_addr)
|
||||
= AGGREGATE_TYPE_P (TREE_TYPE (exp));
|
||||
target = 0;
|
||||
|
@ -1675,13 +1681,8 @@ expand_call (exp, target, ignore)
|
|||
&& GET_CODE (SUBREG_REG (args[i].value)) == REG)))
|
||||
&& args[i].mode != BLKmode
|
||||
&& rtx_cost (args[i].value, SET) > 2
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
&& ((SMALL_REGISTER_CLASSES && reg_parm_seen)
|
||||
|| preserve_subexpressions_p ())
|
||||
#else
|
||||
&& preserve_subexpressions_p ()
|
||||
#endif
|
||||
)
|
||||
|| preserve_subexpressions_p ()))
|
||||
args[i].value = copy_to_mode_reg (args[i].mode, args[i].value);
|
||||
}
|
||||
|
||||
|
@ -2038,7 +2039,7 @@ expand_call (exp, target, ignore)
|
|||
|
||||
/* If there are cleanups to be called, don't use a hard reg as target.
|
||||
We need to double check this and see if it matters anymore. */
|
||||
if (any_pending_cleanups ()
|
||||
if (any_pending_cleanups (1)
|
||||
&& target && REG_P (target)
|
||||
&& REGNO (target) < FIRST_PSEUDO_REGISTER)
|
||||
target = 0;
|
||||
|
@ -2751,26 +2752,26 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
|
|||
|
||||
#ifdef ACCUMULATE_OUTGOING_ARGS
|
||||
#ifdef REG_PARM_STACK_SPACE
|
||||
if (save_area)
|
||||
{
|
||||
enum machine_mode save_mode = GET_MODE (save_area);
|
||||
rtx stack_area
|
||||
= gen_rtx (MEM, save_mode,
|
||||
memory_address (save_mode,
|
||||
if (save_area)
|
||||
{
|
||||
enum machine_mode save_mode = GET_MODE (save_area);
|
||||
rtx stack_area
|
||||
= gen_rtx (MEM, save_mode,
|
||||
memory_address (save_mode,
|
||||
#ifdef ARGS_GROW_DOWNWARD
|
||||
plus_constant (argblock, - high_to_save)
|
||||
plus_constant (argblock, - high_to_save)
|
||||
#else
|
||||
plus_constant (argblock, low_to_save)
|
||||
plus_constant (argblock, low_to_save)
|
||||
#endif
|
||||
));
|
||||
));
|
||||
|
||||
if (save_mode != BLKmode)
|
||||
emit_move_insn (stack_area, save_area);
|
||||
else
|
||||
emit_block_move (stack_area, validize_mem (save_area),
|
||||
GEN_INT (high_to_save - low_to_save + 1),
|
||||
PARM_BOUNDARY / BITS_PER_UNIT);
|
||||
}
|
||||
if (save_mode != BLKmode)
|
||||
emit_move_insn (stack_area, save_area);
|
||||
else
|
||||
emit_block_move (stack_area, validize_mem (save_area),
|
||||
GEN_INT (high_to_save - low_to_save + 1),
|
||||
PARM_BOUNDARY / BITS_PER_UNIT);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we saved any argument areas, restore them. */
|
||||
|
@ -2789,7 +2790,6 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
|
|||
highest_outgoing_arg_in_use = initial_highest_arg_in_use;
|
||||
stack_usage_map = initial_stack_usage_map;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* Like emit_library_call except that an extra argument, VALUE,
|
||||
|
@ -3345,26 +3345,26 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
|
|||
|
||||
#ifdef ACCUMULATE_OUTGOING_ARGS
|
||||
#ifdef REG_PARM_STACK_SPACE
|
||||
if (save_area)
|
||||
{
|
||||
enum machine_mode save_mode = GET_MODE (save_area);
|
||||
rtx stack_area
|
||||
= gen_rtx (MEM, save_mode,
|
||||
memory_address (save_mode,
|
||||
if (save_area)
|
||||
{
|
||||
enum machine_mode save_mode = GET_MODE (save_area);
|
||||
rtx stack_area
|
||||
= gen_rtx (MEM, save_mode,
|
||||
memory_address (save_mode,
|
||||
#ifdef ARGS_GROW_DOWNWARD
|
||||
plus_constant (argblock, - high_to_save)
|
||||
plus_constant (argblock, - high_to_save)
|
||||
#else
|
||||
plus_constant (argblock, low_to_save)
|
||||
plus_constant (argblock, low_to_save)
|
||||
#endif
|
||||
));
|
||||
));
|
||||
|
||||
if (save_mode != BLKmode)
|
||||
emit_move_insn (stack_area, save_area);
|
||||
else
|
||||
emit_block_move (stack_area, validize_mem (save_area),
|
||||
GEN_INT (high_to_save - low_to_save + 1),
|
||||
if (save_mode != BLKmode)
|
||||
emit_move_insn (stack_area, save_area);
|
||||
else
|
||||
emit_block_move (stack_area, validize_mem (save_area),
|
||||
GEN_INT (high_to_save - low_to_save + 1),
|
||||
PARM_BOUNDARY / BITS_PER_UNIT);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we saved any argument areas, restore them. */
|
||||
|
|
257
gcc/cccp.c
257
gcc/cccp.c
|
@ -51,6 +51,13 @@ typedef unsigned char U_CHAR;
|
|||
#define PATH_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
/* By default, the suffix for object files is ".o". */
|
||||
#ifdef OBJECT_SUFFIX
|
||||
#define HAVE_OBJECT_SUFFIX
|
||||
#else
|
||||
#define OBJECT_SUFFIX ".o"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
@ -59,21 +66,13 @@ typedef unsigned char U_CHAR;
|
|||
|
||||
/* The following symbols should be autoconfigured:
|
||||
HAVE_FCNTL_H
|
||||
HAVE_STDLIB_H
|
||||
HAVE_SYS_TIME_H
|
||||
HAVE_UNISTD_H
|
||||
STDC_HEADERS
|
||||
TIME_WITH_SYS_TIME
|
||||
In the mean time, we'll get by with approximations based
|
||||
on existing GCC configuration symbols. */
|
||||
|
||||
#ifdef POSIX
|
||||
# ifndef HAVE_STDLIB_H
|
||||
# define HAVE_STDLIB_H 1
|
||||
# endif
|
||||
# ifndef HAVE_UNISTD_H
|
||||
# define HAVE_UNISTD_H 1
|
||||
# endif
|
||||
# ifndef STDC_HEADERS
|
||||
# define STDC_HEADERS 1
|
||||
# endif
|
||||
|
@ -105,6 +104,10 @@ typedef unsigned char U_CHAR;
|
|||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
|
@ -225,8 +228,8 @@ my_bzero (b, length)
|
|||
#define fstat(fd,stbuf) VMS_fstat (fd,stbuf)
|
||||
static int VMS_fstat (), VMS_stat ();
|
||||
static int VMS_open ();
|
||||
static FILE * VMS_fopen ();
|
||||
static FILE * VMS_freopen ();
|
||||
static FILE *VMS_fopen ();
|
||||
static FILE *VMS_freopen ();
|
||||
static void hack_vms_include_specification ();
|
||||
#define INO_T_EQ(a, b) (!bcmp((char *) &(a), (char *) &(b), sizeof (a)))
|
||||
#define INO_T_HASH(a) 0
|
||||
|
@ -248,18 +251,25 @@ static void hack_vms_include_specification ();
|
|||
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
|
||||
|
||||
/* Find the largest host integer type and set its size and type.
|
||||
Don't blindly use `long'; on some crazy hosts it is shorter than `int'. */
|
||||
|
||||
#ifndef HOST_BITS_PER_WIDE_INT
|
||||
|
||||
#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
|
||||
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
|
||||
#define HOST_WIDE_INT long
|
||||
#else
|
||||
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
|
||||
#define HOST_WIDE_INT int
|
||||
#endif
|
||||
Watch out: on some crazy hosts `long' is shorter than `int'. */
|
||||
|
||||
#ifndef HOST_WIDE_INT
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# define HOST_WIDE_INT intmax_t
|
||||
# else
|
||||
# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT \
|
||||
&& HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
|
||||
# define HOST_WIDE_INT int
|
||||
# else
|
||||
# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG \
|
||||
|| ! (defined LONG_LONG_MAX || defined LLONG_MAX))
|
||||
# define HOST_WIDE_INT long
|
||||
# else
|
||||
# define HOST_WIDE_INT long long
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
|
@ -303,6 +313,7 @@ static void hack_vms_include_specification ();
|
|||
/* External declarations. */
|
||||
|
||||
extern char *version_string;
|
||||
extern char *update_path PROTO((char *, char *));
|
||||
#ifndef VMS
|
||||
#ifndef HAVE_STRERROR
|
||||
extern int sys_nerr;
|
||||
|
@ -400,6 +411,10 @@ static enum {dump_none, dump_only, dump_names, dump_definitions}
|
|||
where they are defined. */
|
||||
static int debug_output = 0;
|
||||
|
||||
/* Nonzero means pass #include lines through to the output,
|
||||
even if they are ifdeffed out. */
|
||||
static int dump_includes;
|
||||
|
||||
/* Nonzero indicates special processing used by the pcp program. The
|
||||
special effects of this mode are:
|
||||
|
||||
|
@ -518,7 +533,7 @@ static struct file_buf {
|
|||
struct if_stack *if_stack;
|
||||
/* Object to be freed at end of input at this level. */
|
||||
U_CHAR *free_ptr;
|
||||
/* True if this is a header file included using <FILENAME>. */
|
||||
/* True if this is a system header file; see is_system_include. */
|
||||
char system_header_p;
|
||||
} instack[INPUT_STACK_MAX];
|
||||
|
||||
|
@ -579,6 +594,7 @@ struct file_name_list
|
|||
/* The */
|
||||
static struct default_include {
|
||||
char *fname; /* The name of the directory. */
|
||||
char *component; /* The component containing the directory */
|
||||
int cplusplus; /* Only look here if we're compiling C++. */
|
||||
int cxx_aware; /* Includes in this directory don't need to
|
||||
be wrapped in extern "C" when compiling
|
||||
|
@ -589,40 +605,43 @@ static struct default_include {
|
|||
#else
|
||||
= {
|
||||
/* Pick up GNU C++ specific include files. */
|
||||
{ GPLUSPLUS_INCLUDE_DIR, 1, 1 },
|
||||
{ OLD_GPLUSPLUS_INCLUDE_DIR, 1, 1 },
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
|
||||
{ OLD_GPLUSPLUS_INCLUDE_DIR, 0, 1, 1 },
|
||||
#ifdef CROSS_COMPILE
|
||||
/* This is the dir for fixincludes. Put it just before
|
||||
the files that we fix. */
|
||||
{ GCC_INCLUDE_DIR, 0, 0 },
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
/* For cross-compilation, this dir name is generated
|
||||
automatically in Makefile.in. */
|
||||
{ CROSS_INCLUDE_DIR, 0, 0 },
|
||||
{ CROSS_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
#ifdef TOOL_INCLUDE_DIR
|
||||
/* This is another place that the target system's headers might be. */
|
||||
{ TOOL_INCLUDE_DIR, 0, 0 },
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 0 },
|
||||
#endif
|
||||
#else /* not CROSS_COMPILE */
|
||||
#ifdef LOCAL_INCLUDE_DIR
|
||||
/* This should be /usr/local/include and should come before
|
||||
the fixincludes-fixed header files. */
|
||||
{ LOCAL_INCLUDE_DIR, 0, 1 },
|
||||
{ LOCAL_INCLUDE_DIR, 0, 0, 1 },
|
||||
#endif
|
||||
#ifdef TOOL_INCLUDE_DIR
|
||||
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
|
||||
Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
|
||||
{ TOOL_INCLUDE_DIR, 0, 0 },
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 0 },
|
||||
#endif
|
||||
/* This is the dir for fixincludes. Put it just before
|
||||
the files that we fix. */
|
||||
{ GCC_INCLUDE_DIR, 0, 0 },
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
/* Some systems have an extra dir of include files. */
|
||||
#ifdef SYSTEM_INCLUDE_DIR
|
||||
{ SYSTEM_INCLUDE_DIR, 0, 0 },
|
||||
{ SYSTEM_INCLUDE_DIR, 0, 0, 0 },
|
||||
#endif
|
||||
{ STANDARD_INCLUDE_DIR, 0, 0 },
|
||||
#ifndef STANDARD_INCLUDE_COMPONENT
|
||||
#define STANDARD_INCLUDE_COMPONENT 0
|
||||
#endif
|
||||
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0 },
|
||||
#endif /* not CROSS_COMPILE */
|
||||
{ 0, 0, 0 }
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
#endif /* no INCLUDE_DEFAULTS */
|
||||
|
||||
|
@ -954,13 +973,10 @@ struct directive {
|
|||
int (*func) DO_PROTO; /* Function to handle directive */
|
||||
char *name; /* Name of directive */
|
||||
enum node_type type; /* Code which describes which directive. */
|
||||
char angle_brackets; /* Nonzero => <...> is special. */
|
||||
char traditional_comments; /* Nonzero: keep comments if -traditional. */
|
||||
char pass_thru; /* Copy directive to output:
|
||||
if 1, copy if dumping definitions;
|
||||
if 2, always copy, after preprocessing. */
|
||||
};
|
||||
|
||||
#define IS_INCLUDE_DIRECTIVE_TYPE(t) (T_INCLUDE <= (t) && (t) <= T_IMPORT)
|
||||
|
||||
/* These functions are declared to return int instead of void since they
|
||||
are going to be placed in the table and some old compilers have trouble with
|
||||
pointers to functions returning void. */
|
||||
|
@ -987,7 +1003,7 @@ static int do_xifdef DO_PROTO;
|
|||
/* Here is the actual list of #-directives, most-often-used first. */
|
||||
|
||||
static struct directive directive_table[] = {
|
||||
{ 6, do_define, "define", T_DEFINE, 0, 1, 1},
|
||||
{ 6, do_define, "define", T_DEFINE},
|
||||
{ 2, do_if, "if", T_IF},
|
||||
{ 5, do_xifdef, "ifdef", T_IFDEF},
|
||||
{ 6, do_xifdef, "ifndef", T_IFNDEF},
|
||||
|
@ -995,16 +1011,16 @@ static struct directive directive_table[] = {
|
|||
{ 4, do_else, "else", T_ELSE},
|
||||
{ 4, do_elif, "elif", T_ELIF},
|
||||
{ 4, do_line, "line", T_LINE},
|
||||
{ 7, do_include, "include", T_INCLUDE, 1},
|
||||
{ 12, do_include, "include_next", T_INCLUDE_NEXT, 1},
|
||||
{ 6, do_include, "import", T_IMPORT, 1},
|
||||
{ 7, do_include, "include", T_INCLUDE},
|
||||
{ 12, do_include, "include_next", T_INCLUDE_NEXT},
|
||||
{ 6, do_include, "import", T_IMPORT},
|
||||
{ 5, do_undef, "undef", T_UNDEF},
|
||||
{ 5, do_error, "error", T_ERROR},
|
||||
{ 7, do_warning, "warning", T_WARNING},
|
||||
#ifdef SCCS_DIRECTIVE
|
||||
{ 4, do_sccs, "sccs", T_SCCS},
|
||||
#endif
|
||||
{ 6, do_pragma, "pragma", T_PRAGMA, 0, 0, 2},
|
||||
{ 6, do_pragma, "pragma", T_PRAGMA},
|
||||
{ 5, do_ident, "ident", T_IDENT},
|
||||
{ 6, do_assert, "assert", T_ASSERT},
|
||||
{ 8, do_unassert, "unassert", T_UNASSERT},
|
||||
|
@ -1195,7 +1211,7 @@ static void make_undef PROTO((char *, FILE_BUF *));
|
|||
|
||||
static void make_assertion PROTO((char *, char *));
|
||||
|
||||
static struct file_name_list *new_include_prefix PROTO((struct file_name_list *, char *, char *));
|
||||
static struct file_name_list *new_include_prefix PROTO((struct file_name_list *, char *, char *, char *));
|
||||
static void append_include_chain PROTO((struct file_name_list *, struct file_name_list *));
|
||||
|
||||
static void deps_output PROTO((char *, int));
|
||||
|
@ -1414,7 +1430,8 @@ main (argc, argv)
|
|||
if (!strcmp (argv[i], "-isystem")) {
|
||||
struct file_name_list *dirtmp;
|
||||
|
||||
if (! (dirtmp = new_include_prefix (NULL_PTR, "", argv[++i])))
|
||||
if (! (dirtmp = new_include_prefix (NULL_PTR, NULL_PTR,
|
||||
"", argv[++i])))
|
||||
break;
|
||||
dirtmp->c_system_include_path = 1;
|
||||
|
||||
|
@ -1439,7 +1456,8 @@ main (argc, argv)
|
|||
prefix[strlen (prefix) - 7] = 0;
|
||||
}
|
||||
|
||||
if (! (dirtmp = new_include_prefix (NULL_PTR, prefix, argv[++i])))
|
||||
if (! (dirtmp = new_include_prefix (NULL_PTR, NULL_PTR,
|
||||
prefix, argv[++i])))
|
||||
break;
|
||||
|
||||
if (after_include == 0)
|
||||
|
@ -1463,14 +1481,15 @@ main (argc, argv)
|
|||
prefix[strlen (prefix) - 7] = 0;
|
||||
}
|
||||
|
||||
dirtmp = new_include_prefix (NULL_PTR, prefix, argv[++i]);
|
||||
dirtmp = new_include_prefix (NULL_PTR, NULL_PTR, prefix, argv[++i]);
|
||||
append_include_chain (dirtmp, dirtmp);
|
||||
}
|
||||
/* Add directory to end of path for includes. */
|
||||
if (!strcmp (argv[i], "-idirafter")) {
|
||||
struct file_name_list *dirtmp;
|
||||
|
||||
if (! (dirtmp = new_include_prefix (NULL_PTR, "", argv[++i])))
|
||||
if (! (dirtmp = new_include_prefix (NULL_PTR, NULL_PTR,
|
||||
"", argv[++i])))
|
||||
break;
|
||||
|
||||
if (after_include == 0)
|
||||
|
@ -1641,6 +1660,9 @@ main (argc, argv)
|
|||
case 'D':
|
||||
dump_macros = dump_definitions;
|
||||
break;
|
||||
case 'I':
|
||||
dump_includes = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1734,7 +1756,7 @@ main (argc, argv)
|
|||
first_bracket_include = 0;
|
||||
}
|
||||
else {
|
||||
dirtmp = new_include_prefix (last_include, "",
|
||||
dirtmp = new_include_prefix (last_include, NULL_PTR, "",
|
||||
argv[i][2] ? argv[i] + 2 : argv[++i]);
|
||||
append_include_chain (dirtmp, dirtmp);
|
||||
}
|
||||
|
@ -1940,6 +1962,7 @@ main (argc, argv)
|
|||
include_defaults[num_dirs].fname
|
||||
= startp == endp ? "." : savestring (startp);
|
||||
endp[-1] = c;
|
||||
include_defaults[num_dirs].component = 0;
|
||||
include_defaults[num_dirs].cplusplus = cplusplus;
|
||||
include_defaults[num_dirs].cxx_aware = 1;
|
||||
num_dirs++;
|
||||
|
@ -1980,7 +2003,7 @@ main (argc, argv)
|
|||
if (!strncmp (p->fname, default_prefix, default_len)) {
|
||||
/* Yes; change prefix and add to search list. */
|
||||
struct file_name_list *new
|
||||
= new_include_prefix (NULL_PTR, specd_prefix,
|
||||
= new_include_prefix (NULL_PTR, NULL_PTR, specd_prefix,
|
||||
p->fname + default_len);
|
||||
if (new) {
|
||||
new->c_system_include_path = !p->cxx_aware;
|
||||
|
@ -1996,7 +2019,7 @@ main (argc, argv)
|
|||
/* Some standard dirs are only for C++. */
|
||||
if (!p->cplusplus || (cplusplus && !no_standard_cplusplus_includes)) {
|
||||
struct file_name_list *new
|
||||
= new_include_prefix (NULL_PTR, "", p->fname);
|
||||
= new_include_prefix (NULL_PTR, p->component, "", p->fname);
|
||||
if (new) {
|
||||
new->c_system_include_path = !p->cxx_aware;
|
||||
append_include_chain (new, new);
|
||||
|
@ -2123,11 +2146,7 @@ main (argc, argv)
|
|||
q = p + (len - 4);
|
||||
|
||||
/* Supply our own suffix. */
|
||||
#ifndef VMS
|
||||
strcpy (q, ".o");
|
||||
#else
|
||||
strcpy (q, ".obj");
|
||||
#endif
|
||||
strcpy (q, OBJECT_SUFFIX);
|
||||
|
||||
deps_output (p, ':');
|
||||
deps_output (in_fname, ' ');
|
||||
|
@ -2310,7 +2329,8 @@ path_include (path)
|
|||
continue;
|
||||
|
||||
q[-1] = 0;
|
||||
dirtmp = new_include_prefix (last_include, "", p == q ? "." : p);
|
||||
dirtmp = new_include_prefix (last_include, NULL_PTR,
|
||||
"", p == q ? "." : p);
|
||||
q[-1] = c;
|
||||
append_include_chain (dirtmp, dirtmp);
|
||||
|
||||
|
@ -3724,7 +3744,7 @@ handle_directive (ip, op)
|
|||
limit = ip->buf + ip->length;
|
||||
unterminated = 0;
|
||||
already_output = 0;
|
||||
keep_comments = traditional && kt->traditional_comments;
|
||||
keep_comments = traditional && kt->type == T_DEFINE;
|
||||
/* #import is defined only in Objective C, or when on the NeXT. */
|
||||
if (kt->type == T_IMPORT
|
||||
&& !(objc || lookup ((U_CHAR *) "__NeXT__", -1, -1)))
|
||||
|
@ -3769,7 +3789,7 @@ handle_directive (ip, op)
|
|||
|
||||
/* <...> is special for #include. */
|
||||
case '<':
|
||||
if (!kt->angle_brackets)
|
||||
if (! IS_INCLUDE_DIRECTIVE_TYPE (kt->type))
|
||||
break;
|
||||
while (bp < limit && *bp != '>' && *bp != '\n') {
|
||||
if (*bp == '\\' && bp[1] == '\n') {
|
||||
|
@ -3828,10 +3848,12 @@ handle_directive (ip, op)
|
|||
RESUME_P is the next interesting data after the directive.
|
||||
A comment may come between. */
|
||||
|
||||
/* If a directive should be copied through, and -E was given,
|
||||
/* If a directive should be copied through, and -C was given,
|
||||
pass it through before removing comments. */
|
||||
if (!no_output && put_out_comments
|
||||
&& (dump_macros != dump_definitions) < kt->pass_thru) {
|
||||
&& (kt->type == T_DEFINE ? dump_macros == dump_definitions
|
||||
: IS_INCLUDE_DIRECTIVE_TYPE (kt->type) ? dump_includes
|
||||
: kt->type == T_PRAGMA)) {
|
||||
int len;
|
||||
|
||||
/* Output directive name. */
|
||||
|
@ -3880,7 +3902,7 @@ handle_directive (ip, op)
|
|||
|
||||
/* <...> is special for #include. */
|
||||
case '<':
|
||||
if (!kt->angle_brackets)
|
||||
if (! IS_INCLUDE_DIRECTIVE_TYPE (kt->type))
|
||||
break;
|
||||
while (xp < bp && c != '>') {
|
||||
c = *xp++;
|
||||
|
@ -3955,10 +3977,12 @@ handle_directive (ip, op)
|
|||
|
||||
/* Some directives should be written out for cc1 to process,
|
||||
just as if they were not defined. And sometimes we're copying
|
||||
definitions through. */
|
||||
directives through. */
|
||||
|
||||
if (!no_output && already_output == 0
|
||||
&& (dump_macros < dump_names) < kt->pass_thru) {
|
||||
&& (kt->type == T_DEFINE ? dump_names <= dump_macros
|
||||
: IS_INCLUDE_DIRECTIVE_TYPE (kt->type) ? dump_includes
|
||||
: kt->type == T_PRAGMA)) {
|
||||
int len;
|
||||
|
||||
/* Output directive name. */
|
||||
|
@ -3967,13 +3991,8 @@ handle_directive (ip, op)
|
|||
bcopy (kt->name, (char *) op->bufp, kt->length);
|
||||
op->bufp += kt->length;
|
||||
|
||||
if ((dump_macros != dump_definitions) < kt->pass_thru) {
|
||||
/* Output arguments. */
|
||||
len = (cp - buf);
|
||||
check_expand (op, len);
|
||||
bcopy (buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
} else if (kt->type == T_DEFINE && dump_macros == dump_names) {
|
||||
if (kt->type == T_DEFINE && dump_macros == dump_names) {
|
||||
/* Output `#define name' only. */
|
||||
U_CHAR *xp = buf;
|
||||
U_CHAR *yp;
|
||||
SKIP_WHITE_SPACE (xp);
|
||||
|
@ -3982,9 +4001,14 @@ handle_directive (ip, op)
|
|||
len = (xp - yp);
|
||||
check_expand (op, len + 1);
|
||||
*op->bufp++ = ' ';
|
||||
bcopy (yp, op->bufp, len);
|
||||
op->bufp += len;
|
||||
bcopy (yp, (char *) op->bufp, len);
|
||||
} else {
|
||||
/* Output entire directive. */
|
||||
len = (cp - buf);
|
||||
check_expand (op, len);
|
||||
bcopy (buf, (char *) op->bufp, len);
|
||||
}
|
||||
op->bufp += len;
|
||||
} /* Don't we need a newline or #line? */
|
||||
|
||||
/* Call the appropriate directive handler. buf now points to
|
||||
|
@ -4118,6 +4142,12 @@ special_symbol (hp, op)
|
|||
|
||||
case T_CONST:
|
||||
buf = hp->value.cpval;
|
||||
#ifdef STDC_0_IN_SYSTEM_HEADERS
|
||||
if (ip->system_header_p
|
||||
&& hp->length == 8 && bcmp (hp->name, "__STDC__", 8) == 0
|
||||
&& !lookup ((U_CHAR *) "__STRICT_ANSI__", -1, -1))
|
||||
buf = "0";
|
||||
#endif
|
||||
if (pcp_inside_if && pcp_outfile)
|
||||
/* Output a precondition for this macro use */
|
||||
fprintf (pcp_outfile, "#define %s %s\n", hp->name, buf);
|
||||
|
@ -5305,12 +5335,12 @@ pcfinclude (buf, limit, name, op)
|
|||
|
||||
/* First skip to a longword boundary */
|
||||
/* ??? Why a 4-byte boundary? On all machines? */
|
||||
/* NOTE: This works correctly even if HOST_WIDE_INT
|
||||
/* NOTE: This works correctly even if size_t
|
||||
is narrower than a pointer.
|
||||
Do not try risky measures here to get another type to use!
|
||||
Do not include stddef.h--it will fail! */
|
||||
if ((HOST_WIDE_INT) cp & 3)
|
||||
cp += 4 - ((HOST_WIDE_INT) cp & 3);
|
||||
if ((size_t) cp & 3)
|
||||
cp += 4 - ((size_t) cp & 3);
|
||||
|
||||
/* Now get the string. */
|
||||
str = (STRINGDEF *) (GENERIC_PTR) cp;
|
||||
|
@ -6798,7 +6828,7 @@ do_once ()
|
|||
}
|
||||
}
|
||||
|
||||
/* #ident has already been copied to the output file, so just ignore it. */
|
||||
/* Report program identification. */
|
||||
|
||||
static int
|
||||
do_ident (buf, limit, op, keyword)
|
||||
|
@ -6814,22 +6844,17 @@ do_ident (buf, limit, op, keyword)
|
|||
pedwarn ("ANSI C does not allow `#ident'");
|
||||
|
||||
trybuf = expand_to_temp_buffer (buf, limit, 0, 0);
|
||||
buf = (U_CHAR *) alloca (trybuf.bufp - trybuf.buf + 1);
|
||||
bcopy ((char *) trybuf.buf, (char *) buf, trybuf.bufp - trybuf.buf);
|
||||
limit = buf + (trybuf.bufp - trybuf.buf);
|
||||
len = (limit - buf);
|
||||
free (trybuf.buf);
|
||||
buf = trybuf.buf;
|
||||
len = trybuf.bufp - buf;
|
||||
|
||||
/* Output directive name. */
|
||||
check_expand (op, 7);
|
||||
/* Output expanded directive. */
|
||||
check_expand (op, 7 + len);
|
||||
bcopy ("#ident ", (char *) op->bufp, 7);
|
||||
op->bufp += 7;
|
||||
|
||||
/* Output the expanded argument line. */
|
||||
check_expand (op, len);
|
||||
bcopy ((char *) buf, (char *) op->bufp, len);
|
||||
op->bufp += len;
|
||||
|
||||
free (buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -6858,7 +6883,7 @@ do_pragma (buf, limit, op, keyword)
|
|||
int h;
|
||||
U_CHAR *p = buf + 14, *fname;
|
||||
SKIP_WHITE_SPACE (p);
|
||||
if (*p == '\n' || *p != '\"')
|
||||
if (*p != '\"')
|
||||
return 0;
|
||||
|
||||
fname = p + 1;
|
||||
|
@ -9782,7 +9807,12 @@ make_assertion (option, str)
|
|||
--indepth;
|
||||
}
|
||||
|
||||
#ifndef DIR_SEPARATOR
|
||||
#define DIR_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
/* The previous include prefix, if any, is PREV_FILE_NAME.
|
||||
Translate any pathnames with COMPONENT.
|
||||
Allocate a new include prefix whose name is the
|
||||
simplified concatenation of PREFIX and NAME,
|
||||
with a trailing / added if needed.
|
||||
|
@ -9790,33 +9820,38 @@ make_assertion (option, str)
|
|||
e.g. because it is a duplicate of PREV_FILE_NAME. */
|
||||
|
||||
static struct file_name_list *
|
||||
new_include_prefix (prev_file_name, prefix, name)
|
||||
new_include_prefix (prev_file_name, component, prefix, name)
|
||||
struct file_name_list *prev_file_name;
|
||||
char *component;
|
||||
char *prefix;
|
||||
char *name;
|
||||
{
|
||||
if (!name)
|
||||
if (name == 0)
|
||||
fatal ("Directory name missing after command line option");
|
||||
|
||||
if (!*name)
|
||||
if (*name == 0)
|
||||
/* Ignore the empty string. */
|
||||
return 0;
|
||||
else {
|
||||
|
||||
prefix = update_path (prefix, component);
|
||||
name = update_path (name, component);
|
||||
|
||||
{
|
||||
struct file_name_list *dir
|
||||
= ((struct file_name_list *)
|
||||
xmalloc (sizeof (struct file_name_list)
|
||||
+ strlen (prefix) + strlen (name) + 1 /* for trailing / */));
|
||||
+ strlen (prefix) + strlen (name) + 2));
|
||||
size_t len;
|
||||
strcpy (dir->fname, prefix);
|
||||
strcat (dir->fname, name);
|
||||
len = simplify_filename (dir->fname);
|
||||
|
||||
/* Convert directory name to a prefix. */
|
||||
if (dir->fname[len - 1] != '/') {
|
||||
if (dir->fname[len - 1] != DIR_SEPARATOR) {
|
||||
if (len == 1 && dir->fname[len - 1] == '.')
|
||||
len = 0;
|
||||
else
|
||||
dir->fname[len++] = '/';
|
||||
dir->fname[len++] = DIR_SEPARATOR;
|
||||
dir->fname[len] = 0;
|
||||
}
|
||||
|
||||
|
@ -9832,6 +9867,14 @@ new_include_prefix (prev_file_name, prefix, name)
|
|||
#ifndef VMS
|
||||
/* VMS can't stat dir prefixes, so skip these optimizations in VMS. */
|
||||
|
||||
/* Add a trailing "." if there is a filename. This increases the number
|
||||
of systems that can stat directories. We remove it below. */
|
||||
if (len != 0)
|
||||
{
|
||||
dir->fname[len] = '.';
|
||||
dir->fname[len + 1] = 0;
|
||||
}
|
||||
|
||||
/* Ignore a nonexistent directory. */
|
||||
if (stat (len ? dir->fname : ".", &dir->st) != 0) {
|
||||
if (errno != ENOENT && errno != ENOTDIR)
|
||||
|
@ -9840,6 +9883,9 @@ new_include_prefix (prev_file_name, prefix, name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (len != 0)
|
||||
dir->fname[len] = 0;
|
||||
|
||||
/* Ignore a directory whose identity matches the previous one. */
|
||||
if (prev_file_name
|
||||
&& INO_T_EQ (prev_file_name->st.st_ino, dir->st.st_ino)
|
||||
|
@ -10200,27 +10246,26 @@ hack_vms_include_specification (fname, vaxc_include)
|
|||
"shr=nil"- Disallow file sharing while file is open. */
|
||||
|
||||
static FILE *
|
||||
freopen (fname, type, oldfile)
|
||||
VMS_freopen (fname, type, oldfile)
|
||||
char *fname;
|
||||
char *type;
|
||||
FILE *oldfile;
|
||||
{
|
||||
#undef freopen /* Get back the REAL fopen routine */
|
||||
if (strcmp (type, "w") == 0)
|
||||
return freopen (fname, type, oldfile, "mbc=16", "deq=64", "fop=tef", "shr=nil");
|
||||
return freopen (fname, type, oldfile, "mbc=16");
|
||||
return decc$freopen (fname, type, oldfile,
|
||||
"mbc=16", "deq=64", "fop=tef", "shr=nil");
|
||||
return decc$freopen (fname, type, oldfile, "mbc=16");
|
||||
}
|
||||
|
||||
static FILE *
|
||||
fopen (fname, type)
|
||||
VMS_fopen (fname, type)
|
||||
char *fname;
|
||||
char *type;
|
||||
{
|
||||
#undef fopen /* Get back the REAL fopen routine */
|
||||
/* The gcc-vms-1.42 distribution's header files prototype fopen with two
|
||||
fixed arguments, which matches ANSI's specification but not VAXCRTL's
|
||||
pre-ANSI implementation. This hack circumvents the mismatch problem. */
|
||||
FILE *(*vmslib_fopen)() = (FILE *(*)()) fopen;
|
||||
FILE *(*vmslib_fopen)() = (FILE *(*)()) decc$fopen;
|
||||
|
||||
if (*type == 'w')
|
||||
return (*vmslib_fopen) (fname, type, "mbc=32",
|
||||
|
@ -10230,13 +10275,12 @@ fopen (fname, type)
|
|||
}
|
||||
|
||||
static int
|
||||
open (fname, flags, prot)
|
||||
VMS_open (fname, flags, prot)
|
||||
char *fname;
|
||||
int flags;
|
||||
int prot;
|
||||
{
|
||||
#undef open /* Get back the REAL open routine */
|
||||
return open (fname, flags, prot, "mbc=16", "deq=64", "fop=tef");
|
||||
return decc$open (fname, flags, prot, "mbc=16", "deq=64", "fop=tef");
|
||||
}
|
||||
|
||||
/* more VMS hackery */
|
||||
|
@ -10257,14 +10301,13 @@ extern unsigned long sys$parse(), sys$search();
|
|||
bad enough, but then compounding the problem by reporting the reason for
|
||||
failure as "normal successful completion." */
|
||||
|
||||
#undef fstat /* get back to library version */
|
||||
|
||||
static int
|
||||
VMS_fstat (fd, statbuf)
|
||||
int fd;
|
||||
struct stat *statbuf;
|
||||
{
|
||||
int result = fstat (fd, statbuf);
|
||||
int result = decc$fstat (fd, statbuf);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
|
|
|
@ -1592,9 +1592,9 @@ collect_execute (prog, argv, redir)
|
|||
{
|
||||
unlink (redir);
|
||||
if (freopen (redir, "a", stdout) == NULL)
|
||||
fatal_perror ("redirecting stdout");
|
||||
fatal_perror ("redirecting stdout: %s", redir);
|
||||
if (freopen (redir, "a", stderr) == NULL)
|
||||
fatal_perror ("redirecting stderr");
|
||||
fatal_perror ("redirecting stderr: %s", redir);
|
||||
}
|
||||
|
||||
execvp (argv[0], argv);
|
||||
|
|
140
gcc/combine.c
140
gcc/combine.c
|
@ -970,13 +970,10 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
|
|||
inputs. */
|
||||
|| (REGNO (src) < FIRST_PSEUDO_REGISTER
|
||||
&& (! HARD_REGNO_MODE_OK (REGNO (src), GET_MODE (src))
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
|| (SMALL_REGISTER_CLASSES
|
||||
&& ((! all_adjacent && ! REG_USERVAR_P (src))
|
||||
|| (FUNCTION_VALUE_REGNO_P (REGNO (src))
|
||||
&& ! REG_USERVAR_P (src))))
|
||||
#endif
|
||||
))))
|
||||
&& ! REG_USERVAR_P (src))))))))
|
||||
return 0;
|
||||
}
|
||||
else if (GET_CODE (dest) != CC0)
|
||||
|
@ -1086,7 +1083,7 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
|
|||
If I1_NOT_IN_SRC is non-zero, it means that finding I1 in the source
|
||||
of a SET must prevent combination from occurring.
|
||||
|
||||
On machines where SMALL_REGISTER_CLASSES is defined, we don't combine
|
||||
On machines where SMALL_REGISTER_CLASSES is non-zero, we don't combine
|
||||
if the destination of a SET is a hard register that isn't a user
|
||||
variable.
|
||||
|
||||
|
@ -1163,12 +1160,9 @@ combinable_i3pat (i3, loc, i2dest, i1dest, i1_not_in_src, pi3dest_killed)
|
|||
&& REGNO (inner_dest) < FIRST_PSEUDO_REGISTER
|
||||
&& (! HARD_REGNO_MODE_OK (REGNO (inner_dest),
|
||||
GET_MODE (inner_dest))
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
|| (SMALL_REGISTER_CLASSES
|
||||
&& GET_CODE (src) != CALL && ! REG_USERVAR_P (inner_dest)
|
||||
&& FUNCTION_VALUE_REGNO_P (REGNO (inner_dest)))
|
||||
#endif
|
||||
))
|
||||
|| (SMALL_REGISTER_CLASSES && GET_CODE (src) != CALL
|
||||
&& ! REG_USERVAR_P (inner_dest)
|
||||
&& FUNCTION_VALUE_REGNO_P (REGNO (inner_dest)))))
|
||||
|| (i1_not_in_src && reg_overlap_mentioned_p (i1dest, src)))
|
||||
return 0;
|
||||
|
||||
|
@ -1308,12 +1302,10 @@ try_combine (i3, i2, i1)
|
|||
if (i1 == 0 && GET_CODE (i3) == INSN && GET_CODE (PATTERN (i3)) == SET
|
||||
&& GET_CODE (SET_SRC (PATTERN (i3))) == REG
|
||||
&& REGNO (SET_SRC (PATTERN (i3))) >= FIRST_PSEUDO_REGISTER
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
&& (! SMALL_REGISTER_CLASSES
|
||||
|| GET_CODE (SET_DEST (PATTERN (i3))) != REG
|
||||
|| REGNO (SET_DEST (PATTERN (i3))) >= FIRST_PSEUDO_REGISTER
|
||||
|| REG_USERVAR_P (SET_DEST (PATTERN (i3))))
|
||||
#endif
|
||||
|| (GET_CODE (SET_DEST (PATTERN (i3))) != REG
|
||||
|| REGNO (SET_DEST (PATTERN (i3))) >= FIRST_PSEUDO_REGISTER
|
||||
|| REG_USERVAR_P (SET_DEST (PATTERN (i3)))))
|
||||
&& find_reg_note (i3, REG_DEAD, SET_SRC (PATTERN (i3)))
|
||||
&& GET_CODE (PATTERN (i2)) == PARALLEL
|
||||
&& ! side_effects_p (SET_DEST (PATTERN (i3)))
|
||||
|
@ -2066,8 +2058,21 @@ try_combine (i3, i2, i1)
|
|||
&& ! reg_referenced_p (SET_DEST (XVECEXP (newpat, 0, 0)),
|
||||
XVECEXP (newpat, 0, 1)))
|
||||
{
|
||||
newi2pat = XVECEXP (newpat, 0, 1);
|
||||
newpat = XVECEXP (newpat, 0, 0);
|
||||
/* Normally, it doesn't matter which of the two is done first,
|
||||
but it does if one references cc0. In that case, it has to
|
||||
be first. */
|
||||
#ifdef HAVE_cc0
|
||||
if (reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 0)))
|
||||
{
|
||||
newi2pat = XVECEXP (newpat, 0, 0);
|
||||
newpat = XVECEXP (newpat, 0, 1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
newi2pat = XVECEXP (newpat, 0, 1);
|
||||
newpat = XVECEXP (newpat, 0, 0);
|
||||
}
|
||||
|
||||
i2_code_number
|
||||
= recog_for_combine (&newi2pat, i2, &new_i2_notes, &i2_scratches);
|
||||
|
@ -2293,7 +2298,9 @@ try_combine (i3, i2, i1)
|
|||
}
|
||||
|
||||
/* If I3DEST was used in I3SRC, it really died in I3. We may need to
|
||||
put a REG_DEAD note for it somewhere. Similarly for I2 and I1.
|
||||
put a REG_DEAD note for it somewhere. If NEWI2PAT exists and sets
|
||||
I3DEST, the death must be somewhere before I2, not I3. If we passed I3
|
||||
in that case, it might delete I2. Similarly for I2 and I1.
|
||||
Show an additional death due to the REG_DEAD note we make here. If
|
||||
we discard it in distribute_notes, we will decrement it again. */
|
||||
|
||||
|
@ -2302,16 +2309,17 @@ try_combine (i3, i2, i1)
|
|||
if (GET_CODE (i3dest_killed) == REG)
|
||||
REG_N_DEATHS (REGNO (i3dest_killed))++;
|
||||
|
||||
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
|
||||
NULL_RTX),
|
||||
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
|
||||
NULL_RTX, NULL_RTX);
|
||||
if (newi2pat && reg_set_p (i3dest_killed, newi2pat))
|
||||
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
|
||||
NULL_RTX),
|
||||
NULL_RTX, i2, NULL_RTX, NULL_RTX, NULL_RTX);
|
||||
else
|
||||
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
|
||||
NULL_RTX),
|
||||
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
|
||||
NULL_RTX, NULL_RTX);
|
||||
}
|
||||
|
||||
/* For I2 and I1, we have to be careful. If NEWI2PAT exists and sets
|
||||
I2DEST or I1DEST, the death must be somewhere before I2, not I3. If
|
||||
we passed I3 in that case, it might delete I2. */
|
||||
|
||||
if (i2dest_in_i2src)
|
||||
{
|
||||
if (GET_CODE (i2dest) == REG)
|
||||
|
@ -2730,6 +2738,9 @@ find_split_point (loc, insn)
|
|||
unsignedp = (code == ZERO_EXTRACT);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (len && pos >= 0 && pos + len <= GET_MODE_BITSIZE (GET_MODE (inner)))
|
||||
|
@ -2826,6 +2837,9 @@ find_split_point (loc, insn)
|
|||
SUBST (XEXP (x, 1), tem);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Otherwise, select our actions depending on our rtx class. */
|
||||
|
@ -4083,6 +4097,9 @@ simplify_rtx (x, op0_mode, last, in_dest)
|
|||
#endif
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return x;
|
||||
|
@ -4230,6 +4247,8 @@ simplify_if_then_else (x)
|
|||
case LT:
|
||||
case LE:
|
||||
return gen_unary (NEG, mode, mode, gen_unary (ABS, mode, mode, true));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Look for MIN or MAX. */
|
||||
|
@ -4253,6 +4272,8 @@ simplify_if_then_else (x)
|
|||
case LEU:
|
||||
case LTU:
|
||||
return gen_binary (UMIN, mode, true, false);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we have (if_then_else COND (OP Z C1) Z) and OP is an identity when its
|
||||
|
@ -4943,6 +4964,9 @@ simplify_logical (x, last)
|
|||
return gen_rtx_combine (reverse_condition (GET_CODE (op0)),
|
||||
mode, XEXP (op0, 0), XEXP (op0, 1));
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
return x;
|
||||
|
@ -5656,6 +5680,9 @@ extract_left_shift (x, count)
|
|||
GEN_INT (INTVAL (XEXP (x, 1)) >> count));
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -5897,6 +5924,10 @@ make_compound_operation (x, in_code)
|
|||
|
||||
return newer;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (new)
|
||||
|
@ -6466,6 +6497,9 @@ force_to_mode (x, mode, mask, reg, just_select)
|
|||
force_to_mode (XEXP (x, 2), mode,
|
||||
mask, reg,next_select)));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Ensure we return a value of the proper mode. */
|
||||
|
@ -6688,6 +6722,8 @@ known_cond (x, cond, reg, val)
|
|||
case LT: case LE:
|
||||
return gen_unary (NEG, GET_MODE (XEXP (x, 0)), GET_MODE (XEXP (x, 0)),
|
||||
XEXP (x, 0));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* The only other cases we handle are MIN, MAX, and comparisons if the
|
||||
|
@ -6724,6 +6760,8 @@ known_cond (x, cond, reg, val)
|
|||
return unsignedp ? XEXP (x, 1) : x;
|
||||
case LEU: case LTU:
|
||||
return unsignedp ? XEXP (x, 0) : x;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7435,6 +7473,8 @@ nonzero_bits (x, mode)
|
|||
result_width = MIN (width0, width1);
|
||||
result_low = MIN (low0, low1);
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
if (result_width < mode_width)
|
||||
|
@ -7537,6 +7577,9 @@ nonzero_bits (x, mode)
|
|||
nonzero &= (nonzero_bits (XEXP (x, 1), mode)
|
||||
| nonzero_bits (XEXP (x, 2), mode));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return nonzero;
|
||||
|
@ -7578,13 +7621,25 @@ num_sign_bit_copies (x, mode)
|
|||
return MAX (1, (num_sign_bit_copies (x, GET_MODE (x))
|
||||
- (GET_MODE_BITSIZE (GET_MODE (x)) - bitwidth)));
|
||||
|
||||
if (GET_MODE (x) != VOIDmode && bitwidth > GET_MODE_BITSIZE (GET_MODE (x)))
|
||||
{
|
||||
#ifndef WORD_REGISTER_OPERATIONS
|
||||
/* If this machine does not do all register operations on the entire
|
||||
register and MODE is wider than the mode of X, we can say nothing
|
||||
at all about the high-order bits. */
|
||||
if (GET_MODE (x) != VOIDmode && bitwidth > GET_MODE_BITSIZE (GET_MODE (x)))
|
||||
return 1;
|
||||
return 1;
|
||||
#else
|
||||
/* Likewise on machines that do, if the mode of the object is smaller
|
||||
than a word and loads of that size don't sign extend, we can say
|
||||
nothing about the high order bits. */
|
||||
if (GET_MODE_BITSIZE (GET_MODE (x)) < BITS_PER_WORD
|
||||
#ifdef LOAD_EXTEND_OP
|
||||
&& LOAD_EXTEND_OP (GET_MODE (x)) != SIGN_EXTEND
|
||||
#endif
|
||||
)
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (code)
|
||||
{
|
||||
|
@ -7824,6 +7879,10 @@ num_sign_bit_copies (x, mode)
|
|||
case GEU: case GTU: case LEU: case LTU:
|
||||
if (STORE_FLAG_VALUE == -1)
|
||||
return bitwidth;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we haven't been able to figure it out by one of the above rules,
|
||||
|
@ -7935,6 +7994,8 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p)
|
|||
case NEG:
|
||||
op0 = NIL;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7976,6 +8037,8 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p)
|
|||
/* (a ^ b) & b) == (~a) & b */
|
||||
*pcomp_p = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check for NO-OP cases. */
|
||||
|
@ -8609,6 +8672,9 @@ simplify_shift_const (x, code, result_mode, varop, count)
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -9441,6 +9507,9 @@ simplify_comparison (code, pop0, pop1)
|
|||
code = LT;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Compute some predicates to simplify code below. */
|
||||
|
@ -9973,6 +10042,9 @@ simplify_comparison (code, pop0, pop1)
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -10103,9 +10175,10 @@ reversible_comparison_p (x)
|
|||
x = get_last_value (XEXP (x, 0));
|
||||
return (x && GET_CODE (x) == COMPARE
|
||||
&& ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0))));
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Utility function for following routine. Called when X is part of a value
|
||||
|
@ -10712,8 +10785,11 @@ mark_used_regs_combine (x)
|
|||
mark_used_regs_combine (XEXP (testreg, 0));
|
||||
|
||||
mark_used_regs_combine (SET_SRC (x));
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Recursively scan the operands of this expression. */
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
/* config.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Include the old config.h as config2.h to simplify the transition
|
||||
to autoconf. */
|
||||
#include "config2.h"
|
||||
|
||||
/* Whether malloc must be declared even if <stdlib.h> is included. */
|
||||
#undef NEED_DECLARATION_MALLOC
|
||||
|
||||
|
@ -28,6 +23,12 @@
|
|||
/* Define if you have the strtoul function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
|
|
|
@ -155,6 +155,7 @@ case $basic_machine in
|
|||
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| sparc | sparclet | sparclite | sparc64 | v850)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
|
@ -179,7 +180,9 @@ case $basic_machine in
|
|||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
|
@ -568,6 +571,12 @@ case $basic_machine in
|
|||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
|
|
|
@ -20,8 +20,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
|
|||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
@ -100,16 +100,12 @@ static void add_long_const PROTO((FILE *, HOST_WIDE_INT, int, int, int));
|
|||
/* Compute the size of the save area in the stack. */
|
||||
static void alpha_sa_mask PROTO((unsigned long *imaskP,
|
||||
unsigned long *fmaskP));
|
||||
|
||||
/* Strip type information. */
|
||||
#define CURRENT_FUNCTION_ARGS_INFO \
|
||||
(TARGET_OPEN_VMS ? current_function_args_info & 0xff \
|
||||
: current_function_args_info)
|
||||
|
||||
/* Some helpful register info. */
|
||||
#define REG_PV 27
|
||||
#define REG_RA 26
|
||||
|
||||
/* Get the number of args of a function in one of two ways. */
|
||||
#ifdef OPEN_VMS
|
||||
#define NUM_ARGS current_function_args_info.num_args
|
||||
#else
|
||||
#define NUM_ARGS current_function_args_info
|
||||
#endif
|
||||
|
||||
/* Parse target option strings. */
|
||||
|
||||
|
@ -117,21 +113,42 @@ void
|
|||
override_options ()
|
||||
{
|
||||
alpha_cpu
|
||||
= TARGET_CPU_DEFAULT & MASK_CPU_EV5 ? PROCESSOR_EV5 : PROCESSOR_EV4;
|
||||
= TARGET_CPU_DEFAULT & MASK_CPU_EV6 ? PROCESSOR_EV6
|
||||
: (TARGET_CPU_DEFAULT & MASK_CPU_EV5 ? PROCESSOR_EV5 : PROCESSOR_EV4);
|
||||
|
||||
if (alpha_cpu_string)
|
||||
{
|
||||
if (! strcmp (alpha_cpu_string, "ev4")
|
||||
|| ! strcmp (alpha_cpu_string, "21064"))
|
||||
alpha_cpu = PROCESSOR_EV4;
|
||||
{
|
||||
alpha_cpu = PROCESSOR_EV4;
|
||||
target_flags &= ~ (MASK_BWX | MASK_CIX | MASK_MAX);
|
||||
}
|
||||
else if (! strcmp (alpha_cpu_string, "ev5")
|
||||
|| ! strcmp (alpha_cpu_string, "21164"))
|
||||
alpha_cpu = PROCESSOR_EV5;
|
||||
{
|
||||
alpha_cpu = PROCESSOR_EV5;
|
||||
target_flags &= ~ (MASK_BWX | MASK_CIX | MASK_MAX);
|
||||
}
|
||||
else if (! strcmp (alpha_cpu_string, "ev56")
|
||||
|| ! strcmp (alpha_cpu_string, "21164a"))
|
||||
{
|
||||
alpha_cpu = PROCESSOR_EV5;
|
||||
target_flags |= MASK_BYTE_OPS;
|
||||
target_flags |= MASK_BWX;
|
||||
target_flags &= ~ (MASK_CIX | MASK_MAX);
|
||||
}
|
||||
else if (! strcmp (alpha_cpu_string, "pca56")
|
||||
|| ! strcmp (alpha_cpu_string, "21164PC"))
|
||||
{
|
||||
alpha_cpu = PROCESSOR_EV5;
|
||||
target_flags |= MASK_BWX | MASK_MAX;
|
||||
target_flags &= ~ MASK_CIX;
|
||||
}
|
||||
else if (! strcmp (alpha_cpu_string, "ev6")
|
||||
|| ! strcmp (alpha_cpu_string, "21264"))
|
||||
{
|
||||
alpha_cpu = PROCESSOR_EV6;
|
||||
target_flags |= MASK_BWX | MASK_CIX | MASK_MAX;
|
||||
}
|
||||
else
|
||||
error ("bad value `%s' for -mcpu switch", alpha_cpu_string);
|
||||
|
@ -487,7 +504,7 @@ input_operand (op, mode)
|
|||
return 1;
|
||||
/* ... fall through ... */
|
||||
case MEM:
|
||||
return ((TARGET_BYTE_OPS || (mode != HImode && mode != QImode))
|
||||
return ((TARGET_BWX || (mode != HImode && mode != QImode))
|
||||
&& general_operand (op, mode));
|
||||
|
||||
case CONST_DOUBLE:
|
||||
|
@ -1441,12 +1458,12 @@ print_operand (file, x, code)
|
|||
|
||||
case ',':
|
||||
/* Generates single precision instruction suffix. */
|
||||
fprintf (file, "%c", (TARGET_FLOAT_VAX?'f':'s'));
|
||||
fprintf (file, "%c", (TARGET_FLOAT_VAX ? 'f' : 's'));
|
||||
break;
|
||||
|
||||
case '-':
|
||||
/* Generates double precision instruction suffix. */
|
||||
fprintf (file, "%c", (TARGET_FLOAT_VAX?'g':'t'));
|
||||
fprintf (file, "%c", (TARGET_FLOAT_VAX ? 'g' : 't'));
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
|
@ -1673,9 +1690,9 @@ alpha_builtin_saveregs (arglist)
|
|||
|
||||
/* Compute the current position into the args, taking into account
|
||||
both registers and memory. Both of these are already included in
|
||||
current_function_args_info. */
|
||||
NUM_ARGS. */
|
||||
|
||||
argsize = GEN_INT (CURRENT_FUNCTION_ARGS_INFO * UNITS_PER_WORD);
|
||||
argsize = GEN_INT (NUM_ARGS * UNITS_PER_WORD);
|
||||
|
||||
/* For Unix, SETUP_INCOMING_VARARGS moves the starting address base up by 48,
|
||||
storing fp arg registers in the first 48 bytes, and the integer arg
|
||||
|
@ -1688,10 +1705,10 @@ alpha_builtin_saveregs (arglist)
|
|||
|
||||
if (TARGET_OPEN_VMS)
|
||||
addr = plus_constant (virtual_incoming_args_rtx,
|
||||
CURRENT_FUNCTION_ARGS_INFO <= 5 + stdarg
|
||||
NUM_ARGS <= 5 + stdarg
|
||||
? UNITS_PER_WORD : - 6 * UNITS_PER_WORD);
|
||||
else
|
||||
addr = (CURRENT_FUNCTION_ARGS_INFO <= 5 + stdarg
|
||||
addr = (NUM_ARGS <= 5 + stdarg
|
||||
? plus_constant (virtual_incoming_args_rtx,
|
||||
6 * UNITS_PER_WORD)
|
||||
: plus_constant (virtual_incoming_args_rtx,
|
||||
|
@ -1750,6 +1767,39 @@ alpha_builtin_saveregs (arglist)
|
|||
}
|
||||
}
|
||||
|
||||
#if OPEN_VMS
|
||||
#define REG_PV 27
|
||||
#define REG_RA 26
|
||||
#else
|
||||
#define REG_RA 26
|
||||
#endif
|
||||
|
||||
/* Find the current function's return address.
|
||||
|
||||
??? It would be better to arrange things such that if we would ordinarily
|
||||
have been a leaf function and we didn't spill the hard reg that we
|
||||
wouldn't have to save the register in the prolog. But it's not clear
|
||||
how to get the right information at the right time. */
|
||||
|
||||
static rtx alpha_return_addr_rtx;
|
||||
|
||||
rtx
|
||||
alpha_return_addr ()
|
||||
{
|
||||
rtx ret;
|
||||
|
||||
if ((ret = alpha_return_addr_rtx) == NULL)
|
||||
{
|
||||
alpha_return_addr_rtx = ret = gen_reg_rtx (Pmode);
|
||||
|
||||
emit_insn_after (gen_rtx (SET, VOIDmode, ret,
|
||||
gen_rtx (REG, Pmode, REG_RA)),
|
||||
get_insns ());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* This page contains routines that are used to determine what the function
|
||||
prologue and epilogue code will do and write them out. */
|
||||
|
||||
|
@ -2316,6 +2366,18 @@ alpha_does_function_need_gp ()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
vms_valid_decl_attribute_p (decl, attributes, identifier, args)
|
||||
tree decl;
|
||||
tree attributes;
|
||||
tree identifier;
|
||||
tree args;
|
||||
{
|
||||
if (is_attribute_p ("overlaid", identifier))
|
||||
return (args == NULL_TREE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
output_prolog (file, size)
|
||||
FILE *file;
|
||||
|
@ -2646,6 +2708,8 @@ output_epilog (file, size)
|
|||
|
||||
/* Show that we know this function if it is called again. */
|
||||
SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1;
|
||||
|
||||
alpha_return_addr_rtx = 0;
|
||||
}
|
||||
#endif /* !OPEN_VMS */
|
||||
|
||||
|
@ -3124,46 +3188,39 @@ check_float_value (mode, d, overflow)
|
|||
|
||||
#if OPEN_VMS
|
||||
|
||||
void *
|
||||
function_arg (cum, mode, type, named)
|
||||
CUMULATIVE_ARGS *cum;
|
||||
enum machine_mode mode;
|
||||
tree type;
|
||||
int named;
|
||||
/* Return the VMS argument type corresponding to MODE. */
|
||||
|
||||
enum avms_arg_type
|
||||
alpha_arg_type (mode)
|
||||
enum machine_mode mode;
|
||||
{
|
||||
int arg;
|
||||
|
||||
if (mode == VOIDmode) /* final call, return argument information */
|
||||
{
|
||||
return GEN_INT (*cum);
|
||||
}
|
||||
|
||||
arg = *cum & 0xff;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case SFmode:
|
||||
*cum |= (((TARGET_FLOAT_VAX)?1:4) << ((arg * 3)+8)); /* 4 = AI$K_AR_FS, IEEE single */
|
||||
break;
|
||||
case DFmode:
|
||||
*cum |= (((TARGET_FLOAT_VAX)?3:5) << ((arg * 3)+8)); /* 5 = AI$K_AR_FT, IEEE double */
|
||||
break;
|
||||
case TFmode:
|
||||
*cum |= (7 << ((arg * 3)+8)); /* 5 = AI$K_AR_FT, IEEE double */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case SFmode:
|
||||
return TARGET_FLOAT_VAX ? FF : FS;
|
||||
case DFmode:
|
||||
return TARGET_FLOAT_VAX ? FD : FT;
|
||||
default:
|
||||
return I64;
|
||||
}
|
||||
|
||||
return (arg < 6 && ! MUST_PASS_IN_STACK (mode, type)
|
||||
? gen_rtx(REG, mode,
|
||||
(*cum & 0xff) + 16 + ((TARGET_FPREGS
|
||||
&& (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
|
||||
|| GET_MODE_CLASS (mode) == MODE_FLOAT))
|
||||
* 32))
|
||||
: 0);
|
||||
}
|
||||
|
||||
/* Return an rtx for an integer representing the VMS Argument Information
|
||||
register value. */
|
||||
|
||||
struct rtx_def *
|
||||
alpha_arg_info_reg_val (cum)
|
||||
CUMULATIVE_ARGS cum;
|
||||
{
|
||||
unsigned HOST_WIDE_INT regval = cum.num_args;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
regval |= ((int) cum.atypes[i]) << (i * 3 + 8);
|
||||
|
||||
return GEN_INT (regval);
|
||||
}
|
||||
|
||||
/* Structure to collect function names for final output
|
||||
in link section. */
|
||||
|
||||
|
|
|
@ -80,7 +80,8 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
enum processor_type
|
||||
{PROCESSOR_EV4, /* 2106[46]{a,} */
|
||||
PROCESSOR_EV5}; /* 21164{a,} */
|
||||
PROCESSOR_EV5, /* 21164{a,pc,} */
|
||||
PROCESSOR_EV6}; /* 21264 */
|
||||
|
||||
extern enum processor_type alpha_cpu;
|
||||
|
||||
|
@ -168,14 +169,31 @@ extern enum alpha_fp_trap_mode alpha_fptm;
|
|||
#define MASK_FLOAT_VAX 512
|
||||
#define TARGET_FLOAT_VAX (target_flags & MASK_FLOAT_VAX)
|
||||
|
||||
/* This means that the processor has byte and half word loads and stores. */
|
||||
/* This means that the processor has byte and half word loads and stores
|
||||
(the BWX extension). */
|
||||
|
||||
#define MASK_BYTE_OPS 1024
|
||||
#define TARGET_BYTE_OPS (target_flags & MASK_BYTE_OPS)
|
||||
#define MASK_BWX 1024
|
||||
#define TARGET_BWX (target_flags & MASK_BWX)
|
||||
|
||||
/* This means that the processor is an EV5 or EV56. This is defined only
|
||||
in TARGET_CPU_DEFAULT. */
|
||||
#define MASK_CPU_EV5 2048
|
||||
/* This means that the processor has the CIX extension. */
|
||||
#define MASK_CIX 2048
|
||||
#define TARGET_CIX (target_flags & MASK_CIX)
|
||||
|
||||
/* This means that the processor has the MAX extension. */
|
||||
#define MASK_MAX 4096
|
||||
#define TARGET_MAX (target_flags & MASK_MAX)
|
||||
|
||||
/* This means that the processor is an EV5, EV56, or PCA56. This is defined
|
||||
only in TARGET_CPU_DEFAULT. */
|
||||
#define MASK_CPU_EV5 8192
|
||||
|
||||
/* Likewise for EV6. */
|
||||
#define MASK_CPU_EV6 16384
|
||||
|
||||
/* This means we support the .arch directive in the assembler. Only
|
||||
defined in TARGET_CPU_DEFAULT. */
|
||||
#define MASK_SUPPORT_ARCH 32768
|
||||
#define TARGET_SUPPORT_ARCH (target_flags & MASK_SUPPORT_ARCH)
|
||||
|
||||
/* Macro to define tables used to set the flags.
|
||||
This is a list in braces of pairs in braces,
|
||||
|
@ -196,8 +214,12 @@ extern enum alpha_fp_trap_mode alpha_fptm;
|
|||
{"build-constants", MASK_BUILD_CONSTANTS}, \
|
||||
{"float-vax", MASK_FLOAT_VAX}, \
|
||||
{"float-ieee", -MASK_FLOAT_VAX}, \
|
||||
{"byte", MASK_BYTE_OPS}, \
|
||||
{"no-byte", -MASK_BYTE_OPS}, \
|
||||
{"bwx", MASK_BWX}, \
|
||||
{"no-bwx", -MASK_BWX}, \
|
||||
{"cix", MASK_CIX}, \
|
||||
{"no-cix", -MASK_CIX}, \
|
||||
{"max", MASK_MAX}, \
|
||||
{"no-max", -MASK_MAX}, \
|
||||
{"", TARGET_DEFAULT | TARGET_CPU_DEFAULT} }
|
||||
|
||||
#define TARGET_DEFAULT MASK_FP|MASK_FPREGS
|
||||
|
@ -403,7 +425,7 @@ extern void override_options ();
|
|||
|
||||
/* For atomic access to objects, must have at least 32-bit alignment
|
||||
unless the machine has byte operations. */
|
||||
#define MINIMUM_ATOMIC_ALIGNMENT (TARGET_BYTE_OPS ? 8 : 32)
|
||||
#define MINIMUM_ATOMIC_ALIGNMENT (TARGET_BWX ? 8 : 32)
|
||||
|
||||
/* Align all constants and variables to at least a word boundary so
|
||||
we can pick up pieces of them faster. */
|
||||
|
@ -711,7 +733,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
|
|||
&& (((CLASS) == FLOAT_REGS \
|
||||
&& ((MODE) == SImode || (MODE) == HImode || (MODE) == QImode)) \
|
||||
|| (((MODE) == QImode || (MODE) == HImode) \
|
||||
&& ! TARGET_BYTE_OPS && unaligned_memory_operand (IN, MODE)))) \
|
||||
&& ! TARGET_BWX && unaligned_memory_operand (IN, MODE)))) \
|
||||
? GENERAL_REGS \
|
||||
: ((CLASS) == FLOAT_REGS && GET_CODE (IN) == MEM \
|
||||
&& GET_CODE (XEXP (IN, 0)) == AND) ? GENERAL_REGS \
|
||||
|
@ -727,7 +749,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
|
|||
&& (GET_CODE (SUBREG_REG (OUT)) == MEM \
|
||||
|| (GET_CODE (SUBREG_REG (OUT)) == REG \
|
||||
&& REGNO (SUBREG_REG (OUT)) >= FIRST_PSEUDO_REGISTER)))) \
|
||||
&& ((((MODE) == HImode || (MODE) == QImode) && ! TARGET_BYTE_OPS \
|
||||
&& ((((MODE) == HImode || (MODE) == QImode) && ! TARGET_BWX \
|
||||
|| ((MODE) == SImode && (CLASS) == FLOAT_REGS)))) \
|
||||
? GENERAL_REGS \
|
||||
: ((CLASS) == FLOAT_REGS && GET_CODE (OUT) == MEM \
|
||||
|
@ -738,9 +760,10 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
|
|||
: NO_REGS)
|
||||
|
||||
/* If we are copying between general and FP registers, we need a memory
|
||||
location. */
|
||||
location unless the CIX extension is available. */
|
||||
|
||||
#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) ((CLASS1) != (CLASS2))
|
||||
#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) \
|
||||
(! TARGET_CIX && (CLASS1) != (CLASS2))
|
||||
|
||||
/* Specify the mode to be used for memory when a secondary memory
|
||||
location is needed. If MODE is floating-point, use it. Otherwise,
|
||||
|
@ -890,7 +913,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
|
|||
|
||||
#define FUNCTION_VALUE(VALTYPE, FUNC) \
|
||||
gen_rtx (REG, \
|
||||
(INTEGRAL_MODE_P (TYPE_MODE (VALTYPE)) \
|
||||
(INTEGRAL_TYPE_P (VALTYPE) \
|
||||
&& TYPE_PRECISION (VALTYPE) < BITS_PER_WORD) \
|
||||
? word_mode : TYPE_MODE (VALTYPE), \
|
||||
((TARGET_FPREGS \
|
||||
|
@ -1538,7 +1561,7 @@ extern void alpha_init_expanders ();
|
|||
|
||||
/* Define the value returned by a floating-point comparison instruction. */
|
||||
|
||||
#define FLOAT_STORE_FLAG_VALUE 2.0
|
||||
#define FLOAT_STORE_FLAG_VALUE (TARGET_FLOAT_VAX ? 0.5 : 2.0)
|
||||
|
||||
/* Canonicalize a comparison from one we don't have to one we do have. */
|
||||
|
||||
|
@ -1714,14 +1737,6 @@ extern void alpha_init_expanders ();
|
|||
|
||||
/* Control the assembler format that we output. */
|
||||
|
||||
/* Emit the .arch pseudo op. This is separated out, because versions of
|
||||
OSF before 4.0 do not support it. */
|
||||
|
||||
#define ARCH_ASM_FILE_START(FILE) \
|
||||
fprintf (FILE, "\t.arch %s\n", \
|
||||
(TARGET_BYTE_OPS ? "ev56" \
|
||||
: alpha_cpu == PROCESSOR_EV4 ? "ev4" : "ev5"));
|
||||
|
||||
/* Output at beginning of assembler file. */
|
||||
|
||||
#define ASM_FILE_START(FILE) \
|
||||
|
@ -1730,7 +1745,13 @@ extern void alpha_init_expanders ();
|
|||
fprintf (FILE, "\t.set noreorder\n"); \
|
||||
fprintf (FILE, "\t.set volatile\n"); \
|
||||
fprintf (FILE, "\t.set noat\n"); \
|
||||
ARCH_ASM_FILE_START (FILE); \
|
||||
if (TARGET_SUPPORT_ARCH) \
|
||||
fprintf (FILE, "\t.arch %s\n", \
|
||||
alpha_cpu == PROCESSOR_EV6 ? "ev6" \
|
||||
: (alpha_cpu == PROCESSOR_EV5 \
|
||||
? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") \
|
||||
: "ev4")); \
|
||||
\
|
||||
ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \
|
||||
}
|
||||
|
||||
|
@ -2268,8 +2289,9 @@ do { \
|
|||
??? Stricly speaking, we only need -g if the user specifies -g. Passing
|
||||
it always means that we get slightly larger than necessary object files
|
||||
if the user does not specify -g. If we don't pass -g, then mips-tfile
|
||||
will need to be fixed to work in this case. */
|
||||
#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg}"
|
||||
will need to be fixed to work in this case. Pass -O0 since some
|
||||
optimization are broken and don't help us anyway. */
|
||||
#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg} -O0"
|
||||
#endif
|
||||
|
||||
/* Specify to run a post-processor, mips-tfile after the assembler
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
;; Processor type -- this attribute must exactly match the processor_type
|
||||
;; enumeration in alpha.h.
|
||||
|
||||
(define_attr "cpu" "ev4,ev5"
|
||||
(define_attr "cpu" "ev4,ev5,ev6"
|
||||
(const (symbol_ref "alpha_cpu")))
|
||||
|
||||
;; Define an insn type attribute. This is used in function unit delay
|
||||
|
@ -115,66 +115,67 @@
|
|||
64 59)
|
||||
|
||||
;; EV5 scheduling. EV5 can issue 4 insns per clock.
|
||||
;; We consider the EV6 and EV5 for now.
|
||||
|
||||
;; EV5 has two asymetric integer units. Model this with ebox,e0,e1.
|
||||
;; Everything uses ebox, and those that require particular pipes grab
|
||||
;; those as well.
|
||||
|
||||
(define_function_unit "ev5_ebox" 2 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "iadd,ilog,icmp,st,shift,imull,imulq,imulh"))
|
||||
1 1)
|
||||
|
||||
;; Memory takes at least 2 clocks, and load cannot dual issue with stores.
|
||||
(define_function_unit "ev5_ebox" 2 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "ld,ldsym"))
|
||||
2 1)
|
||||
|
||||
(define_function_unit "ev5_e0" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "ld,ldsym"))
|
||||
0 1
|
||||
[(eq_attr "type" "st")])
|
||||
|
||||
;; Conditional moves always take 2 ticks.
|
||||
(define_function_unit "ev5_ebox" 2 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "cmov"))
|
||||
2 1)
|
||||
|
||||
;; Stores, shifts, and multiplies can only issue to E0
|
||||
(define_function_unit "ev5_e0" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "st"))
|
||||
1 1)
|
||||
|
||||
;; But shifts and multiplies don't conflict with loads.
|
||||
(define_function_unit "ev5_e0" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "shift,imull,imulq,imulh"))
|
||||
1 1
|
||||
[(eq_attr "type" "st,shift,imull,imulq,imulh")])
|
||||
|
||||
;; Branches can only issue to E1
|
||||
(define_function_unit "ev5_e1" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "ibr,jsr"))
|
||||
1 1)
|
||||
|
||||
;; Multiplies also use the integer multiplier.
|
||||
(define_function_unit "ev5_imult" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "imull"))
|
||||
8 4)
|
||||
|
||||
(define_function_unit "ev5_imult" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "imulq"))
|
||||
12 8)
|
||||
|
||||
(define_function_unit "ev5_imult" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "imulh"))
|
||||
14 8)
|
||||
|
||||
|
@ -182,33 +183,33 @@
|
|||
;; on either so we have to play the game again.
|
||||
|
||||
(define_function_unit "ev5_fpu" 2 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "fadd,fmul,fcpys,fbr,fdivs,fdivt"))
|
||||
4 1)
|
||||
|
||||
;; Multiplies (resp. adds) also use the fmul (resp. fadd) units.
|
||||
(define_function_unit "ev5_fm" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "fmul"))
|
||||
4 1)
|
||||
|
||||
(define_function_unit "ev5_fa" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "fadd"))
|
||||
4 1)
|
||||
|
||||
(define_function_unit "ev5_fa" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "fbr"))
|
||||
1 1)
|
||||
|
||||
(define_function_unit "ev5_fa" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "fdivs"))
|
||||
15 1)
|
||||
|
||||
(define_function_unit "ev5_fa" 1 0
|
||||
(and (eq_attr "cpu" "ev5")
|
||||
(and (eq_attr "cpu" "ev5,ev6")
|
||||
(eq_attr "type" "fdivt"))
|
||||
22 1)
|
||||
|
||||
|
@ -810,7 +811,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "register_operand" "=r,r")
|
||||
(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"@
|
||||
zapnot %1,1,%0
|
||||
ldbu %0,%1"
|
||||
|
@ -819,7 +820,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "register_operand" "=r")
|
||||
(zero_extend:SI (match_operand:QI 1 "register_operand" "r")))]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"zapnot %1,1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
|
@ -832,7 +833,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:DI 0 "register_operand" "=r,r")
|
||||
(zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"@
|
||||
zapnot %1,1,%0
|
||||
ldbu %0,%1"
|
||||
|
@ -841,7 +842,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(zero_extend:DI (match_operand:QI 1 "register_operand" "r")))]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"zapnot %1,1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
|
@ -854,7 +855,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "register_operand" "=r,r")
|
||||
(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"@
|
||||
zapnot %1,3,%0
|
||||
ldwu %0,%1"
|
||||
|
@ -863,7 +864,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "register_operand" "=r")
|
||||
(zero_extend:SI (match_operand:HI 1 "register_operand" "r")))]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"zapnot %1,3,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
|
@ -876,7 +877,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:DI 0 "register_operand" "=r,r")
|
||||
(zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"@
|
||||
zapnot %1,3,%0
|
||||
ldwu %0,%1"
|
||||
|
@ -953,6 +954,30 @@
|
|||
"eqv %r1,%2,%0"
|
||||
[(set_attr "type" "ilog")])
|
||||
|
||||
;; Handle the FFS insn if we support CIX.
|
||||
|
||||
(define_expand "ffsdi2"
|
||||
[(set (match_dup 2)
|
||||
(unspec [(match_operand:DI 1 "register_operand" "")] 1))
|
||||
(set (match_dup 3)
|
||||
(plus:DI (match_dup 2) (const_int 1)))
|
||||
(set (match_operand:DI 0 "register_operand" "")
|
||||
(if_then_else:DI (eq (match_dup 1) (const_int 0))
|
||||
(const_int 0) (match_dup 3)))]
|
||||
"TARGET_CIX"
|
||||
"
|
||||
{
|
||||
operands[2] = gen_reg_rtx (DImode);
|
||||
operands[3] = gen_reg_rtx (DImode);
|
||||
}")
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(unspec [(match_operand:DI 1 "register_operand" "r")] 1))]
|
||||
"TARGET_CIX"
|
||||
"cttz %1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
;; Next come the shifts and the various extract and insert operations.
|
||||
|
||||
(define_insn "ashldi3"
|
||||
|
@ -1020,7 +1045,7 @@
|
|||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
emit_insn (gen_extendqihi2x (operands[0],
|
||||
force_reg (QImode, operands[1])));
|
||||
|
@ -1046,35 +1071,35 @@
|
|||
(define_insn "extendqidi2x"
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(sign_extend:DI (match_operand:QI 1 "register_operand" "r")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"sextb %1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "extendhidi2x"
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(sign_extend:DI (match_operand:HI 1 "register_operand" "r")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"sextw %1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "extendqisi2x"
|
||||
[(set (match_operand:SI 0 "register_operand" "=r")
|
||||
(sign_extend:SI (match_operand:QI 1 "register_operand" "r")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"sextb %1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "extendhisi2x"
|
||||
[(set (match_operand:SI 0 "register_operand" "=r")
|
||||
(sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"sextw %1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "extendqihi2x"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(sign_extend:HI (match_operand:QI 1 "register_operand" "r")))]
|
||||
"TARGET_BYTE_OPS"
|
||||
"TARGET_BWX"
|
||||
"sextb %1,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
|
@ -1088,7 +1113,7 @@
|
|||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
emit_insn (gen_extendqisi2x (operands[0],
|
||||
force_reg (QImode, operands[1])));
|
||||
|
@ -1122,7 +1147,7 @@
|
|||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
emit_insn (gen_extendqidi2x (operands[0],
|
||||
force_reg (QImode, operands[1])));
|
||||
|
@ -1154,7 +1179,7 @@
|
|||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
emit_insn (gen_extendhisi2x (operands[0],
|
||||
force_reg (HImode, operands[1])));
|
||||
|
@ -1188,7 +1213,7 @@
|
|||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
emit_insn (gen_extendhidi2x (operands[0],
|
||||
force_reg (HImode, operands[1])));
|
||||
|
@ -1791,6 +1816,31 @@
|
|||
"sub%-%)%& %R1,%R2,%0"
|
||||
[(set_attr "type" "fadd")
|
||||
(set_attr "trap" "yes")])
|
||||
|
||||
(define_insn "sqrtsf2"
|
||||
[(set (match_operand:SF 0 "register_operand" "=f")
|
||||
(sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))]
|
||||
"TARGET_FP && TARGET_CIX"
|
||||
"sqrt%, %1,%0"
|
||||
[(set_attr "type" "fdivs")
|
||||
(set_attr "trap" "yes")])
|
||||
|
||||
(define_insn "sqrtdf2"
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))]
|
||||
"TARGET_FP && TARGET_CIX"
|
||||
"sqrt%- %1,%0"
|
||||
[(set_attr "type" "fdivt")
|
||||
(set_attr "trap" "yes")])
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f")
|
||||
(sqrt:DF (float_extend:DF
|
||||
(match_operand:SF 1 "reg_or_fp0_operand" "fG"))))]
|
||||
"TARGET_FP && TARGET_CIX&& alpha_tp != ALPHA_TP_INSN"
|
||||
"sqrt%- %1,%0"
|
||||
[(set_attr "type" "fdivt")
|
||||
(set_attr "trap" "yes")])
|
||||
|
||||
;; Next are all the integer comparisons, and conditional moves and branches
|
||||
;; and some of the related define_expand's and define_split's.
|
||||
|
@ -2013,6 +2063,70 @@
|
|||
(match_dup 0) (match_dup 1)))]
|
||||
"")
|
||||
|
||||
(define_insn "sminqi3"
|
||||
[(set (match_operand:QI 0 "register_operand" "=r")
|
||||
(smin:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"minsb8 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "uminqi3"
|
||||
[(set (match_operand:QI 0 "register_operand" "=r")
|
||||
(umin:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"minub8 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "smaxqi3"
|
||||
[(set (match_operand:QI 0 "register_operand" "=r")
|
||||
(smax:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"maxsb8 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "umaxqi3"
|
||||
[(set (match_operand:QI 0 "register_operand" "=r")
|
||||
(umax:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:QI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"maxub8 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "sminhi3"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(smin:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"minsw4 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "uminhi3"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(umin:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"minuw4 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "smaxhi3"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(smax:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"maxsw4 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_insn "umaxhi3"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(umax:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ")
|
||||
(match_operand:HI 2 "reg_or_8bit_operand" "rI")))]
|
||||
"TARGET_MAX"
|
||||
"maxuw4 %r1,%2,%0"
|
||||
[(set_attr "type" "shift")])
|
||||
|
||||
(define_expand "smaxdi3"
|
||||
[(set (match_dup 3)
|
||||
(le:DI (match_operand:DI 1 "reg_or_0_operand" "")
|
||||
|
@ -3637,7 +3751,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,f,f,f,m")
|
||||
(match_operand:SI 1 "input_operand" "r,J,I,K,L,m,rJ,f,J,m,fG"))]
|
||||
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS
|
||||
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS && ! TARGET_CIX
|
||||
&& (register_operand (operands[0], SImode)
|
||||
|| reg_or_0_operand (operands[1], SImode))"
|
||||
"@
|
||||
|
@ -3650,16 +3764,38 @@
|
|||
stl %r1,%0
|
||||
cpys %1,%1,%0
|
||||
cpys $f31,$f31,%0
|
||||
lds %0,%1
|
||||
sts %R1,%0"
|
||||
ld%, %0,%1
|
||||
st%, %R1,%0"
|
||||
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ld,st,fcpys,fcpys,ld,st")])
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,m,f,f,f,m,r,f")
|
||||
(match_operand:SI 1 "input_operand" "r,J,I,K,L,m,rJ,f,J,m,fG,f,r"))]
|
||||
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS && TARGET_CIX
|
||||
&& (register_operand (operands[0], SImode)
|
||||
|| reg_or_0_operand (operands[1], SImode))"
|
||||
"@
|
||||
bis %1,%1,%0
|
||||
bis $31,$31,%0
|
||||
bis $31,%1,%0
|
||||
lda %0,%1
|
||||
ldah %0,%h1
|
||||
ldl %0,%1
|
||||
stl %r1,%0
|
||||
cpys %1,%1,%0
|
||||
cpys $f31,$f31,%0
|
||||
ld%, %0,%1
|
||||
st%, %R1,%0
|
||||
ftois %1,%0
|
||||
itof%, %1,%0"
|
||||
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ld,st,fcpys,fcpys,ld,st,ld,st")])
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,r,m,f,f,f,m")
|
||||
(match_operand:SI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,m,fG"))]
|
||||
"(TARGET_WINDOWS_NT || TARGET_OPEN_VMS)
|
||||
&& (register_operand (operands[0], SImode)
|
||||
|| reg_or_0_operand (operands[1], SImode))"
|
||||
&& (register_operand (operands[0], SImode)
|
||||
|| reg_or_0_operand (operands[1], SImode))"
|
||||
"@
|
||||
bis %1,%1,%0
|
||||
bis $31,$31,%0
|
||||
|
@ -3671,14 +3807,14 @@
|
|||
stl %r1,%0
|
||||
cpys %1,%1,%0
|
||||
cpys $f31,$f31,%0
|
||||
lds %0,%1
|
||||
sts %R1,%0"
|
||||
ld%, %0,%1
|
||||
st%, %R1,%0"
|
||||
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ldsym,ld,st,fcpys,fcpys,ld,st")])
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,r,f,f")
|
||||
(match_operand:HI 1 "input_operand" "r,J,I,n,f,J"))]
|
||||
"! TARGET_BYTE_OPS
|
||||
"! TARGET_BWX
|
||||
&& (register_operand (operands[0], HImode)
|
||||
|| register_operand (operands[1], HImode))"
|
||||
"@
|
||||
|
@ -3693,7 +3829,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,r,r,m,f,f")
|
||||
(match_operand:HI 1 "input_operand" "r,J,I,n,m,rJ,f,J"))]
|
||||
"TARGET_BYTE_OPS
|
||||
"TARGET_BWX
|
||||
&& (register_operand (operands[0], HImode)
|
||||
|| reg_or_0_operand (operands[1], HImode))"
|
||||
"@
|
||||
|
@ -3710,7 +3846,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,r,f,f")
|
||||
(match_operand:QI 1 "input_operand" "r,J,I,n,f,J"))]
|
||||
"! TARGET_BYTE_OPS
|
||||
"! TARGET_BWX
|
||||
&& (register_operand (operands[0], QImode)
|
||||
|| register_operand (operands[1], QImode))"
|
||||
"@
|
||||
|
@ -3725,7 +3861,7 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,r,r,m,f,f")
|
||||
(match_operand:QI 1 "input_operand" "r,J,I,n,m,rJ,f,J"))]
|
||||
"TARGET_BYTE_OPS
|
||||
"TARGET_BWX
|
||||
&& (register_operand (operands[0], QImode)
|
||||
|| reg_or_0_operand (operands[1], QImode))"
|
||||
"@
|
||||
|
@ -3785,8 +3921,9 @@
|
|||
(define_insn ""
|
||||
[(set (match_operand:DI 0 "general_operand" "=r,r,r,r,r,r,r,m,f,f,f,Q")
|
||||
(match_operand:DI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,Q,fG"))]
|
||||
"register_operand (operands[0], DImode)
|
||||
|| reg_or_0_operand (operands[1], DImode)"
|
||||
"! TARGET_CIX
|
||||
&& (register_operand (operands[0], DImode)
|
||||
|| reg_or_0_operand (operands[1], DImode))"
|
||||
"@
|
||||
bis %1,%1,%0
|
||||
bis $31,$31,%0
|
||||
|
@ -3802,6 +3939,29 @@
|
|||
stt %R1,%0"
|
||||
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ldsym,ld,st,fcpys,fcpys,ld,st")])
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DI 0 "general_operand" "=r,r,r,r,r,r,r,m,f,f,f,Q,r,f")
|
||||
(match_operand:DI 1 "input_operand" "r,J,I,K,L,s,m,rJ,f,J,Q,fG,f,r"))]
|
||||
"TARGET_CIX
|
||||
&& (register_operand (operands[0], DImode)
|
||||
|| reg_or_0_operand (operands[1], DImode))"
|
||||
"@
|
||||
bis %1,%1,%0
|
||||
bis $31,$31,%0
|
||||
bis $31,%1,%0
|
||||
lda %0,%1
|
||||
ldah %0,%h1
|
||||
lda %0,%1
|
||||
ldq%A1 %0,%1
|
||||
stq%A0 %r1,%0
|
||||
cpys %1,%1,%0
|
||||
cpys $f31,$f31,%0
|
||||
ldt %0,%1
|
||||
stt %R1,%0
|
||||
ftoit %1,%0
|
||||
itoft %1,%0"
|
||||
[(set_attr "type" "ilog,ilog,ilog,iadd,iadd,ldsym,ld,st,fcpys,fcpys,ld,st,ld,st")])
|
||||
|
||||
;; We do three major things here: handle mem->mem, put 64-bit constants in
|
||||
;; memory, and construct long 32-bit constants.
|
||||
|
||||
|
@ -4028,7 +4188,7 @@
|
|||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
if (GET_CODE (operands[0]) == MEM
|
||||
&& ! reg_or_0_operand (operands[1], QImode))
|
||||
|
@ -4152,7 +4312,7 @@
|
|||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
|
||||
if (TARGET_BYTE_OPS)
|
||||
if (TARGET_BWX)
|
||||
{
|
||||
if (GET_CODE (operands[0]) == MEM
|
||||
&& ! reg_or_0_operand (operands[1], HImode))
|
||||
|
@ -4278,7 +4438,7 @@
|
|||
[(parallel [(match_operand:QI 0 "register_operand" "=r")
|
||||
(match_operand:QI 1 "unaligned_memory_operand" "m")
|
||||
(match_operand:TI 2 "register_operand" "=&r")])]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
rtx addr, scratch, seq, tmp;
|
||||
|
@ -4312,7 +4472,7 @@
|
|||
[(parallel [(match_operand:HI 0 "register_operand" "=r")
|
||||
(match_operand:HI 1 "unaligned_memory_operand" "m")
|
||||
(match_operand:TI 2 "register_operand" "=&r")])]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
rtx scratch, seq, tmp, addr;
|
||||
|
@ -4346,7 +4506,7 @@
|
|||
[(parallel [(match_operand:QI 0 "any_memory_operand" "=m")
|
||||
(match_operand:QI 1 "register_operand" "r")
|
||||
(match_operand:TI 2 "register_operand" "=&r")])]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
|
||||
|
@ -4394,7 +4554,7 @@
|
|||
[(parallel [(match_operand:HI 0 "any_memory_operand" "=m")
|
||||
(match_operand:HI 1 "register_operand" "r")
|
||||
(match_operand:TI 2 "register_operand" "=&r")])]
|
||||
"! TARGET_BYTE_OPS"
|
||||
"! TARGET_BWX"
|
||||
"
|
||||
{ extern rtx get_unaligned_address ();
|
||||
|
||||
|
@ -4460,14 +4620,16 @@
|
|||
(define_expand "allocate_stack"
|
||||
[(set (reg:DI 30)
|
||||
(plus:DI (reg:DI 30)
|
||||
(match_operand:DI 0 "reg_or_cint_operand" "")))]
|
||||
(match_operand:DI 1 "reg_or_cint_operand" "")))
|
||||
(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(match_dup 2))]
|
||||
""
|
||||
"
|
||||
{
|
||||
if (GET_CODE (operands[0]) == CONST_INT
|
||||
&& INTVAL (operands[0]) < 32768)
|
||||
if (GET_CODE (operands[1]) == CONST_INT
|
||||
&& INTVAL (operands[1]) < 32768)
|
||||
{
|
||||
if (INTVAL (operands[0]) >= 4096)
|
||||
if (INTVAL (operands[1]) >= 4096)
|
||||
{
|
||||
/* We do this the same way as in the prologue and generate explicit
|
||||
probes. Then we update the stack by the constant. */
|
||||
|
@ -4475,14 +4637,15 @@
|
|||
int probed = 4096;
|
||||
|
||||
emit_insn (gen_probe_stack (GEN_INT (- probed)));
|
||||
while (probed + 8192 < INTVAL (operands[0]))
|
||||
while (probed + 8192 < INTVAL (operands[1]))
|
||||
emit_insn (gen_probe_stack (GEN_INT (- (probed += 8192))));
|
||||
|
||||
if (probed + 4096 < INTVAL (operands[0]))
|
||||
emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[0]))));
|
||||
if (probed + 4096 < INTVAL (operands[1]))
|
||||
emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[1]))));
|
||||
}
|
||||
|
||||
operands[0] = GEN_INT (- INTVAL (operands[0]));
|
||||
operands[1] = GEN_INT (- INTVAL (operands[1]));
|
||||
operands[2] = virtual_stack_dynamic_rtx;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4493,10 +4656,10 @@
|
|||
rtx memref;
|
||||
|
||||
emit_insn (gen_subdi3 (want, stack_pointer_rtx,
|
||||
force_reg (Pmode, operands[0])));
|
||||
force_reg (Pmode, operands[1])));
|
||||
emit_insn (gen_adddi3 (tmp, stack_pointer_rtx, GEN_INT (-4096)));
|
||||
|
||||
if (GET_CODE (operands[0]) != CONST_INT)
|
||||
if (GET_CODE (operands[1]) != CONST_INT)
|
||||
{
|
||||
out_label = gen_label_rtx ();
|
||||
emit_insn (gen_cmpdi (want, tmp));
|
||||
|
@ -4510,6 +4673,9 @@
|
|||
emit_insn (gen_adddi3 (tmp, tmp, GEN_INT(-8192)));
|
||||
emit_insn (gen_cmpdi (tmp, want));
|
||||
emit_jump_insn (gen_bgtu (loop_label));
|
||||
if (obey_regdecls)
|
||||
gen_rtx (USE, VOIDmode, tmp);
|
||||
|
||||
memref = gen_rtx (MEM, DImode, want);
|
||||
MEM_VOLATILE_P (memref) = 1;
|
||||
emit_move_insn (memref, const0_rtx);
|
||||
|
@ -4518,7 +4684,7 @@
|
|||
emit_label (out_label);
|
||||
|
||||
emit_move_insn (stack_pointer_rtx, want);
|
||||
|
||||
emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
|
||||
DONE;
|
||||
}
|
||||
}")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Definitions of target machine for GNU compiler, for Alpha Linux,
|
||||
using ECOFF.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Bob Manson.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -65,7 +65,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
/* Show that we need a GP when profiling. */
|
||||
#define TARGET_PROFILING_NEEDS_GP
|
||||
|
||||
/* We need that too. */
|
||||
/* We support #pragma. */
|
||||
#define HANDLE_SYSV_PRAGMA
|
||||
|
||||
#undef ASM_FINAL_SPEC
|
||||
|
|
|
@ -31,7 +31,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#define WCHAR_TYPE "short unsigned int"
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 16
|
||||
|
||||
/* The .arch pseudo op is not supported. */
|
||||
#undef ARCH_ASM_FILE_START
|
||||
#define ARCH_ASM_FILE_START(FILE)
|
||||
|
|
|
@ -21,8 +21,3 @@ Boston, MA 02111-1307, USA. */
|
|||
/* In OSF 2 or 3, linking with -lprof1 doesn't require -lpdf. */
|
||||
|
||||
#undef LIB_SPEC
|
||||
|
||||
/* The .arch pseudo op is not supported. */
|
||||
#undef ARCH_ASM_FILE_START
|
||||
#define ARCH_ASM_FILE_START(FILE)
|
||||
#define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc"
|
||||
|
|
|
@ -127,19 +127,98 @@ Boston, MA 02111-1307, USA. */
|
|||
if ((TO) == STACK_POINTER_REGNUM) \
|
||||
(OFFSET) += ALPHA_ROUND (current_function_outgoing_args_size); \
|
||||
}
|
||||
|
||||
/* Define a data type for recording info about an argument list
|
||||
during the scan of that argument list. This data type should
|
||||
hold all necessary information about the function itself
|
||||
and about the args processed so far, enough to enable macros
|
||||
such as FUNCTION_ARG to determine where the next arg should go.
|
||||
|
||||
On Alpha/VMS, this is a structure that contains the number of
|
||||
arguments and, for each argument, the datatype of that argument.
|
||||
|
||||
The number of arguments is a number of words of arguments scanned so far.
|
||||
Thus 6 or more means all following args should go on the stack. */
|
||||
|
||||
enum avms_arg_type {I64, FF, FD, FG, FS, FT};
|
||||
typedef struct {char num_args; enum avms_arg_type atypes[6];} avms_arg_info;
|
||||
|
||||
#undef CUMULATIVE_ARGS
|
||||
#define CUMULATIVE_ARGS avms_arg_info
|
||||
|
||||
/* Initialize a variable CUM of type CUMULATIVE_ARGS
|
||||
for a call to a function whose data type is FNTYPE.
|
||||
For a library call, FNTYPE is 0. */
|
||||
|
||||
#undef INIT_CUMULATIVE_ARGS
|
||||
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
|
||||
(CUM).num_args = 0; \
|
||||
(CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64; \
|
||||
(CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;
|
||||
|
||||
/* Update the data in CUM to advance over an argument
|
||||
of mode MODE and data type TYPE.
|
||||
(TYPE is null for libcalls where that information may not be available.) */
|
||||
|
||||
extern enum avms_arg_type alpha_arg_type ();
|
||||
|
||||
/* Determine where to put an argument to a function.
|
||||
Value is zero to push the argument on the stack,
|
||||
or a hard register in which to store the argument.
|
||||
|
||||
MODE is the argument's machine mode (or VOIDmode for no more args).
|
||||
TYPE is the data type of the argument (as a tree).
|
||||
This is null for libcalls where that information may
|
||||
not be available.
|
||||
CUM is a variable of type CUMULATIVE_ARGS which gives info about
|
||||
the preceding args and about the function being called.
|
||||
NAMED is nonzero if this argument is a named parameter
|
||||
(otherwise it is an extra parameter matching an ellipsis).
|
||||
|
||||
On Alpha the first 6 words of args are normally in registers
|
||||
and the rest are pushed. */
|
||||
|
||||
extern struct rtx_def *alpha_arg_info_reg_val ();
|
||||
#undef FUNCTION_ARG
|
||||
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
|
||||
((MODE) == VOIDmode ? alpha_arg_info_reg_val (CUM) \
|
||||
: ((CUM.num_args) < 6 && ! MUST_PASS_IN_STACK (MODE, TYPE) \
|
||||
? gen_rtx(REG, (MODE), \
|
||||
((CUM).num_args + 16 \
|
||||
+ ((TARGET_FPREGS \
|
||||
&& (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \
|
||||
|| GET_MODE_CLASS (MODE) == MODE_FLOAT)) \
|
||||
* 32))) \
|
||||
: 0))
|
||||
|
||||
#undef FUNCTION_ARG_ADVANCE
|
||||
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
|
||||
if (MUST_PASS_IN_STACK (MODE, TYPE)) \
|
||||
(CUM) = (CUM & ~0xff) + 6; \
|
||||
(CUM).num_args += 6; \
|
||||
else \
|
||||
(CUM) += ALPHA_ARG_SIZE (MODE, TYPE, NAMED)
|
||||
{ \
|
||||
if ((CUM).num_args < 6) \
|
||||
(CUM).atypes[(CUM).num_args] = alpha_arg_type (MODE); \
|
||||
\
|
||||
(CUM).num_args += ALPHA_ARG_SIZE (MODE, TYPE, NAMED); \
|
||||
}
|
||||
|
||||
/* For an arg passed partly in registers and partly in memory,
|
||||
this is the number of registers used.
|
||||
For args passed entirely in registers or entirely in memory, zero. */
|
||||
|
||||
#undef FUNCTION_ARG_PARTIAL_NREGS
|
||||
#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
|
||||
((CUM & 0xff) < 6 && 6 < (CUM & 0xff) \
|
||||
((CUM).num_args < 6 && 6 < (CUM).num_args \
|
||||
+ ALPHA_ARG_SIZE (MODE, TYPE, NAMED) \
|
||||
? 6 - (CUM & 0xff) : 0)
|
||||
? 6 - (CUM).num_args : 0)
|
||||
|
||||
#undef ENCODE_SECTION_INFO
|
||||
#define ENCODE_SECTION_INFO(DECL) \
|
||||
do { \
|
||||
if (TREE_CODE (DECL) == FUNCTION_DECL && ! TREE_PUBLIC (DECL)) \
|
||||
SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \
|
||||
} while (0)
|
||||
|
||||
/* Perform any needed actions needed for a function that is receiving a
|
||||
variable number of arguments.
|
||||
|
@ -164,7 +243,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
#undef SETUP_INCOMING_VARARGS
|
||||
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
|
||||
{ if ((CUM) < 6) \
|
||||
{ if ((CUM).num_args < 6) \
|
||||
{ \
|
||||
if (! (NO_RTL)) \
|
||||
{ \
|
||||
|
@ -206,11 +285,11 @@ Boston, MA 02111-1307, USA. */
|
|||
}
|
||||
|
||||
#define LINK_SECTION_ASM_OP ".link"
|
||||
|
||||
#define READONLY_SECTION_ASM_OP ".rdata"
|
||||
#define LITERALS_SECTION_ASM_OP ".literals"
|
||||
|
||||
#undef EXTRA_SECTIONS
|
||||
#define EXTRA_SECTIONS in_link, in_rdata
|
||||
#define EXTRA_SECTIONS in_link, in_rdata, in_literals
|
||||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
|
@ -231,6 +310,15 @@ link_section () \
|
|||
fprintf (asm_out_file, "%s\n", LINK_SECTION_ASM_OP); \
|
||||
in_section = in_link; \
|
||||
} \
|
||||
} \
|
||||
void \
|
||||
literals_section () \
|
||||
{ \
|
||||
if (in_section != in_literals) \
|
||||
{ \
|
||||
fprintf (asm_out_file, "%s\n", LITERALS_SECTION_ASM_OP); \
|
||||
in_section = in_literals; \
|
||||
} \
|
||||
}
|
||||
|
||||
#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
|
@ -245,10 +333,6 @@ link_section () \
|
|||
|
||||
#define ASM_FILE_END(FILE) alpha_write_linkage (FILE);
|
||||
|
||||
#undef FUNCTION_ARG
|
||||
void *function_arg ();
|
||||
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) function_arg (&CUM, MODE, TYPE, NAMED)
|
||||
|
||||
#undef CASE_VECTOR_MODE
|
||||
#define CASE_VECTOR_MODE DImode
|
||||
#undef CASE_VECTOR_PC_RELATIVE
|
||||
|
@ -273,46 +357,101 @@ void *function_arg ();
|
|||
{ \
|
||||
fprintf (FILE, "\t.quad 0\n"); \
|
||||
fprintf (FILE, "\t.linkage __tramp\n"); \
|
||||
fprintf (FILE, "\t.quad 0\n"); \
|
||||
}
|
||||
|
||||
/* Length in units of the trampoline for entering a nested function. */
|
||||
|
||||
#undef TRAMPOLINE_SIZE
|
||||
#define TRAMPOLINE_SIZE 24
|
||||
#define TRAMPOLINE_SIZE 32
|
||||
|
||||
/* Emit RTL insns to initialize the variable parts of a trampoline.
|
||||
FNADDR is an RTX for the address of the function's pure code.
|
||||
CXT is an RTX for the static chain value for the function. */
|
||||
|
||||
#undef INITIALIZE_TRAMPOLINE
|
||||
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
|
||||
{ \
|
||||
emit_move_insn (gen_rtx (MEM, Pmode, (TRAMP)), (FNADDR)); \
|
||||
emit_move_insn (gen_rtx (MEM, Pmode, \
|
||||
memory_address (Pmode, \
|
||||
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
|
||||
{ \
|
||||
emit_move_insn (gen_rtx (MEM, Pmode, \
|
||||
memory_address (Pmode, \
|
||||
plus_constant ((TRAMP), 16))), \
|
||||
(CXT)); \
|
||||
(FNADDR)); \
|
||||
emit_move_insn (gen_rtx (MEM, Pmode, \
|
||||
memory_address (Pmode, \
|
||||
plus_constant ((TRAMP), 24))), \
|
||||
(CXT)); \
|
||||
}
|
||||
|
||||
#undef TRANSFER_FROM_TRAMPOLINE
|
||||
|
||||
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \
|
||||
(vms_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS))
|
||||
extern int vms_valid_decl_attribute_p ();
|
||||
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
#undef MIPS_DEBUGGING_INFO
|
||||
|
||||
#ifndef DBX_DEBUGGING_INFO
|
||||
#define DBX_DEBUGGING_INFO
|
||||
#endif
|
||||
#undef DBX_DEBUGGING_INFO
|
||||
|
||||
#define DWARF2_DEBUGGING_INFO
|
||||
|
||||
#ifdef PREFERRED_DEBUGGING_TYPE
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#endif
|
||||
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
/* This is how to output an assembler line
|
||||
that says to advance the location counter
|
||||
to a multiple of 2**LOG bytes. */
|
||||
|
||||
#undef ASM_OUTPUT_ALIGN
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
fprintf (FILE, "\t.align %d\n", LOG);
|
||||
|
||||
#define UNALIGNED_SHORT_ASM_OP ".word"
|
||||
#define UNALIGNED_INT_ASM_OP ".long"
|
||||
#define UNALIGNED_DOUBLE_INT_ASM_OP ".quad"
|
||||
|
||||
#undef ASM_OUTPUT_ALIGNED_COMMON
|
||||
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
|
||||
do { \
|
||||
fprintf ((FILE), "\t.comm\t"); \
|
||||
assemble_name ((FILE), (NAME)); \
|
||||
fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
|
||||
} while (0)
|
||||
|
||||
#define ASM_OUTPUT_SECTION(FILE,SECTION) \
|
||||
(strcmp (SECTION, ".text") == 0) \
|
||||
? text_section () \
|
||||
: named_section (NULL_TREE, SECTION, 0), \
|
||||
ASM_OUTPUT_ALIGN (FILE, 0) \
|
||||
|
||||
#define ASM_OUTPUT_SECTION_NAME(FILE,DECL,NAME,RELOC) \
|
||||
do \
|
||||
{ \
|
||||
char *flags; \
|
||||
int ovr = 0; \
|
||||
if (DECL && DECL_MACHINE_ATTRIBUTES (DECL) \
|
||||
&& lookup_attribute \
|
||||
("overlaid", DECL_MACHINE_ATTRIBUTES (DECL))) \
|
||||
flags = ",OVR", ovr = 1; \
|
||||
else if (strncmp (NAME,".debug", 6) == 0) \
|
||||
flags = ",NOWRT"; \
|
||||
else \
|
||||
flags = ""; \
|
||||
fputc ('\n', (FILE)); \
|
||||
fprintf (FILE, ".section\t%s%s\n", NAME, flags); \
|
||||
if (ovr) \
|
||||
(NAME) = ""; \
|
||||
} while (0)
|
||||
|
||||
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
|
||||
do { literals_section(); \
|
||||
fprintf ((FILE), "\t"); \
|
||||
assemble_name (FILE, LABEL1); \
|
||||
fprintf (FILE, " = "); \
|
||||
assemble_name (FILE, LABEL2); \
|
||||
fprintf (FILE, "\n"); \
|
||||
} while (0)
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
|
||||
#ifdef ASM_FORMAT_PRIVATE_NAME
|
||||
#undef ASM_FORMAT_PRIVATE_NAME
|
||||
#endif
|
||||
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
|
||||
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \
|
||||
sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
|
||||
|
@ -322,9 +461,6 @@ void *function_arg ();
|
|||
|
||||
#undef ASM_FINAL_SPEC
|
||||
|
||||
#undef LIBGCC_SPEC
|
||||
#define LIBGCC_SPEC "-lgcc2 -lgcclib"
|
||||
|
||||
#define OPTIMIZATION_OPTIONS \
|
||||
{ \
|
||||
write_symbols = PREFERRED_DEBUGGING_TYPE; \
|
||||
|
@ -340,13 +476,9 @@ void *function_arg ();
|
|||
}
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{g3:-g3} %{g0:-g0}"
|
||||
#define LINK_SPEC "%{g3:-g3} %{g0:-g0} %{shared:-shared} %{v:-v}"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC ""
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "gnu:[000000]crt0.obj"
|
||||
|
||||
/* Define the names of the division and modulus functions. */
|
||||
#define DIVSI3_LIBCALL "OTS$DIV_I"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Subroutines used for code generation on the ARC cpu.
|
||||
/* Subroutines used for code generation on the Argonaut ARC cpu.
|
||||
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Definitions of target machine for GNU compiler, for the ARC cpu.
|
||||
/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
|
||||
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
|
|||
- print active compiler options in assembler output
|
||||
*/
|
||||
|
||||
/* FIXME: Create elf.h and have svr4.h include it. */
|
||||
/* ??? Create elf.h and have svr4.h include it. */
|
||||
#include "svr4.h"
|
||||
|
||||
#undef ASM_SPEC
|
||||
|
@ -589,7 +589,7 @@ extern enum reg_class arc_regno_reg_class[];
|
|||
If you don't define this macro, the default is to return the value
|
||||
of FRAMEADDR--that is, the stack frame address is also the address
|
||||
of the stack word that points to the previous frame. */
|
||||
/* FIXME: unfinished */
|
||||
/* ??? unfinished */
|
||||
/*define DYNAMIC_CHAIN_ADDRESS (FRAMEADDR)*/
|
||||
|
||||
/* A C expression whose value is RTL representing the value of the
|
||||
|
@ -989,7 +989,7 @@ do { \
|
|||
|
||||
/* local to this file */
|
||||
#define RTX_OK_FOR_INDEX_P(X) \
|
||||
(0 && /*FIXME*/ REG_P (X) && REG_OK_FOR_INDEX_P (X))
|
||||
(0 && /*???*/ REG_P (X) && REG_OK_FOR_INDEX_P (X))
|
||||
|
||||
/* local to this file */
|
||||
/* ??? Loads can handle any constant, stores can only handle small ones. */
|
||||
|
@ -1060,7 +1060,7 @@ arc_select_cc_mode (OP, X, Y)
|
|||
|
||||
/* Return non-zero if SELECT_CC_MODE will never return MODE for a
|
||||
floating point inequality comparison. */
|
||||
#define REVERSIBLE_CC_MODE(MODE) 1 /*FIXME*/
|
||||
#define REVERSIBLE_CC_MODE(MODE) 1 /*???*/
|
||||
|
||||
/* Costs. */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; Machine description of the ARC cpu for GNU C compiler
|
||||
;; Machine description of the Argonaut ARC cpu for GNU C compiler
|
||||
;; Copyright (C) 1994, 1997 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU CC.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Definitions of target machine for GNU compiler for Intel 80386
|
||||
running FreeBSD.
|
||||
Copyright (C) 1988, 1992, 1994, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Poul-Henning Kamp <phk@login.dkuug.dk>
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -229,9 +229,9 @@ do { \
|
|||
#ifdef FREEBSD_NATIVE
|
||||
|
||||
#define INCLUDE_DEFAULTS { \
|
||||
{ "/usr/include", 0 }, \
|
||||
{ "/usr/include/g++", 1 }, \
|
||||
{ 0, 0} \
|
||||
{ "/usr/include", 0, 0, 0 }, \
|
||||
{ "/usr/include/g++", "G++", 1, 1 }, \
|
||||
{ 0, 0, 0, 0} \
|
||||
}
|
||||
|
||||
#undef MD_EXEC_PREFIX
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2626,7 +2626,6 @@ extern char *qi_high_reg_name[];
|
|||
we can use for operand syntax in the extended asm */
|
||||
|
||||
#define ASM_OPERAND_LETTER '#'
|
||||
|
||||
#define RET return ""
|
||||
#define AT_SP(mode) (gen_rtx (MEM, (mode), stack_pointer_rtx))
|
||||
|
||||
|
|
|
@ -6530,7 +6530,7 @@ byte_xor_operation:
|
|||
}
|
||||
else
|
||||
{
|
||||
sprintf (buffer, \"addl %s+[.-.L%d],%%0\", XSTR (operands[1], 0), INTVAL (operands[2]));
|
||||
sprintf (buffer, \"addl %s+[.-%%P2],%%0\", XSTR (operands[1], 0));
|
||||
output_asm_insn (buffer, operands);
|
||||
}
|
||||
RET;
|
||||
|
@ -6547,7 +6547,7 @@ byte_xor_operation:
|
|||
output_asm_insn (AS1 (call,%P1), operands);
|
||||
if (! TARGET_DEEP_BRANCH_PREDICTION)
|
||||
{
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", INTVAL (operands[1]));
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[1]));
|
||||
}
|
||||
RET;
|
||||
}")
|
||||
|
@ -6615,8 +6615,8 @@ byte_xor_operation:
|
|||
operands[5] = addr0;
|
||||
operands[6] = addr1;
|
||||
|
||||
operands[0] = gen_rtx (MEM, BLKmode, addr0);
|
||||
operands[1] = gen_rtx (MEM, BLKmode, addr1);
|
||||
operands[0] = change_address (operands[0], VOIDmode, addr0);
|
||||
operands[1] = change_address (operands[1], VOIDmode, addr1);
|
||||
}")
|
||||
|
||||
;; It might seem that operands 0 & 1 could use predicate register_operand.
|
||||
|
@ -7656,20 +7656,31 @@ byte_xor_operation:
|
|||
"* return AS1(call,__alloca);")
|
||||
|
||||
(define_expand "allocate_stack"
|
||||
[(set (reg:SI 7)
|
||||
(minus:SI (reg:SI 7) (match_operand:SI 0 "general_operand" "")))]
|
||||
"TARGET_STACK_PROBE"
|
||||
[(set (match_operand:SI 0 "register_operand" "=r")
|
||||
(minus:SI (reg:SI 7) (match_operand:SI 1 "general_operand" "")))
|
||||
(set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 1)))]
|
||||
"TARGET_STACK_PROBE"
|
||||
"
|
||||
{
|
||||
#ifdef CHECK_STACK_LIMIT
|
||||
if (GET_CODE (operands[0]) == CONST_INT
|
||||
&& INTVAL (operands[0]) < CHECK_STACK_LIMIT)
|
||||
if (GET_CODE (operands[1]) == CONST_INT
|
||||
&& INTVAL (operands[1]) < CHECK_STACK_LIMIT)
|
||||
emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx,
|
||||
operands[0]));
|
||||
operands[1]));
|
||||
else
|
||||
#endif
|
||||
emit_insn (gen_allocate_stack_worker (copy_to_mode_reg (SImode,
|
||||
operands[0])));
|
||||
operands[1])));
|
||||
|
||||
emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_expand "nonlocal_goto_receiver"
|
||||
[(const_int 0)]
|
||||
"flag_pic"
|
||||
"
|
||||
{
|
||||
load_pic_register (1);
|
||||
DONE;
|
||||
}")
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* Definitions for rtems targetting an Intel i386 using coff.
|
||||
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -27,5 +26,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Di386 -Drtems -D__rtems__ \
|
||||
-Asystem(rtems) -Acpu(i386) -Amachine(i386)"
|
||||
|
||||
/* end of i386/rtems.h */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions for Intel 386 running SCO Unix System V 3.2 Version 5.
|
||||
Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Kean Johnston (hug@netcom.com)
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
|
|
@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#define LINK_SPEC \
|
||||
"%{mka:-AKA}%{mkb:-AKB}%{msa:-ASA}%{msb:-ASB}\
|
||||
%{mmc:-AMC}%{mca:-ACA}%{mcc:-ACC}%{mcf:-ACF}\
|
||||
%{mja:-AJX}%{mjd:-AJX}%{mjf:-AJX}%{mrp:-AJX}\
|
||||
%{mja:-AJX}%{mjd:-AJX}%{mjf:-AJX}%{mrp:-AJX}\
|
||||
%{mbout:-Fbout}%{mcoff:-Fcoff}\
|
||||
%{mlink-relax:-relax}"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* Definitions for rtems targetting an Intel i960.
|
||||
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -27,5 +26,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -Drtems -D__rtems__ \
|
||||
-Asystem(rtems) -Acpu(i960) -Amachine(i960)"
|
||||
|
||||
/* end of i960/rtems.h */
|
||||
|
|
|
@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
|
||||
/* Some output-actions in m68k.md need these. */
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
@ -3049,7 +3049,11 @@ print_operand_address (file, addr)
|
|||
{
|
||||
output_addr_const (file, addr);
|
||||
if (flag_pic && (breg == pic_offset_table_rtx))
|
||||
fprintf (file, "@GOT");
|
||||
{
|
||||
fprintf (file, "@GOT");
|
||||
if (flag_pic == 1)
|
||||
fprintf (file, ".w");
|
||||
}
|
||||
}
|
||||
fprintf (file, "(%s", reg_names[REGNO (breg)]);
|
||||
if (ireg != 0)
|
||||
|
|
|
@ -5813,28 +5813,34 @@
|
|||
else
|
||||
operands[3] = adj_offsettable_operand (operands[0], 4);
|
||||
if (! ADDRESS_REG_P (operands[0]))
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jbeq %l1\";
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jbeq %l1\";
|
||||
#else
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jeq %l1\";
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jeq %l1\";
|
||||
#endif
|
||||
}
|
||||
operands[4] = gen_label_rtx();
|
||||
if (TARGET_68020 || TARGET_5200)
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
output_asm_insn (\"tst%.l %0\;jbne %l4\;tst%.l %3\;jbeq %l1\", operands);
|
||||
output_asm_insn (\"tst%.l %0\;jbne %l4\;tst%.l %3\;jbeq %l1\", operands);
|
||||
#else
|
||||
output_asm_insn (\"tst%.l %0\;jne %l4\;tst%.l %3\;jeq %l1\", operands);
|
||||
output_asm_insn (\"tst%.l %0\;jne %l4\;tst%.l %3\;jeq %l1\", operands);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
#ifdef SGS_CMP_ORDER
|
||||
output_asm_insn (\"cmp%.w %0,%#0\;jbne %l4\;cmp%.w %3,%#0\;jbeq %l1\", operands);
|
||||
output_asm_insn (\"cmp%.w %0,%#0\;jbne %l4\;cmp%.w %3,%#0\;jbeq %l1\", operands);
|
||||
#else
|
||||
output_asm_insn (\"cmp%.w %#0,%0\;jbne %l4\;cmp%.w %#0,%3\;jbeq %l1\", operands);
|
||||
output_asm_insn (\"cmp%.w %#0,%0\;jbne %l4\;cmp%.w %#0,%3\;jbeq %l1\", operands);
|
||||
#endif
|
||||
#else
|
||||
output_asm_insn (\"cmp%.w %#0,%0\;jne %l4\;cmp%.w %#0,%3\;jeq %l1\", operands);
|
||||
output_asm_insn (\"cmp%.w %#0,%0\;jne %l4\;cmp%.w %#0,%3\;jeq %l1\", operands);
|
||||
#endif
|
||||
}
|
||||
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
|
||||
CODE_LABEL_NUMBER (operands[4]));
|
||||
return \"\";
|
||||
|
@ -5868,27 +5874,33 @@
|
|||
else
|
||||
operands[3] = adj_offsettable_operand (operands[0], 4);
|
||||
if (!ADDRESS_REG_P (operands[0]))
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jbne %l1\";
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jbne %l1\";
|
||||
#else
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jne %l1\";
|
||||
return \"move%.l %0,%2\;or%.l %3,%2\;jne %l1\";
|
||||
#endif
|
||||
}
|
||||
if (TARGET_68020 || TARGET_5200)
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
return \"tst%.l %0\;jbne %l1\;tst%.l %3\;jbne %l1\";
|
||||
return \"tst%.l %0\;jbne %l1\;tst%.l %3\;jbne %l1\";
|
||||
#else
|
||||
return \"tst%.l %0\;jne %l1\;tst%.l %3\;jne %l1\";
|
||||
return \"tst%.l %0\;jne %l1\;tst%.l %3\;jne %l1\";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
#ifdef SGS_CMP_ORDER
|
||||
return \"cmp%.w %0,%#0\;jbne %l1\;cmp%.w %3,%#0\;jbne %l1\";
|
||||
return \"cmp%.w %0,%#0\;jbne %l1\;cmp%.w %3,%#0\;jbne %l1\";
|
||||
#else
|
||||
return \"cmp%.w %#0,%0\;jbne %l1\;cmp%.w %#0,%3\;jbne %l1\";
|
||||
return \"cmp%.w %#0,%0\;jbne %l1\;cmp%.w %#0,%3\;jbne %l1\";
|
||||
#endif
|
||||
#else
|
||||
return \"cmp%.w %#0,%0\;jne %l1\;cmp%.w %#0,%3\;jne %l1\";
|
||||
return \"cmp%.w %#0,%0\;jne %l1\;cmp%.w %#0,%3\;jne %l1\";
|
||||
#endif
|
||||
}
|
||||
} ")
|
||||
|
||||
(define_insn "bge0_di"
|
||||
|
@ -5927,17 +5939,19 @@
|
|||
if (TARGET_68020 || TARGET_5200 || ! ADDRESS_REG_P (operands[0]))
|
||||
output_asm_insn(\"tst%.l %0\", operands);
|
||||
else
|
||||
/* On an address reg, cmpw may replace cmpl. */
|
||||
{
|
||||
/* On an address reg, cmpw may replace cmpl. */
|
||||
#ifdef SGS_CMP_ORDER
|
||||
output_asm_insn(\"cmp%.w %0,%#0\", operands);
|
||||
output_asm_insn(\"cmp%.w %0,%#0\", operands);
|
||||
#else
|
||||
output_asm_insn(\"cmp%.w %#0,%0\", operands);
|
||||
output_asm_insn(\"cmp%.w %#0,%0\", operands);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOTOROLA
|
||||
return \"jbpl %l1\";
|
||||
return \"jbpl %l1\";
|
||||
#else
|
||||
return \"jpl %l1\";
|
||||
return \"jpl %l1\";
|
||||
#endif
|
||||
} ")
|
||||
|
||||
|
@ -5977,12 +5991,14 @@
|
|||
if (TARGET_68020 || TARGET_5200 || ! ADDRESS_REG_P (operands[0]))
|
||||
output_asm_insn(\"tst%.l %0\", operands);
|
||||
else
|
||||
/* On an address reg, cmpw may replace cmpl. */
|
||||
{
|
||||
/* On an address reg, cmpw may replace cmpl. */
|
||||
#ifdef SGS_CMP_ORDER
|
||||
output_asm_insn(\"cmp%.w %0,%#0\", operands);
|
||||
output_asm_insn(\"cmp%.w %0,%#0\", operands);
|
||||
#else
|
||||
output_asm_insn(\"cmp%.w %#0,%0\", operands);
|
||||
output_asm_insn(\"cmp%.w %#0,%0\", operands);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOTOROLA
|
||||
return \"jbmi %l1\";
|
||||
|
@ -6732,21 +6748,23 @@
|
|||
"*
|
||||
if (GET_CODE (operands[1]) == MEM
|
||||
&& GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
#ifdef HPUX_ASM
|
||||
return \"bsr.l %1\";
|
||||
return \"bsr.l %1\";
|
||||
#else
|
||||
#ifdef USE_GAS
|
||||
return \"bsr.l %1@PLTPC\";
|
||||
return \"bsr.l %1@PLTPC\";
|
||||
#else
|
||||
return \"bsr %1@PLTPC\";
|
||||
return \"bsr %1@PLTPC\";
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
/* The ',a1' is a dummy argument telling the Sun assembler we want PIC
|
||||
GAS just plain ignores it. */
|
||||
return \"jbsr %1,a1\";
|
||||
/* The ',a1' is a dummy argument telling the Sun assembler we want PIC
|
||||
GAS just plain ignores it. */
|
||||
return \"jbsr %1,a1\";
|
||||
#endif
|
||||
}
|
||||
return \"jsr %1\";
|
||||
")
|
||||
|
||||
|
@ -6971,11 +6989,13 @@
|
|||
if (TARGET_68040)
|
||||
output_asm_insn (\"add%.w %1,%0\", xoperands);
|
||||
else
|
||||
{
|
||||
#ifdef MOTOROLA
|
||||
output_asm_insn (\"lea (%c1,%0),%0\", xoperands);
|
||||
output_asm_insn (\"lea (%c1,%0),%0\", xoperands);
|
||||
#else
|
||||
output_asm_insn (\"lea %0@(%c1),%0\", xoperands);
|
||||
output_asm_insn (\"lea %0@(%c1),%0\", xoperands);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
output_asm_insn (\"add%.l %1,%0\", xoperands);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions for rtems targetting a Motorola m68k using coff.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -26,5 +26,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dmc68000 -Drtems -D__rtems__ \
|
||||
-Asystem(rtems) -Acpu(mc68000) -Acpu(m68k) -Amachine(m68k)"
|
||||
|
||||
/* end of m68k/rtems.h */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Definitions of target machine for GNU compiler.
|
||||
Motorola m88100 running the Dolphin UNIX System V/88 Release 3.2,
|
||||
Version 3.8/7.83 and 3.6/5.86
|
||||
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
|
|
|
@ -20,13 +20,14 @@ 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. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "assert.h"
|
||||
#include "config.h"
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Definitions of target machine for GNU compiler.
|
||||
Motorola m88100 running the AT&T/Unisoft/Motorola V.3 reference port.
|
||||
Copyright (C) 1990, 1991 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1991, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ray Essick (ressick@mot.com)
|
||||
Enhanced by Tom Wood (Tom_Wood@NeXT.com)
|
||||
|
||||
|
|
|
@ -30,9 +30,8 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "mips/iris5.h"
|
||||
#include "mips/abi64.h"
|
||||
|
||||
/* For Irix 6, -mips3 implies TARGET_LONG64. */
|
||||
#undef TARGET_LONG64
|
||||
#define TARGET_LONG64 (mips_abi == ABI_64)
|
||||
/* For Irix 6, -mabi=64 implies TARGET_LONG64. */
|
||||
/* This is handled in override_options. */
|
||||
|
||||
#undef SUBTARGET_CC1_SPEC
|
||||
#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
|
||||
|
@ -500,18 +499,18 @@ do { \
|
|||
%{!pg:%{p:/usr/lib32/mips3/nonshared/mcrt1.o%s \
|
||||
/usr/lib32/mips3/nonshared/libprof1.a%s} \
|
||||
%{!p:/usr/lib32/mips3/nonshared/crt1.o%s}}}}}} \
|
||||
%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
|
||||
crtbegin.o%s"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
"%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
|
||||
-L/usr/lib32} \
|
||||
%{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
|
||||
-L/usr/lib64} \
|
||||
%{!mabi*: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
|
||||
-L/usr/lib32} \
|
||||
crtbegin.o%s"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "\
|
||||
%{!shared: \
|
||||
-dont_warn_unused %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc -warn_unused}"
|
||||
%{!shared: \
|
||||
-dont_warn_unused %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc -warn_unused}"
|
||||
|
||||
/* Avoid getting two warnings for libgcc.a everytime we link. */
|
||||
#undef LIBGCC_SPEC
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Subroutines for insn-output.c for MIPS
|
||||
Copyright (C) 1989, 90, 91, 93-95, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 90, 91, 93-96, 1997 Free Software Foundation, Inc.
|
||||
Contributed by A. Lichnewsky, lich@inria.inria.fr.
|
||||
Changes by Michael Meissner, meissner@osf.org.
|
||||
64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
|
||||
|
@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA. */
|
|||
be replaced with something better designed. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
@ -42,7 +45,6 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef MAX /* sys/param.h may also define these */
|
||||
#undef MIN
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/file.h>
|
||||
|
@ -3208,6 +3210,8 @@ function_arg (cum, mode, type, named)
|
|||
% BITS_PER_WORD == 0))
|
||||
break;
|
||||
|
||||
/* If the whole struct fits a DFmode register,
|
||||
we don't need the PARALLEL. */
|
||||
if (! field || mode == DFmode)
|
||||
ret = gen_rtx (REG, mode, regbase + *arg_words + bias);
|
||||
else
|
||||
|
@ -3222,11 +3226,6 @@ function_arg (cum, mode, type, named)
|
|||
/* ??? If this is a packed structure, then the last hunk won't
|
||||
be 64 bits. */
|
||||
|
||||
/* ??? If this is a structure with a single double field,
|
||||
it would be more convenient to return (REG:DI %fX) than
|
||||
a parallel. However, we would have to modify the mips
|
||||
backend to allow DImode values in fp registers. */
|
||||
|
||||
chunks = TREE_INT_CST_LOW (TYPE_SIZE (type)) / BITS_PER_WORD;
|
||||
if (chunks + *arg_words + bias > MAX_ARGS_IN_REGISTERS)
|
||||
chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias;
|
||||
|
@ -3479,8 +3478,10 @@ override_options ()
|
|||
if (mips_abi == ABI_32)
|
||||
target_flags &= ~ (MASK_FLOAT64|MASK_64BIT);
|
||||
|
||||
/* In the EABI in 64 bit mode, longs and pointers are 64 bits. */
|
||||
if (mips_abi == ABI_EABI && TARGET_64BIT)
|
||||
/* In the EABI in 64 bit mode, longs and pointers are 64 bits. Likewise
|
||||
for the SGI Irix6 N64 ABI. */
|
||||
if ((mips_abi == ABI_EABI && TARGET_64BIT)
|
||||
|| mips_abi == ABI_64)
|
||||
target_flags |= MASK_LONG64;
|
||||
|
||||
/* ??? This doesn't work yet, so don't let people try to use it. */
|
||||
|
@ -3555,6 +3556,8 @@ override_options ()
|
|||
case '3':
|
||||
if (!strcmp (p, "3000") || !strcmp (p, "3k") || !strcmp (p, "3K"))
|
||||
mips_cpu = PROCESSOR_R3000;
|
||||
else if (!strcmp (p, "3900"))
|
||||
mips_cpu = PROCESSOR_R3900;
|
||||
break;
|
||||
|
||||
case '4':
|
||||
|
@ -5212,29 +5215,35 @@ function_prologue (file, size)
|
|||
exactly matches the name used in ASM_DECLARE_FUNCTION_NAME. */
|
||||
fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
|
||||
|
||||
fputs ("\t.ent\t", file);
|
||||
assemble_name (file, fnname);
|
||||
fputs ("\n", file);
|
||||
if (!flag_inhibit_size_directive)
|
||||
{
|
||||
fputs ("\t.ent\t", file);
|
||||
assemble_name (file, fnname);
|
||||
fputs ("\n", file);
|
||||
}
|
||||
|
||||
assemble_name (file, fnname);
|
||||
fputs (":\n", file);
|
||||
#endif
|
||||
|
||||
fprintf (file, "\t.frame\t%s,%d,%s\t\t# vars= %d, regs= %d/%d, args= %d, extra= %d\n",
|
||||
reg_names[ (frame_pointer_needed) ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM ],
|
||||
tsize,
|
||||
reg_names[31 + GP_REG_FIRST],
|
||||
current_frame_info.var_size,
|
||||
current_frame_info.num_gp,
|
||||
current_frame_info.num_fp,
|
||||
current_function_outgoing_args_size,
|
||||
current_frame_info.extra_size);
|
||||
if (!flag_inhibit_size_directive)
|
||||
{
|
||||
fprintf (file, "\t.frame\t%s,%d,%s\t\t# vars= %d, regs= %d/%d, args= %d, extra= %d\n",
|
||||
reg_names[ (frame_pointer_needed) ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM ],
|
||||
tsize,
|
||||
reg_names[31 + GP_REG_FIRST],
|
||||
current_frame_info.var_size,
|
||||
current_frame_info.num_gp,
|
||||
current_frame_info.num_fp,
|
||||
current_function_outgoing_args_size,
|
||||
current_frame_info.extra_size);
|
||||
|
||||
fprintf (file, "\t.mask\t0x%08lx,%d\n\t.fmask\t0x%08lx,%d\n",
|
||||
current_frame_info.mask,
|
||||
current_frame_info.gp_save_offset,
|
||||
current_frame_info.fmask,
|
||||
current_frame_info.fp_save_offset);
|
||||
fprintf (file, "\t.mask\t0x%08lx,%d\n\t.fmask\t0x%08lx,%d\n",
|
||||
current_frame_info.mask,
|
||||
current_frame_info.gp_save_offset,
|
||||
current_frame_info.fmask,
|
||||
current_frame_info.fp_save_offset);
|
||||
}
|
||||
|
||||
if (TARGET_ABICALLS && mips_abi == ABI_32)
|
||||
{
|
||||
|
@ -5478,9 +5487,12 @@ function_epilogue (file, size)
|
|||
exactly matches the name used in ASM_DECLARE_FUNCTION_NAME. */
|
||||
fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
|
||||
|
||||
fputs ("\t.end\t", file);
|
||||
assemble_name (file, fnname);
|
||||
fputs ("\n", file);
|
||||
if (!flag_inhibit_size_directive)
|
||||
{
|
||||
fputs ("\t.end\t", file);
|
||||
assemble_name (file, fnname);
|
||||
fputs ("\n", file);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (TARGET_STATS)
|
||||
|
|
|
@ -28,11 +28,8 @@ Boston, MA 02111-1307, USA. */
|
|||
extern char *asm_file_name;
|
||||
extern char call_used_regs[];
|
||||
extern int current_function_calls_alloca;
|
||||
extern int flag_omit_frame_pointer;
|
||||
extern int frame_pointer_needed;
|
||||
extern char *language_string;
|
||||
extern int may_call_alloca;
|
||||
extern int optimize;
|
||||
extern char **save_argv;
|
||||
extern int target_flags;
|
||||
extern char *version_string;
|
||||
|
@ -64,6 +61,7 @@ enum delay_type {
|
|||
enum processor_type {
|
||||
PROCESSOR_DEFAULT,
|
||||
PROCESSOR_R3000,
|
||||
PROCESSOR_R3900,
|
||||
PROCESSOR_R6000,
|
||||
PROCESSOR_R4000,
|
||||
PROCESSOR_R4100,
|
||||
|
@ -276,6 +274,7 @@ extern void text_section ();
|
|||
#define MASK_SINGLE_FLOAT 0x00020000 /* Only single precision FPU. */
|
||||
#define MASK_MAD 0x00040000 /* Generate mad/madu as on 4650. */
|
||||
#define MASK_4300_MUL_FIX 0x00080000 /* Work-around early Vr4300 CPU bug */
|
||||
#define MASK_MIPS3900 0x00100000 /* like -mips1 only 3900 */
|
||||
|
||||
/* Dummy switches used only in spec's*/
|
||||
#define MASK_MIPS_TFILE 0x00000000 /* flag for mips-tfile usage */
|
||||
|
@ -291,7 +290,6 @@ extern void text_section ();
|
|||
#define MASK_DEBUG_G 0x00800000 /* don't support 64 bit arithmetic */
|
||||
#define MASK_DEBUG_H 0x00400000 /* allow ints in FP registers */
|
||||
#define MASK_DEBUG_I 0x00200000 /* unused */
|
||||
#define MASK_DEBUG_J 0x00100000 /* unused */
|
||||
|
||||
/* r4000 64 bit sizes */
|
||||
#define TARGET_INT64 (target_flags & MASK_INT64)
|
||||
|
@ -302,6 +300,9 @@ extern void text_section ();
|
|||
/* Mips vs. GNU linker */
|
||||
#define TARGET_SPLIT_ADDRESSES (target_flags & MASK_SPLIT_ADDR)
|
||||
|
||||
/* generate mips 3900 insns */
|
||||
#define TARGET_MIPS3900 (target_flags & MASK_MIPS3900)
|
||||
|
||||
/* Mips vs. GNU assembler */
|
||||
#define TARGET_GAS (target_flags & MASK_GAS)
|
||||
#define TARGET_UNIX_ASM (!TARGET_GAS)
|
||||
|
@ -318,7 +319,6 @@ extern void text_section ();
|
|||
#define TARGET_DEBUG_G_MODE (target_flags & MASK_DEBUG_G)
|
||||
#define TARGET_DEBUG_H_MODE (target_flags & MASK_DEBUG_H)
|
||||
#define TARGET_DEBUG_I_MODE (target_flags & MASK_DEBUG_I)
|
||||
#define TARGET_DEBUG_J_MODE (target_flags & MASK_DEBUG_J)
|
||||
|
||||
/* Reg. Naming in .s ($21 vs. $a0) */
|
||||
#define TARGET_NAME_REGS (target_flags & MASK_NAME_REGS)
|
||||
|
@ -425,6 +425,7 @@ extern void text_section ();
|
|||
{"fix4300", MASK_4300_MUL_FIX}, \
|
||||
{"no-fix4300", -MASK_4300_MUL_FIX}, \
|
||||
{"4650", MASK_MAD | MASK_SINGLE_FLOAT}, \
|
||||
{"3900", MASK_MIPS3900}, \
|
||||
{"debug", MASK_DEBUG}, \
|
||||
{"debuga", MASK_DEBUG_A}, \
|
||||
{"debugb", MASK_DEBUG_B}, \
|
||||
|
@ -435,7 +436,6 @@ extern void text_section ();
|
|||
{"debugg", MASK_DEBUG_G}, \
|
||||
{"debugh", MASK_DEBUG_H}, \
|
||||
{"debugi", MASK_DEBUG_I}, \
|
||||
{"debugj", MASK_DEBUG_J}, \
|
||||
{"", (TARGET_DEFAULT \
|
||||
| TARGET_CPU_DEFAULT \
|
||||
| TARGET_ENDIAN_DEFAULT)} \
|
||||
|
@ -507,10 +507,16 @@ extern void text_section ();
|
|||
/* This is meant to be redefined in the host dependent files. */
|
||||
#define SUBTARGET_TARGET_OPTIONS
|
||||
|
||||
#define GENERATE_BRANCHLIKELY (TARGET_MIPS3900 || (mips_isa >= 2))
|
||||
#define GENERATE_MULT3 (TARGET_MIPS3900)
|
||||
#define GENERATE_MADD (TARGET_MIPS3900)
|
||||
|
||||
|
||||
|
||||
/* Macros to decide whether certain features are available or not,
|
||||
depending on the instruction set architecture level. */
|
||||
|
||||
#define BRANCH_LIKELY_P() (mips_isa >= 2)
|
||||
#define BRANCH_LIKELY_P() GENERATE_BRANCHLIKELY
|
||||
#define HAVE_SQRT_P() (mips_isa >= 2)
|
||||
|
||||
/* CC1_SPEC causes -mips3 and -mips4 to set -mfp64 and -mgp64; -mips1 or
|
||||
|
@ -664,7 +670,7 @@ while (0)
|
|||
/* GAS_ASM_SPEC is passed when using gas, rather than the MIPS
|
||||
assembler. */
|
||||
|
||||
#define GAS_ASM_SPEC "%{mcpu=*} %{m4650} %{mmad:-m4650} %{v}"
|
||||
#define GAS_ASM_SPEC "%{mcpu=*} %{m4650} %{mmad:-m4650} %{m3900} %{v}"
|
||||
|
||||
/* TARGET_ASM_SPEC is used to select either MIPS_AS_ASM_SPEC or
|
||||
GAS_ASM_SPEC as the default, depending upon the value of
|
||||
|
@ -791,6 +797,7 @@ while (0)
|
|||
%{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} \
|
||||
%{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} \
|
||||
%{m4650:-mcpu=r4650} \
|
||||
%{m3900:-mips1 -mcpu=r3900 -mfp32 -mgp32} \
|
||||
%{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \
|
||||
%{pic-none: -mno-half-pic} \
|
||||
%{pic-lib: -mhalf-pic} \
|
||||
|
@ -2980,7 +2987,8 @@ while (0)
|
|||
enum machine_mode xmode = GET_MODE (X); \
|
||||
if (xmode == SFmode || xmode == DFmode) \
|
||||
{ \
|
||||
if (mips_cpu == PROCESSOR_R3000) \
|
||||
if (mips_cpu == PROCESSOR_R3000 \
|
||||
|| mips_cpu == PROCESSOR_R3900) \
|
||||
return COSTS_N_INSNS (2); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
return COSTS_N_INSNS (3); \
|
||||
|
@ -3003,6 +3011,7 @@ while (0)
|
|||
if (xmode == SFmode) \
|
||||
{ \
|
||||
if (mips_cpu == PROCESSOR_R3000 \
|
||||
|| mips_cpu == PROCESSOR_R3900 \
|
||||
|| mips_cpu == PROCESSOR_R5000) \
|
||||
return COSTS_N_INSNS (4); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
|
@ -3014,6 +3023,7 @@ while (0)
|
|||
if (xmode == DFmode) \
|
||||
{ \
|
||||
if (mips_cpu == PROCESSOR_R3000 \
|
||||
|| mips_cpu == PROCESSOR_R3900 \
|
||||
|| mips_cpu == PROCESSOR_R5000) \
|
||||
return COSTS_N_INSNS (5); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
|
@ -3024,6 +3034,8 @@ while (0)
|
|||
\
|
||||
if (mips_cpu == PROCESSOR_R3000) \
|
||||
return COSTS_N_INSNS (12); \
|
||||
else if (mips_cpu == PROCESSOR_R3900) \
|
||||
return COSTS_N_INSNS (2); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
return COSTS_N_INSNS (17); \
|
||||
else if (mips_cpu == PROCESSOR_R5000) \
|
||||
|
@ -3038,7 +3050,8 @@ while (0)
|
|||
enum machine_mode xmode = GET_MODE (X); \
|
||||
if (xmode == SFmode) \
|
||||
{ \
|
||||
if (mips_cpu == PROCESSOR_R3000) \
|
||||
if (mips_cpu == PROCESSOR_R3000 \
|
||||
|| mips_cpu == PROCESSOR_R3900) \
|
||||
return COSTS_N_INSNS (12); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
return COSTS_N_INSNS (15); \
|
||||
|
@ -3048,7 +3061,8 @@ while (0)
|
|||
\
|
||||
if (xmode == DFmode) \
|
||||
{ \
|
||||
if (mips_cpu == PROCESSOR_R3000) \
|
||||
if (mips_cpu == PROCESSOR_R3000 \
|
||||
|| mips_cpu == PROCESSOR_R3900) \
|
||||
return COSTS_N_INSNS (19); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
return COSTS_N_INSNS (16); \
|
||||
|
@ -3060,7 +3074,8 @@ while (0)
|
|||
\
|
||||
case UDIV: \
|
||||
case UMOD: \
|
||||
if (mips_cpu == PROCESSOR_R3000) \
|
||||
if (mips_cpu == PROCESSOR_R3000 \
|
||||
|| mips_cpu == PROCESSOR_R3900) \
|
||||
return COSTS_N_INSNS (35); \
|
||||
else if (mips_cpu == PROCESSOR_R6000) \
|
||||
return COSTS_N_INSNS (38); \
|
||||
|
|
|
@ -88,15 +88,14 @@
|
|||
|
||||
;; ??? Fix everything that tests this attribute.
|
||||
(define_attr "cpu"
|
||||
"default,r3000,r6000,r4000,r4100,r4300,r4600,r4650,r5000,r8000"
|
||||
"default,r3000,r3900,r6000,r4000,r4100,r4300,r4600,r4650,r5000,r8000"
|
||||
(const (symbol_ref "mips_cpu_attr")))
|
||||
|
||||
;; Attribute defining whether or not we can use the branch-likely instructions
|
||||
;; (MIPS ISA level 2)
|
||||
|
||||
(define_attr "branch_likely" "no,yes"
|
||||
(const
|
||||
(if_then_else (ge (symbol_ref "mips_isa") (const_int 2))
|
||||
(if_then_else (ne (symbol_ref "GENERATE_BRANCHLIKELY") (const_int 0))
|
||||
(const_string "yes")
|
||||
(const_string "no"))))
|
||||
|
||||
|
@ -147,12 +146,12 @@
|
|||
|
||||
(define_function_unit "memory" 1 0
|
||||
(and (eq_attr "type" "load")
|
||||
(eq_attr "cpu" "!r3000,r4600,r4650,r4100,r4300,r5000"))
|
||||
(eq_attr "cpu" "!r3000,r3900,r4600,r4650,r4100,r4300,r5000"))
|
||||
3 0)
|
||||
|
||||
(define_function_unit "memory" 1 0
|
||||
(and (eq_attr "type" "load")
|
||||
(eq_attr "cpu" "r3000,r4600,r4650,r4100,r4300,r5000"))
|
||||
(eq_attr "cpu" "r3000,r3900,r4600,r4650,r4100,r4300,r5000"))
|
||||
2 0)
|
||||
|
||||
(define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0)
|
||||
|
@ -165,11 +164,11 @@
|
|||
|
||||
(define_function_unit "imuldiv" 1 0
|
||||
(and (eq_attr "type" "imul")
|
||||
(eq_attr "cpu" "!r3000,r4000,r4600,r4650,r4100,r4300,r5000"))
|
||||
(eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4300,r5000"))
|
||||
17 17)
|
||||
|
||||
(define_function_unit "imuldiv" 1 0
|
||||
(and (eq_attr "type" "imul") (eq_attr "cpu" "r3000"))
|
||||
(and (eq_attr "type" "imul") (eq_attr "cpu" "r3000,r3900"))
|
||||
12 12)
|
||||
|
||||
(define_function_unit "imuldiv" 1 0
|
||||
|
@ -207,11 +206,11 @@
|
|||
|
||||
(define_function_unit "imuldiv" 1 0
|
||||
(and (eq_attr "type" "idiv")
|
||||
(eq_attr "cpu" "!r3000,r4000,r4600,r4650,r4100,r4300,r5000"))
|
||||
(eq_attr "cpu" "!r3000,r3900,r4000,r4600,r4650,r4100,r4300,r5000"))
|
||||
38 38)
|
||||
|
||||
(define_function_unit "imuldiv" 1 0
|
||||
(and (eq_attr "type" "idiv") (eq_attr "cpu" "r3000"))
|
||||
(and (eq_attr "type" "idiv") (eq_attr "cpu" "r3000,r3900"))
|
||||
35 35)
|
||||
|
||||
(define_function_unit "imuldiv" 1 0
|
||||
|
@ -264,11 +263,11 @@
|
|||
;; instructions to be processed in the "imuldiv" unit.
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
(and (eq_attr "type" "fcmp") (eq_attr "cpu" "!r3000,r6000,r4300,r5000"))
|
||||
(and (eq_attr "type" "fcmp") (eq_attr "cpu" "!r3000,r3900,r6000,r4300,r5000"))
|
||||
3 0)
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
(and (eq_attr "type" "fcmp") (eq_attr "cpu" "r3000,r6000"))
|
||||
(and (eq_attr "type" "fcmp") (eq_attr "cpu" "r3000,r3900,r6000"))
|
||||
2 0)
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
|
@ -276,11 +275,11 @@
|
|||
1 0)
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
(and (eq_attr "type" "fadd") (eq_attr "cpu" "!r3000,r6000,r4300"))
|
||||
(and (eq_attr "type" "fadd") (eq_attr "cpu" "!r3000,r3900,r6000,r4300"))
|
||||
4 0)
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
(and (eq_attr "type" "fadd") (eq_attr "cpu" "r3000"))
|
||||
(and (eq_attr "type" "fadd") (eq_attr "cpu" "r3000,r3900"))
|
||||
2 0)
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
|
@ -289,22 +288,22 @@
|
|||
|
||||
(define_function_unit "adder" 1 1
|
||||
(and (eq_attr "type" "fabs,fneg")
|
||||
(eq_attr "cpu" "!r3000,r4600,r4650,r4300,r5000"))
|
||||
(eq_attr "cpu" "!r3000,r3900,r4600,r4650,r4300,r5000"))
|
||||
2 0)
|
||||
|
||||
(define_function_unit "adder" 1 1
|
||||
(and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000,r4600,r4650,r5000"))
|
||||
(and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000,r3900,r4600,r4650,r5000"))
|
||||
1 0)
|
||||
|
||||
(define_function_unit "mult" 1 1
|
||||
(and (eq_attr "type" "fmul")
|
||||
(and (eq_attr "mode" "SF")
|
||||
(eq_attr "cpu" "!r3000,r6000,r4600,r4650,r4300,r5000")))
|
||||
(eq_attr "cpu" "!r3000,r3900,r6000,r4600,r4650,r4300,r5000")))
|
||||
7 0)
|
||||
|
||||
(define_function_unit "mult" 1 1
|
||||
(and (eq_attr "type" "fmul")
|
||||
(and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000,r5000")))
|
||||
(and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000,r3900,r5000")))
|
||||
4 0)
|
||||
|
||||
(define_function_unit "mult" 1 1
|
||||
|
@ -319,12 +318,12 @@
|
|||
|
||||
(define_function_unit "mult" 1 1
|
||||
(and (eq_attr "type" "fmul")
|
||||
(and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000,r4300,r5000")))
|
||||
(and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r3900,r6000,r4300,r5000")))
|
||||
8 0)
|
||||
|
||||
(define_function_unit "mult" 1 1
|
||||
(and (eq_attr "type" "fmul")
|
||||
(and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000,r5000")))
|
||||
(and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000,r3900,r5000")))
|
||||
5 0)
|
||||
|
||||
(define_function_unit "mult" 1 1
|
||||
|
@ -335,12 +334,12 @@
|
|||
(define_function_unit "divide" 1 1
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(and (eq_attr "mode" "SF")
|
||||
(eq_attr "cpu" "!r3000,r6000,r4600,r4650,r4300,r5000")))
|
||||
(eq_attr "cpu" "!r3000,r3900,r6000,r4600,r4650,r4300,r5000")))
|
||||
23 0)
|
||||
|
||||
(define_function_unit "divide" 1 1
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000")))
|
||||
(and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000,r3900")))
|
||||
12 0)
|
||||
|
||||
(define_function_unit "divide" 1 1
|
||||
|
@ -361,12 +360,12 @@
|
|||
(define_function_unit "divide" 1 1
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(and (eq_attr "mode" "DF")
|
||||
(eq_attr "cpu" "!r3000,r6000,r4600,r4650,r4300")))
|
||||
(eq_attr "cpu" "!r3000,r3900,r6000,r4600,r4650,r4300")))
|
||||
36 0)
|
||||
|
||||
(define_function_unit "divide" 1 1
|
||||
(and (eq_attr "type" "fdiv")
|
||||
(and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000")))
|
||||
(and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000,r3900")))
|
||||
19 0)
|
||||
|
||||
(define_function_unit "divide" 1 1
|
||||
|
@ -1031,7 +1030,9 @@
|
|||
""
|
||||
"
|
||||
{
|
||||
if (TARGET_MAD)
|
||||
if (GENERATE_MULT3)
|
||||
emit_insn (gen_mulsi3_mult3 (operands[0], operands[1], operands[2]));
|
||||
else if (TARGET_MAD)
|
||||
emit_insn (gen_mulsi3_r4650 (operands[0], operands[1], operands[2]));
|
||||
else if (mips_cpu != PROCESSOR_R4000)
|
||||
emit_insn (gen_mulsi3_internal (operands[0], operands[1], operands[2]));
|
||||
|
@ -1040,6 +1041,19 @@
|
|||
DONE;
|
||||
}")
|
||||
|
||||
(define_insn "mulsi3_mult3"
|
||||
[(set (match_operand:SI 0 "register_operand" "=d")
|
||||
(mult:SI (match_operand:SI 1 "register_operand" "d")
|
||||
(match_operand:SI 2 "register_operand" "d")))
|
||||
(clobber (match_scratch:SI 3 "=h"))
|
||||
(clobber (match_scratch:SI 4 "=l"))
|
||||
(clobber (match_scratch:SI 5 "=a"))]
|
||||
"GENERATE_MULT3"
|
||||
"mult\\t%0,%1,%2"
|
||||
[(set_attr "type" "imul")
|
||||
(set_attr "mode" "SI")
|
||||
(set_attr "length" "1")])
|
||||
|
||||
(define_insn "mulsi3_internal"
|
||||
[(set (match_operand:SI 0 "register_operand" "=l")
|
||||
(mult:SI (match_operand:SI 1 "register_operand" "d")
|
||||
|
@ -1286,8 +1300,14 @@
|
|||
(match_dup 0)))
|
||||
(clobber (match_scratch:SI 3 "=h"))
|
||||
(clobber (match_scratch:SI 4 "=a"))]
|
||||
"TARGET_MAD"
|
||||
"mad\\t%1,%2"
|
||||
"TARGET_MAD || GENERATE_MADD"
|
||||
"*
|
||||
{
|
||||
if (TARGET_MAD)
|
||||
return \"mad\\t%1,%2\";
|
||||
else
|
||||
return \"madd\\t%1,%2\";
|
||||
}"
|
||||
[(set_attr "type" "imul")
|
||||
(set_attr "mode" "SI")
|
||||
(set_attr "length" "1")])
|
||||
|
@ -1350,6 +1370,20 @@
|
|||
(set_attr "mode" "SI")
|
||||
(set_attr "length" "1")])
|
||||
|
||||
(define_insn "madd3"
|
||||
[(set (match_operand:SI 0 "register_operand" "=d")
|
||||
(plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d")
|
||||
(match_operand:SI 2 "register_operand" "d"))
|
||||
(match_operand:SI 3 "register_operand" "l")))
|
||||
(clobber (match_scratch:SI 4 "=l"))
|
||||
(clobber (match_scratch:SI 5 "=h"))
|
||||
(clobber (match_scratch:SI 6 "=a"))]
|
||||
"GENERATE_MADD"
|
||||
"madd\\t%0,%1,%2"
|
||||
[(set_attr "type" "imul")
|
||||
(set_attr "mode" "SI")
|
||||
(set_attr "length" "1")])
|
||||
|
||||
;; Floating point multiply accumulate instructions.
|
||||
|
||||
(define_insn ""
|
||||
|
@ -1775,7 +1809,7 @@
|
|||
|
||||
if (REGNO (operands[0]) == REGNO (operands[1]))
|
||||
{
|
||||
if (mips_isa >= 2)
|
||||
if (GENERATE_BRANCHLIKELY)
|
||||
return \"%(bltzl\\t%1,1f\\n\\tsubu\\t%0,%z2,%0\\n1:%)\";
|
||||
else
|
||||
return \"bgez\\t%1,1f%#\\n\\tsubu\\t%0,%z2,%0\\n1:\";
|
||||
|
@ -3175,7 +3209,7 @@ move\\t%0,%z4\\n\\
|
|||
|
||||
(define_insn "movsi_ulw"
|
||||
[(set (match_operand:SI 0 "register_operand" "=&d,&d")
|
||||
(unspec [(match_operand:QI 1 "general_operand" "R,o")] 0))]
|
||||
(unspec:SI [(match_operand:QI 1 "general_operand" "R,o")] 0))]
|
||||
""
|
||||
"*
|
||||
{
|
||||
|
@ -3204,7 +3238,7 @@ move\\t%0,%z4\\n\\
|
|||
|
||||
(define_insn "movsi_usw"
|
||||
[(set (match_operand:QI 0 "memory_operand" "=R,o")
|
||||
(unspec [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] 1))]
|
||||
(unspec:QI [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] 1))]
|
||||
""
|
||||
"*
|
||||
{
|
||||
|
@ -4026,7 +4060,7 @@ move\\t%0,%z4\\n\\
|
|||
|
||||
(define_insn "loadgp"
|
||||
[(set (reg:DI 28)
|
||||
(unspec_volatile [(match_operand:DI 0 "address_operand" "")] 2))
|
||||
(unspec_volatile:DI [(match_operand:DI 0 "address_operand" "")] 2))
|
||||
(clobber (reg:DI 1))]
|
||||
""
|
||||
"%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,$25%]"
|
||||
|
@ -4041,8 +4075,8 @@ move\\t%0,%z4\\n\\
|
|||
;; Argument 3 is the alignment
|
||||
|
||||
(define_expand "movstrsi"
|
||||
[(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" ""))
|
||||
(mem:BLK (match_operand:BLK 1 "general_operand" "")))
|
||||
[(parallel [(set (match_operand:BLK 0 "general_operand" "")
|
||||
(match_operand:BLK 1 "general_operand" ""))
|
||||
(use (match_operand:SI 2 "arith32_operand" ""))
|
||||
(use (match_operand:SI 3 "immediate_operand" ""))])]
|
||||
""
|
||||
|
@ -4069,7 +4103,7 @@ move\\t%0,%z4\\n\\
|
|||
(use (const_int 0))] ;; normal block move
|
||||
""
|
||||
"* return output_block_move (insn, operands, 4, BLOCK_MOVE_NORMAL);"
|
||||
[(set_attr "type" "multi")
|
||||
[(set_attr "type" "store")
|
||||
(set_attr "mode" "none")
|
||||
(set_attr "length" "20")])
|
||||
|
||||
|
@ -4128,7 +4162,7 @@ move\\t%0,%z4\\n\\
|
|||
(use (const_int 1))] ;; all but last store
|
||||
""
|
||||
"* return output_block_move (insn, operands, 4, BLOCK_MOVE_NOT_LAST);"
|
||||
[(set_attr "type" "multi")
|
||||
[(set_attr "type" "store")
|
||||
(set_attr "mode" "none")
|
||||
(set_attr "length" "20")])
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* Definitions for rtems targetting a MIPS ORION using ecoff.
|
||||
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -27,5 +26,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dmips -DMIPSEB -DR4000 -D_mips -D_MIPSEB -D_R4000 \
|
||||
-Drtems -D__rtems__ -Asystem(rtems)"
|
||||
|
||||
/* end of mips/rtems64.h */
|
||||
|
|
|
@ -19,8 +19,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
|
|
@ -19,8 +19,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
|
|
@ -19,8 +19,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
;;- Machine description for HP PA-RISC architecture for GNU C compiler
|
||||
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997
|
||||
;; Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
;; Contributed by the Center for Software Science at the University
|
||||
;; of Utah.
|
||||
|
||||
|
@ -2059,18 +2058,20 @@
|
|||
;; that anything generated as this insn will be recognized as one
|
||||
;; and that it will not successfully combine with anything.
|
||||
(define_expand "movstrsi"
|
||||
[(parallel [(set (mem:BLK (match_operand:BLK 0 "" ""))
|
||||
(mem:BLK (match_operand:BLK 1 "" "")))
|
||||
(clobber (match_dup 0))
|
||||
(clobber (match_dup 1))
|
||||
[(parallel [(set (match_operand:BLK 0 "" "")
|
||||
(match_operand:BLK 1 "" ""))
|
||||
(clobber (match_dup 7))
|
||||
(clobber (match_dup 8))
|
||||
(clobber (match_dup 4))
|
||||
(clobber (match_dup 5))
|
||||
(clobber (match_dup 6))
|
||||
(use (match_operand:SI 2 "arith_operand" ""))
|
||||
(use (match_operand:SI 3 "const_int_operand" ""))])]
|
||||
""
|
||||
"
|
||||
{
|
||||
int size, align;
|
||||
|
||||
/* HP provides very fast block move library routine for the PA;
|
||||
this routine includes:
|
||||
|
||||
|
@ -2103,22 +2104,25 @@
|
|||
|
||||
/* If size/alignment > 8 (eg size is large in respect to alignment),
|
||||
then use the library routines. */
|
||||
if (size/align > 16)
|
||||
if (size / align > 16)
|
||||
FAIL;
|
||||
|
||||
/* This does happen, but not often enough to worry much about. */
|
||||
if (size/align < MOVE_RATIO)
|
||||
if (size / align < MOVE_RATIO)
|
||||
FAIL;
|
||||
|
||||
/* Fall through means we're going to use our block move pattern. */
|
||||
operands[0] = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
|
||||
operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
|
||||
operands[0]
|
||||
= change_address (operands[0], VOIDmode,
|
||||
copy_to_mode_reg (SImode, XEXP (operands[0], 0)));
|
||||
operands[1]
|
||||
= change_address (operands[1], VOIDmode,
|
||||
copy_to_mode_reg (SImode, XEXP (operands[1], 0)));
|
||||
operands[4] = gen_reg_rtx (SImode);
|
||||
operands[5] = gen_reg_rtx (SImode);
|
||||
emit_insn (gen_movstrsi_internal (operands[0], operands[1], operands[4],
|
||||
operands[5], operands[2], operands[3],
|
||||
gen_reg_rtx (SImode)));
|
||||
DONE;
|
||||
operands[6] = gen_reg_rtx (SImode);
|
||||
operands[7] = XEXP (operands[0], 0);
|
||||
operands[8] = XEXP (operands[1], 0);
|
||||
}")
|
||||
|
||||
;; The operand constraints are written like this to support both compile-time
|
||||
|
|
|
@ -24,5 +24,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-Dhppa -DPWB -Acpu(hppa) -Amachine(hppa) \
|
||||
-Drtems -D__rtems__ -Asystem(rtems)"
|
||||
|
||||
/* end of pa/rtems.h */
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# BSD on the PA already has ANSI include files which are c++ compatible.
|
||||
USER_H = $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)
|
||||
USER_H = $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)
|
||||
STMP_FIXPROTO=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Operating system specific defines to be used when targeting GCC for some
|
||||
generic System V Release 4 system.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ron Guilmette (rfg@monkeys.com).
|
||||
Renamed and changed to suit Dynix/ptx v4 and later.
|
||||
Modified by Tim Wright (timw@sequent.com).
|
||||
|
|
|
@ -19,9 +19,9 @@ 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. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include "config.h"
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
#include "hard-reg-set.h"
|
||||
|
|
|
@ -7112,8 +7112,10 @@
|
|||
;; We move the back-chain and decrement the stack pointer.
|
||||
|
||||
(define_expand "allocate_stack"
|
||||
[(set (reg:SI 1)
|
||||
(minus:SI (reg:SI 1) (match_operand:SI 0 "reg_or_short_operand" "")))]
|
||||
[(set (match_operand:SI 0 "register_operand" "=r")
|
||||
(minus:SI (reg:SI 1) (match_operand:SI 1 "reg_or_short_operand" "")))
|
||||
(set (reg:SI 1)
|
||||
(minus:SI (reg:SI 1) (match_dup 1)))]
|
||||
""
|
||||
"
|
||||
{ rtx chain = gen_reg_rtx (Pmode);
|
||||
|
@ -7122,31 +7124,32 @@
|
|||
|
||||
emit_move_insn (chain, stack_bot);
|
||||
|
||||
/* 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. */
|
||||
/* 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[0]) != CONST_INT || INTVAL (operands[0]) > 4096))
|
||||
&& (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) > 4096))
|
||||
{
|
||||
rtx tmp = gen_reg_rtx (SImode);
|
||||
emit_library_call_value (gen_rtx (SYMBOL_REF, Pmode, \"__allocate_stack\"),
|
||||
tmp, 0, SImode, 1, operands[0], Pmode);
|
||||
tmp, 0, SImode, 1, operands[1], Pmode);
|
||||
emit_insn (gen_set_sp (tmp));
|
||||
emit_move_insn (operands[0], tmp);
|
||||
DONE;
|
||||
}
|
||||
|
||||
if (GET_CODE (operands[0]) != CONST_INT
|
||||
|| INTVAL (operands[0]) < -32767
|
||||
|| INTVAL (operands[0]) > 32768)
|
||||
if (GET_CODE (operands[1]) != CONST_INT
|
||||
|| INTVAL (operands[1]) < -32767
|
||||
|| INTVAL (operands[1]) > 32768)
|
||||
{
|
||||
neg_op0 = gen_reg_rtx (Pmode);
|
||||
if (TARGET_32BIT)
|
||||
emit_insn (gen_negsi2 (neg_op0, operands[0]));
|
||||
emit_insn (gen_negsi2 (neg_op0, operands[1]));
|
||||
else
|
||||
emit_insn (gen_negdi2 (neg_op0, operands[0]));
|
||||
emit_insn (gen_negdi2 (neg_op0, operands[1]));
|
||||
}
|
||||
else
|
||||
neg_op0 = GEN_INT (- INTVAL (operands[0]));
|
||||
neg_op0 = GEN_INT (- INTVAL (operands[1]));
|
||||
|
||||
if (TARGET_UPDATE)
|
||||
emit_insn ((* ((TARGET_32BIT) ? gen_movsi_update : gen_movdi_update))
|
||||
|
@ -7160,6 +7163,8 @@
|
|||
stack_pointer_rtx),
|
||||
chain);
|
||||
}
|
||||
|
||||
emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
|
||||
DONE;
|
||||
}")
|
||||
|
||||
|
@ -7234,7 +7239,7 @@
|
|||
|
||||
(define_insn "nonlocal_goto_receiver"
|
||||
[(unspec_volatile [(const_int 0)] 1)]
|
||||
"TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0"
|
||||
"TARGET_TOC && TARGET_MINIMAL_TOC"
|
||||
"*
|
||||
{
|
||||
rs6000_output_load_toc_table (asm_out_file, 30);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* Definitions for rtems targetting a PowerPC using elf.
|
||||
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
|
|
|
@ -91,6 +91,8 @@ extern enum rs6000_sdata_type rs6000_sdata;
|
|||
{ "sdata", 0 }, \
|
||||
{ "no-sdata", 0 }, \
|
||||
{ "sim", 0 }, \
|
||||
{ "ads", 0 }, \
|
||||
{ "yellowknife", 0 }, \
|
||||
{ "mvme", 0 }, \
|
||||
{ "emb", 0 }, \
|
||||
{ "solaris-cclib", 0 }, \
|
||||
|
@ -327,6 +329,9 @@ do { \
|
|||
|
||||
#undef ASM_OUTPUT_EXTERNAL
|
||||
|
||||
/* Put jump tables in read-only memory, rather than in .text. */
|
||||
#undef JUMP_TABLES_IN_TEXT_SECTION
|
||||
|
||||
/* Undefine some things which are defined by the generic svr4.h. */
|
||||
|
||||
#undef ASM_FILE_END
|
||||
|
@ -995,11 +1000,13 @@ do { \
|
|||
/* Default starting address if specified */
|
||||
#ifndef LINK_START_SPEC
|
||||
#define LINK_START_SPEC "\
|
||||
%{mads: %(link_start_ads) } \
|
||||
%{myellowknife: %(link_start_yellowknife) } \
|
||||
%{mmvme: %(link_start_mvme) } \
|
||||
%{msim: %(link_start_sim) } \
|
||||
%{mcall-linux: %(link_start_linux) } \
|
||||
%{mcall-solaris: %(link_start_solaris) } \
|
||||
%{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_start_default) }}}}"
|
||||
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_start_default) }}}}}}"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_START_DEFAULT_SPEC
|
||||
|
@ -1050,11 +1057,13 @@ do { \
|
|||
/* Any specific OS flags */
|
||||
#ifndef LINK_OS_SPEC
|
||||
#define LINK_OS_SPEC "\
|
||||
%{mads: %(link_os_ads) } \
|
||||
%{myellowknife: %(link_os_yellowknife) } \
|
||||
%{mmvme: %(link_os_mvme) } \
|
||||
%{msim: %(link_os_sim) } \
|
||||
%{mcall-linux: %(link_os_linux) } \
|
||||
%{mcall-solaris: %(link_os_solaris) } \
|
||||
%{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_os_default) }}}}"
|
||||
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_os_default) }}}}}}"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_OS_DEFAULT_SPEC
|
||||
|
@ -1105,11 +1114,13 @@ do { \
|
|||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian) %(cpp_cpu) \
|
||||
%{mads: %(cpp_os_ads) } \
|
||||
%{myellowknife: %(cpp_os_yellowknife) } \
|
||||
%{mmvme: %(cpp_os_mvme) } \
|
||||
%{msim: %(cpp_os_sim) } \
|
||||
%{mcall-linux: %(cpp_os_linux) } \
|
||||
%{mcall-solaris: %(cpp_os_solaris) } \
|
||||
%{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}"
|
||||
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}}}"
|
||||
|
||||
#ifndef CPP_OS_DEFAULT_SPEC
|
||||
#define CPP_OS_DEFAULT_SPEC ""
|
||||
|
@ -1117,22 +1128,26 @@ do { \
|
|||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "\
|
||||
%{mads: %(startfile_ads) } \
|
||||
%{myellowknife: %(startfile_yellowknife) } \
|
||||
%{mmvme: %(startfile_mvme) } \
|
||||
%{msim: %(startfile_sim) } \
|
||||
%{mcall-linux: %(startfile_linux) } \
|
||||
%{mcall-solaris: %(startfile_solaris) } \
|
||||
%{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(startfile_default) }}}}"
|
||||
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(startfile_default) }}}}}}"
|
||||
|
||||
#undef STARTFILE_DEFAULT_SPEC
|
||||
#define STARTFILE_DEFAULT_SPEC ""
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "\
|
||||
%{mads: %(lib_ads) } \
|
||||
%{myellowknife: %(lib_yellowknife) } \
|
||||
%{mmvme: %(lib_mvme) } \
|
||||
%{msim: %(lib_sim) } \
|
||||
%{mcall-linux: %(lib_linux) } \
|
||||
%{mcall-solaris: %(lib_solaris) } \
|
||||
%{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(lib_default) }}}}"
|
||||
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(lib_default) }}}}}}"
|
||||
|
||||
#undef LIBGCC_SPEC
|
||||
#define LIBGCC_SPEC "libgcc.a%s"
|
||||
|
@ -1143,22 +1158,74 @@ do { \
|
|||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "\
|
||||
%{mads: ecrtn.o%s} \
|
||||
%{myellowknife: ecrtn.o%s} \
|
||||
%{mmvme: ecrtn.o%s} \
|
||||
%{msim: ecrtn.o%s} \
|
||||
%{mcall-linux: } \
|
||||
%{mcall-solaris: scrtn.o%s} \
|
||||
%{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(endfile_default) }}}}"
|
||||
%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(endfile_default) }}}}}}"
|
||||
|
||||
#undef ENDFILE_DEFAULT_SPEC
|
||||
#define ENDFILE_DEFAULT_SPEC ""
|
||||
|
||||
/* Motorola ADS support. */
|
||||
#ifndef LIB_ADS_SPEC
|
||||
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
|
||||
#endif
|
||||
|
||||
#ifndef STARTFILE_ADS_SPEC
|
||||
#define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s"
|
||||
#endif
|
||||
|
||||
#ifndef ENDFILE_ADS_SPEC
|
||||
#define ENDFILE_ADS_SPEC "ecrtn.o%s"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_START_ADS_SPEC
|
||||
#define LINK_START_ADS_SPEC "-T ads.ld%s"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_OS_ADS_SPEC
|
||||
#define LINK_OS_ADS_SPEC ""
|
||||
#endif
|
||||
|
||||
#ifndef CPP_OS_ADS_SPEC
|
||||
#define CPP_OS_ADS_SPEC ""
|
||||
#endif
|
||||
|
||||
/* Motorola Yellowknife support. */
|
||||
#ifndef LIB_YELLOWKNIFE_SPEC
|
||||
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
|
||||
#endif
|
||||
|
||||
#ifndef STARTFILE_YELLOWKNIFE_SPEC
|
||||
#define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s"
|
||||
#endif
|
||||
|
||||
#ifndef ENDFILE_YELLOWKNIFE_SPEC
|
||||
#define ENDFILE_YELLOWKNIFE_SPEC "ecrtn.o%s"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_START_YELLOWKNIFE_SPEC
|
||||
#define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_OS_YELLOWKNIFE_SPEC
|
||||
#define LINK_OS_YELLOWKNIFE_SPEC ""
|
||||
#endif
|
||||
|
||||
#ifndef CPP_OS_YELLOWKNIFE_SPEC
|
||||
#define CPP_OS_YELLOWKNIFE_SPEC ""
|
||||
#endif
|
||||
|
||||
/* Motorola MVME support. */
|
||||
#ifndef LIB_MVME_SPEC
|
||||
#define LIB_MVME_SPEC "-( -lmvme -lc -)"
|
||||
#define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
|
||||
#endif
|
||||
|
||||
#ifndef STARTFILE_MVME_SPEC
|
||||
#define STARTFILE_MVME_SPEC "ecrti.o%s mvme-crt0.o%s"
|
||||
#define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s"
|
||||
#endif
|
||||
|
||||
#ifndef ENDFILE_MVME_SPEC
|
||||
|
@ -1166,7 +1233,7 @@ do { \
|
|||
#endif
|
||||
|
||||
#ifndef LINK_START_MVME_SPEC
|
||||
#define LINK_START_MVME_SPEC ""
|
||||
#define LINK_START_MVME_SPEC "%{!Wl,-T*: %{!T*: -Ttext 0x40000}}"
|
||||
#endif
|
||||
|
||||
#ifndef LINK_OS_MVME_SPEC
|
||||
|
@ -1179,7 +1246,7 @@ do { \
|
|||
|
||||
/* PowerPC simulator based on netbsd system calls support. */
|
||||
#ifndef LIB_SIM_SPEC
|
||||
#define LIB_SIM_SPEC "-( -lsim -lc -)"
|
||||
#define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
|
||||
#endif
|
||||
|
||||
#ifndef STARTFILE_SIM_SPEC
|
||||
|
@ -1204,7 +1271,7 @@ do { \
|
|||
|
||||
/* Linux support. */
|
||||
#ifndef LIB_LINUX_SPEC
|
||||
#define LIB_LINUX_SPEC "%{mnewlib: -( -llinux -lc -) } %{!mnewlib: -lc }"
|
||||
#define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } %{!mnewlib: -lc }"
|
||||
#endif
|
||||
|
||||
#ifndef STARTFILE_LINUX_SPEC
|
||||
|
@ -1252,7 +1319,7 @@ do { \
|
|||
|
||||
#ifndef LIB_SOLARIS_SPEC
|
||||
#define LIB_SOLARIS_SPEC "\
|
||||
%{mnewlib: -( -lsolaris -lc -) } \
|
||||
%{mnewlib: --start-group -lsolaris -lc --end-group } \
|
||||
%{!mnewlib: \
|
||||
%{ansi:values-Xc.o%s} \
|
||||
%{!ansi: \
|
||||
|
@ -1296,16 +1363,22 @@ do { \
|
|||
/* Define any extra SPECS that the compiler needs to generate. */
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "lib_ads", LIB_ADS_SPEC }, \
|
||||
{ "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
|
||||
{ "lib_mvme", LIB_MVME_SPEC }, \
|
||||
{ "lib_sim", LIB_SIM_SPEC }, \
|
||||
{ "lib_linux", LIB_LINUX_SPEC }, \
|
||||
{ "lib_solaris", LIB_SOLARIS_SPEC }, \
|
||||
{ "lib_default", LIB_DEFAULT_SPEC }, \
|
||||
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
|
||||
{ "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
|
||||
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \
|
||||
{ "startfile_sim", STARTFILE_SIM_SPEC }, \
|
||||
{ "startfile_linux", STARTFILE_LINUX_SPEC }, \
|
||||
{ "startfile_solaris", STARTFILE_SOLARIS_SPEC }, \
|
||||
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
|
||||
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
|
||||
{ "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
|
||||
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \
|
||||
{ "endfile_sim", ENDFILE_SIM_SPEC }, \
|
||||
{ "endfile_linux", ENDFILE_LINUX_SPEC }, \
|
||||
|
@ -1315,12 +1388,16 @@ do { \
|
|||
{ "link_shlib", LINK_SHLIB_SPEC }, \
|
||||
{ "link_target", LINK_TARGET_SPEC }, \
|
||||
{ "link_start", LINK_START_SPEC }, \
|
||||
{ "link_start_ads", LINK_START_ADS_SPEC }, \
|
||||
{ "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
|
||||
{ "link_start_mvme", LINK_START_MVME_SPEC }, \
|
||||
{ "link_start_sim", LINK_START_SIM_SPEC }, \
|
||||
{ "link_start_linux", LINK_START_LINUX_SPEC }, \
|
||||
{ "link_start_solaris", LINK_START_SOLARIS_SPEC }, \
|
||||
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
|
||||
{ "link_os", LINK_OS_SPEC }, \
|
||||
{ "link_os_ads", LINK_OS_ADS_SPEC }, \
|
||||
{ "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
|
@ -1329,6 +1406,8 @@ do { \
|
|||
{ "cpp_endian_big", CPP_ENDIAN_BIG_SPEC }, \
|
||||
{ "cpp_endian_little", CPP_ENDIAN_LITTLE_SPEC }, \
|
||||
{ "cpp_endian_solaris", CPP_ENDIAN_SOLARIS_SPEC }, \
|
||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||
{ "cpp_os_sim", CPP_OS_SIM_SPEC }, \
|
||||
{ "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* Definitions for rtems targetting a SH using elf.
|
||||
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Contributed by Joel Sherrill (joel@OARcorp.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -27,5 +26,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef CPP_PREDEFINES
|
||||
#define CPP_PREDEFINES "-D__sh__ -D__ELF__ -Drtems -D__rtems__ \
|
||||
-Asystem(rtems) -Acpu(sh) -Amachine(sh)"
|
||||
|
||||
/* end of sparc/rtems.h */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions of target machine for GNU compiler for Hitachi Super-H.
|
||||
Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Steve Chamberlain (sac@cygnus.com).
|
||||
Improved by Jim Wilson (wilson@cygnus.com).
|
||||
|
||||
|
@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */
|
|||
#define TARGET_VERSION \
|
||||
fputs (" (Hitachi SH)", stderr);
|
||||
|
||||
/* Unfortunately, insn-attrtab.c doesn't include insn-codes.h. We can't
|
||||
include it here, because hconfig.h is also included by gencodes.c . */
|
||||
extern int code_for_indirect_jump_scratch;
|
||||
|
||||
/* Generate SDB debugging information. */
|
||||
|
||||
#define SDB_DEBUGGING_INFO
|
||||
|
@ -38,7 +42,8 @@ Boston, MA 02111-1307, USA. */
|
|||
%{m1:-D__sh1__} \
|
||||
%{m2:-D__sh2__} \
|
||||
%{m3:-D__sh3__} \
|
||||
%{m3e:-D__SH3E__}"
|
||||
%{m3e:-D__SH3E__} \
|
||||
%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}"
|
||||
|
||||
#define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)"
|
||||
|
||||
|
@ -55,6 +60,7 @@ Boston, MA 02111-1307, USA. */
|
|||
int regno; \
|
||||
for (regno = FIRST_FP_REG; regno <= LAST_FP_REG; regno++) \
|
||||
fixed_regs[regno] = call_used_regs[regno] = 1; \
|
||||
fixed_regs[FPUL_REG] = call_used_regs[FPUL_REG] = 1; \
|
||||
} \
|
||||
/* Hitachi saves and restores mac registers on call. */ \
|
||||
if (TARGET_HITACHI) \
|
||||
|
@ -71,7 +77,6 @@ Boston, MA 02111-1307, USA. */
|
|||
extern int target_flags;
|
||||
#define ISIZE_BIT (1<<1)
|
||||
#define DALIGN_BIT (1<<6)
|
||||
#define SH0_BIT (1<<7)
|
||||
#define SH1_BIT (1<<8)
|
||||
#define SH2_BIT (1<<9)
|
||||
#define SH3_BIT (1<<10)
|
||||
|
@ -82,6 +87,7 @@ extern int target_flags;
|
|||
#define HITACHI_BIT (1<<22)
|
||||
#define PADSTRUCT_BIT (1<<28)
|
||||
#define LITTLE_ENDIAN_BIT (1<<29)
|
||||
#define IEEE_BIT (1<<30)
|
||||
|
||||
/* Nonzero if we should dump out instruction size info. */
|
||||
#define TARGET_DUMPISIZE (target_flags & ISIZE_BIT)
|
||||
|
@ -89,11 +95,6 @@ extern int target_flags;
|
|||
/* Nonzero to align doubles on 64 bit boundaries. */
|
||||
#define TARGET_ALIGN_DOUBLE (target_flags & DALIGN_BIT)
|
||||
|
||||
/* Nonzero if we should generate code using type 0 insns. */
|
||||
/* ??? Is there such a thing as SH0? If not, we should delete all
|
||||
references to it. */
|
||||
#define TARGET_SH0 (target_flags & SH0_BIT)
|
||||
|
||||
/* Nonzero if we should generate code using type 1 insns. */
|
||||
#define TARGET_SH1 (target_flags & SH1_BIT)
|
||||
|
||||
|
@ -106,6 +107,9 @@ extern int target_flags;
|
|||
/* Nonzero if we should generate code using type 3E insns. */
|
||||
#define TARGET_SH3E (target_flags & SH3E_BIT)
|
||||
|
||||
/* Nonzero if we respect NANs. */
|
||||
#define TARGET_IEEE (target_flags & IEEE_BIT)
|
||||
|
||||
/* Nonzero if we should generate smaller code rather than faster code. */
|
||||
#define TARGET_SMALLCODE (target_flags & SPACE_BIT)
|
||||
|
||||
|
@ -130,8 +134,7 @@ extern int target_flags;
|
|||
#define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT)
|
||||
|
||||
#define TARGET_SWITCHES \
|
||||
{ {"0", SH0_BIT}, \
|
||||
{"1", SH1_BIT}, \
|
||||
{ {"1", SH1_BIT}, \
|
||||
{"2", SH2_BIT}, \
|
||||
{"3", SH3_BIT|SH2_BIT}, \
|
||||
{"3e", SH3E_BIT|SH3_BIT|SH2_BIT}, \
|
||||
|
@ -139,8 +142,10 @@ extern int target_flags;
|
|||
{"bigtable", BIGTABLE_BIT}, \
|
||||
{"dalign", DALIGN_BIT}, \
|
||||
{"hitachi", HITACHI_BIT}, \
|
||||
{"ieee", IEEE_BIT}, \
|
||||
{"isize", ISIZE_BIT}, \
|
||||
{"l", LITTLE_ENDIAN_BIT}, \
|
||||
{"no-ieee", -IEEE_BIT}, \
|
||||
{"padstruct", PADSTRUCT_BIT}, \
|
||||
{"relax", RELAX_BIT}, \
|
||||
{"space", SPACE_BIT}, \
|
||||
|
@ -155,11 +160,10 @@ extern int target_flags;
|
|||
|
||||
#define PRESERVE_DEATH_INFO_REGNO_P(regno) (TARGET_RELAX || optimize)
|
||||
|
||||
#define ASSEMBLER_DIALECT 0 /* will allow to distinguish b[tf].s and b[tf]/s . */
|
||||
#define OVERRIDE_OPTIONS \
|
||||
do { \
|
||||
sh_cpu = CPU_SH0; \
|
||||
if (TARGET_SH1) \
|
||||
sh_cpu = CPU_SH1; \
|
||||
sh_cpu = CPU_SH1; \
|
||||
if (TARGET_SH2) \
|
||||
sh_cpu = CPU_SH2; \
|
||||
if (TARGET_SH3) \
|
||||
|
@ -171,6 +175,7 @@ do { \
|
|||
break global alloc, and generates slower code anyway due \
|
||||
to the pressure on R0. */ \
|
||||
flag_schedule_insns = 0; \
|
||||
sh_addr_diff_vec_mode = TARGET_BIGTABLE ? SImode : HImode; \
|
||||
} while (0)
|
||||
|
||||
/* Target machine storage layout. */
|
||||
|
@ -222,10 +227,14 @@ do { \
|
|||
/* Boundary (in *bits*) on which stack pointer should be aligned. */
|
||||
#define STACK_BOUNDARY 32
|
||||
|
||||
/* The log (base 2) of the cache line size, in bytes. Processors prior to
|
||||
SH3 have no actual cache, but they fetch code in chunks of 4 bytes. */
|
||||
#define CACHE_LOG (TARGET_SH3 ? 4 : 2)
|
||||
|
||||
/* Allocation boundary (in *bits*) for the code of a function.
|
||||
32 bit alignment is faster, because instructions are always fetched as a
|
||||
pair from a longword boundary. */
|
||||
#define FUNCTION_BOUNDARY (TARGET_SMALLCODE ? 16 : 32)
|
||||
#define FUNCTION_BOUNDARY (TARGET_SMALLCODE ? 16 : (1 << CACHE_LOG) * 8)
|
||||
|
||||
/* Alignment of field after `int : 0' in a structure. */
|
||||
#define EMPTY_FIELD_BOUNDARY 32
|
||||
|
@ -311,11 +320,11 @@ do { \
|
|||
0, 0, 0, 0, \
|
||||
0, 0, 0, 1, \
|
||||
1, 1, 1, 1, \
|
||||
1, 1, 1, 1, \
|
||||
1, 1, 0, 1, \
|
||||
0, 0, 0, 0, \
|
||||
0, 0, 0, 0, \
|
||||
0, 0, 0, 0, \
|
||||
0, 0, 0, 0, \
|
||||
0, 0, 0, 0 \
|
||||
}
|
||||
|
||||
/* 1 for registers not available across function calls.
|
||||
|
@ -335,7 +344,7 @@ do { \
|
|||
1, 1, 1, 1, \
|
||||
1, 1, 1, 1, \
|
||||
1, 1, 1, 1, \
|
||||
0, 0, 0, 0 \
|
||||
0, 0, 0, 0, \
|
||||
}
|
||||
|
||||
/* Return number of consecutive hard regs needed starting at reg REGNO
|
||||
|
@ -428,7 +437,7 @@ do { \
|
|||
its replacement, at the start of a routine. */
|
||||
|
||||
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
||||
OFFSET = initial_elimination_offset (FROM, TO)
|
||||
OFFSET = initial_elimination_offset ((FROM), (TO))
|
||||
|
||||
/* Base register for access to arguments of the function. */
|
||||
#define ARG_POINTER_REGNUM 16
|
||||
|
@ -476,6 +485,14 @@ do { \
|
|||
be used as the destination of some of the arithmetic ops. There are
|
||||
also some special purpose registers; the T bit register, the
|
||||
Procedure Return Register and the Multiply Accumulate Registers. */
|
||||
/* Place GENERAL_REGS after FPUL_REGS so that it will be preferred by
|
||||
reg_class_subunion. We don't want to have an actual union class
|
||||
of these, because it would only be used when both classes are calculated
|
||||
to give the same cost, but there is only one FPUL register.
|
||||
Besides, regclass fails to notice the different REGISTER_MOVE_COSTS
|
||||
applying to the actual instruction alternative considered. E.g., the
|
||||
y/r alternative of movsi_ie is considered to have no more cost that
|
||||
the r/r alternative, which is patently untrue. */
|
||||
|
||||
enum reg_class
|
||||
{
|
||||
|
@ -484,8 +501,8 @@ enum reg_class
|
|||
PR_REGS,
|
||||
T_REGS,
|
||||
MAC_REGS,
|
||||
GENERAL_REGS,
|
||||
FPUL_REGS,
|
||||
GENERAL_REGS,
|
||||
FP0_REGS,
|
||||
FP_REGS,
|
||||
GENERAL_FP_REGS,
|
||||
|
@ -503,8 +520,8 @@ enum reg_class
|
|||
"PR_REGS", \
|
||||
"T_REGS", \
|
||||
"MAC_REGS", \
|
||||
"GENERAL_REGS", \
|
||||
"FPUL_REGS", \
|
||||
"GENERAL_REGS", \
|
||||
"FP0_REGS", \
|
||||
"FP_REGS", \
|
||||
"GENERAL_FP_REGS", \
|
||||
|
@ -522,8 +539,8 @@ enum reg_class
|
|||
{ 0x00020000, 0x00000000 }, /* PR_REGS */ \
|
||||
{ 0x00040000, 0x00000000 }, /* T_REGS */ \
|
||||
{ 0x00300000, 0x00000000 }, /* MAC_REGS */ \
|
||||
{ 0x0081FFFF, 0x00000000 }, /* GENERAL_REGS */ \
|
||||
{ 0x00400000, 0x00000000 }, /* FPUL_REGS */ \
|
||||
{ 0x0081FFFF, 0x00000000 }, /* GENERAL_REGS */ \
|
||||
{ 0x01000000, 0x00000000 }, /* FP0_REGS */ \
|
||||
{ 0xFF000000, 0x000000FF }, /* FP_REGS */ \
|
||||
{ 0xFF81FFFF, 0x000000FF }, /* GENERAL_FP_REGS */ \
|
||||
|
@ -536,7 +553,7 @@ enum reg_class
|
|||
or could index an array. */
|
||||
|
||||
extern int regno_reg_class[];
|
||||
#define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO]
|
||||
#define REGNO_REG_CLASS(REGNO) regno_reg_class[(REGNO)]
|
||||
|
||||
/* When defined, the compiler allows registers explicitly used in the
|
||||
rtl to be used as spill registers but prevents the compiler from
|
||||
|
@ -545,9 +562,12 @@ extern int regno_reg_class[];
|
|||
#define SMALL_REGISTER_CLASSES 1
|
||||
|
||||
/* The order in which register should be allocated. */
|
||||
/* Sometimes FP0_REGS becomes the preferred class of a floating point pseudo,
|
||||
and GENERAL_FP_REGS the alternate class. Since FP0 is likely to be
|
||||
spilled or used otherwise, we better have the FP_REGS allocated first. */
|
||||
#define REG_ALLOC_ORDER \
|
||||
{ 1,2,3,7,6,5,4,0,8,9,10,11,12,13,14, \
|
||||
24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39, \
|
||||
{ 25,26,27,28,29,30,31,24,32,33,34,35,36,37,38,39, \
|
||||
1,2,3,7,6,5,4,0,8,9,10,11,12,13,14, \
|
||||
22,15,16,17,18,19,20,21,23 }
|
||||
|
||||
/* The class value for index registers, and the one for base regs. */
|
||||
|
@ -598,22 +618,30 @@ extern enum reg_class reg_class_from_letter[];
|
|||
In general this is just CLASS; but on some machines
|
||||
in some cases it is preferable to use a more restrictive class. */
|
||||
|
||||
#define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS
|
||||
#define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS)
|
||||
|
||||
/* ??? Should make FPUL register a nn-fixed register and make it's
|
||||
use explicit in the rtl; then change this definition here to
|
||||
... ? FPUL_REGS : NO_REGS) . */
|
||||
#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,X) \
|
||||
((((CLASS == FP_REGS || CLASS == FP0_REGS) \
|
||||
&& GET_CODE (X) == REG && REGNO (X) <= AP_REG) \
|
||||
|| (CLASS == GENERAL_REGS && GET_CODE (X) == REG \
|
||||
&& REGNO (X) <= FIRST_FP_REG && REGNO (X) >= LAST_FP_REG)) \
|
||||
? /* FPUL_REGS */ NO_REGS : NO_REGS)
|
||||
((((((CLASS) == FP_REGS || (CLASS) == FP0_REGS) \
|
||||
&& (GET_CODE (X) == REG && REGNO (X) <= AP_REG)) \
|
||||
|| (((CLASS) == GENERAL_REGS || (CLASS) == R0_REGS) \
|
||||
&& GET_CODE (X) == REG \
|
||||
&& REGNO (X) >= FIRST_FP_REG && REGNO (X) <= LAST_FP_REG)) \
|
||||
&& MODE == SFmode) \
|
||||
? FPUL_REGS \
|
||||
: ((CLASS) == FPUL_REGS \
|
||||
&& (GET_CODE (X) == MEM \
|
||||
|| GET_CODE (X) == REG && REGNO (X) >= FIRST_PSEUDO_REGISTER))\
|
||||
? GENERAL_REGS \
|
||||
: (((CLASS) == MAC_REGS || (CLASS) == PR_REGS) \
|
||||
&& GET_CODE (X) == REG && REGNO (X) > 15 \
|
||||
&& (CLASS) != REGNO_REG_CLASS (REGNO (X))) \
|
||||
? GENERAL_REGS : NO_REGS)
|
||||
|
||||
#define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,X) \
|
||||
(((CLASS == FP_REGS || CLASS == FP0_REGS) && immediate_operand (X, MODE)\
|
||||
&& ! (fp_one_operand (X) || fp_one_operand (X))) \
|
||||
? R0_REGS : SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,X))
|
||||
((((CLASS) == FP_REGS || (CLASS) == FP0_REGS) \
|
||||
&& immediate_operand ((X), (MODE)) \
|
||||
&& ! (fp_zero_operand (X) || fp_one_operand (X))) \
|
||||
? R0_REGS : SECONDARY_OUTPUT_RELOAD_CLASS((CLASS),(MODE),(X)))
|
||||
|
||||
/* Return the maximum number of consecutive registers
|
||||
needed to represent mode MODE in a register of class CLASS.
|
||||
|
@ -628,7 +656,9 @@ extern enum reg_class reg_class_from_letter[];
|
|||
These macros are used only in other macro definitions below. */
|
||||
|
||||
#define NPARM_REGS(MODE) \
|
||||
((TARGET_SH3E && ((MODE) == SFmode)) ? 8 : 4)
|
||||
(TARGET_SH3E && (MODE) == SFmode \
|
||||
? 8 \
|
||||
: 4)
|
||||
|
||||
#define FIRST_PARM_REG 4
|
||||
#define FIRST_RET_REG 0
|
||||
|
@ -652,7 +682,12 @@ extern enum reg_class reg_class_from_letter[];
|
|||
|
||||
/* If we generate an insn to push BYTES bytes,
|
||||
this says how many the stack pointer really advances by. */
|
||||
/* Don't define PUSH_ROUNDING, since the hardware doesn't do this.
|
||||
When PUSH_ROUNDING is not defined, PARM_BOUNDARY will cause gcc to
|
||||
do correct alignment. */
|
||||
#if 0
|
||||
#define PUSH_ROUNDING(NPUSHED) (((NPUSHED) + 3) & ~3)
|
||||
#endif
|
||||
|
||||
/* Offset of first parameter from the argument pointer register value. */
|
||||
#define FIRST_PARM_OFFSET(FNDECL) 0
|
||||
|
@ -691,7 +726,7 @@ extern enum reg_class reg_class_from_letter[];
|
|||
/* Define how to find the value returned by a library function
|
||||
assuming the value has mode MODE. */
|
||||
#define LIBCALL_VALUE(MODE) \
|
||||
gen_rtx (REG, MODE, BASE_RETURN_VALUE_REG (MODE));
|
||||
gen_rtx (REG, (MODE), BASE_RETURN_VALUE_REG (MODE));
|
||||
|
||||
/* 1 if N is a possible register number for a function value. */
|
||||
#define FUNCTION_VALUE_REGNO_P(REGNO) \
|
||||
|
@ -699,8 +734,8 @@ extern enum reg_class reg_class_from_letter[];
|
|||
|
||||
/* 1 if N is a possible register number for function argument passing. */
|
||||
#define FUNCTION_ARG_REGNO_P(REGNO) \
|
||||
(((REGNO) >= FIRST_PARM_REG && (REGNO) < (FIRST_PARM_REG + 4)) \
|
||||
|| (TARGET_SH3E \
|
||||
(((REGNO) >= FIRST_PARM_REG && (REGNO) < (FIRST_PARM_REG + 4)) \
|
||||
|| (TARGET_SH3E \
|
||||
&& (REGNO) >= FIRST_FP_PARM_REG && (REGNO) < (FIRST_FP_PARM_REG + 8)))
|
||||
|
||||
/* Define a data type for recording info about an argument list
|
||||
|
@ -725,7 +760,7 @@ struct sh_args {
|
|||
((TARGET_SH3E && ((MODE) == SFmode)) ? SH_ARG_FLOAT : SH_ARG_INT)
|
||||
|
||||
#define ROUND_ADVANCE(SIZE) \
|
||||
((SIZE + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
||||
(((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
||||
|
||||
/* Round a register number up to a proper boundary for an arg of mode
|
||||
MODE.
|
||||
|
@ -745,7 +780,7 @@ struct sh_args {
|
|||
For a library call, FNTYPE is 0.
|
||||
|
||||
On SH, the offset always starts at 0: the first parm reg is always
|
||||
the same reg. */
|
||||
the same reg for a given argument class. */
|
||||
|
||||
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
|
||||
do { \
|
||||
|
@ -792,9 +827,9 @@ struct sh_args {
|
|||
its data type forbids. */
|
||||
|
||||
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
|
||||
((PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \
|
||||
&& (NAMED || TARGET_SH3E)) \
|
||||
? gen_rtx (REG, (MODE), \
|
||||
((PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \
|
||||
&& ((NAMED) || TARGET_SH3E)) \
|
||||
? gen_rtx (REG, (MODE), \
|
||||
(BASE_ARG_REG (MODE) + ROUND_REG ((CUM), (MODE)))) \
|
||||
: 0)
|
||||
|
||||
|
@ -806,7 +841,7 @@ struct sh_args {
|
|||
|
||||
#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
|
||||
((PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \
|
||||
&& (NAMED || TARGET_SH3E) \
|
||||
&& ((NAMED) || TARGET_SH3E) \
|
||||
&& (ROUND_REG ((CUM), (MODE)) \
|
||||
+ (MODE != BLKmode \
|
||||
? ROUND_ADVANCE (GET_MODE_SIZE (MODE)) \
|
||||
|
@ -830,10 +865,10 @@ extern int current_function_anonymous_args;
|
|||
|
||||
#define FUNCTION_PROFILER(STREAM,LABELNO) \
|
||||
{ \
|
||||
fprintf(STREAM, " .align 2\n"); \
|
||||
fprintf(STREAM, " trapa #33\n"); \
|
||||
fprintf(STREAM, " .align 2\n"); \
|
||||
fprintf(STREAM, " .long LP%d\n", (LABELNO)); \
|
||||
fprintf((STREAM), "\t.align\t2\n"); \
|
||||
fprintf((STREAM), "\ttrapa\t#33\n"); \
|
||||
fprintf((STREAM), "\t.align\t2\n"); \
|
||||
asm_fprintf((STREAM), "\t.long\t%LLP%d\n", (LABELNO)); \
|
||||
}
|
||||
|
||||
/* Define this macro if the code for function profiling should come
|
||||
|
@ -852,33 +887,23 @@ extern int current_function_anonymous_args;
|
|||
/* Generate the assembly code for function exit
|
||||
Just dump out any accumulated constant table. */
|
||||
|
||||
#define FUNCTION_EPILOGUE(STREAM, SIZE) function_epilogue (STREAM, SIZE)
|
||||
|
||||
/* Output assembler code for a block containing the constant parts
|
||||
of a trampoline, leaving space for the variable parts.
|
||||
#define FUNCTION_EPILOGUE(STREAM, SIZE) function_epilogue ((STREAM), (SIZE))
|
||||
|
||||
/*
|
||||
On the SH, the trampoline looks like
|
||||
1 0000 D301 mov.l l1,r3
|
||||
2 0002 DD02 mov.l l2,r13
|
||||
1 0000 D301 mov.l l1,r3
|
||||
3 0004 4D2B jmp @r13
|
||||
4 0006 200B or r0,r0
|
||||
4 0006 0009 nop
|
||||
5 0008 00000000 l1: .long function
|
||||
6 000c 00000000 l2: .long area */
|
||||
#define TRAMPOLINE_TEMPLATE(FILE) \
|
||||
{ \
|
||||
fprintf ((FILE), " .word 0xd301\n"); \
|
||||
fprintf ((FILE), " .word 0xdd02\n"); \
|
||||
fprintf ((FILE), " .word 0x4d2b\n"); \
|
||||
fprintf ((FILE), " .word 0x200b\n"); \
|
||||
fprintf ((FILE), " .long 0\n"); \
|
||||
fprintf ((FILE), " .long 0\n"); \
|
||||
}
|
||||
|
||||
/* Length in units of the trampoline for entering a nested function. */
|
||||
#define TRAMPOLINE_SIZE 16
|
||||
|
||||
/* Alignment required for a trampoline in units. */
|
||||
#define TRAMPOLINE_ALIGN 4
|
||||
/* Alignment required for a trampoline in bits . */
|
||||
#define TRAMPOLINE_ALIGNMENT \
|
||||
((CACHE_LOG < 3 || TARGET_SMALLCODE) ? 32 : 64) \
|
||||
|
||||
/* Emit RTL insns to initialize the variable parts of a trampoline.
|
||||
FNADDR is an RTX for the address of the function's pure code.
|
||||
|
@ -886,6 +911,10 @@ extern int current_function_anonymous_args;
|
|||
|
||||
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
|
||||
{ \
|
||||
emit_move_insn (gen_rtx (MEM, SImode, (TRAMP)), \
|
||||
GEN_INT (TARGET_LITTLE_ENDIAN ? 0xd301dd02 : 0xdd02d301));\
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 4)), \
|
||||
GEN_INT (TARGET_LITTLE_ENDIAN ? 0x00094d2b : 0x4d2b0009));\
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \
|
||||
(CXT)); \
|
||||
emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 12)), \
|
||||
|
@ -898,7 +927,7 @@ extern int current_function_anonymous_args;
|
|||
can ignore COUNT. */
|
||||
|
||||
#define RETURN_ADDR_RTX(COUNT, FRAME) \
|
||||
((COUNT == 0) \
|
||||
(((COUNT) == 0) \
|
||||
? gen_rtx (MEM, Pmode, gen_rtx (REG, Pmode, RETURN_ADDRESS_POINTER_REGNUM)) \
|
||||
: (rtx) 0)
|
||||
|
||||
|
@ -978,18 +1007,18 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
|
||||
/* Nonzero if X/OFFSET is a hard reg that can be used as an index. */
|
||||
#define SUBREG_OK_FOR_INDEX_P(X, OFFSET) \
|
||||
(REGNO_OK_FOR_INDEX_P (REGNO (X)) && OFFSET == 0)
|
||||
(REGNO_OK_FOR_INDEX_P (REGNO (X)) && (OFFSET) == 0)
|
||||
|
||||
#endif
|
||||
|
||||
/* The 'Q' constraint is a pc relative load operand. */
|
||||
#define EXTRA_CONSTRAINT_Q(OP) \
|
||||
(GET_CODE (OP) == MEM && \
|
||||
((GET_CODE (XEXP (OP, 0)) == LABEL_REF) \
|
||||
|| (GET_CODE (XEXP (OP, 0)) == CONST \
|
||||
&& GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \
|
||||
&& GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == LABEL_REF \
|
||||
&& GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT)))
|
||||
((GET_CODE (XEXP ((OP), 0)) == LABEL_REF) \
|
||||
|| (GET_CODE (XEXP ((OP), 0)) == CONST \
|
||||
&& GET_CODE (XEXP (XEXP ((OP), 0), 0)) == PLUS \
|
||||
&& GET_CODE (XEXP (XEXP (XEXP ((OP), 0), 0), 0)) == LABEL_REF \
|
||||
&& GET_CODE (XEXP (XEXP (XEXP ((OP), 0), 0), 1)) == CONST_INT)))
|
||||
|
||||
#define EXTRA_CONSTRAINT(OP, C) \
|
||||
((C) == 'Q' ? EXTRA_CONSTRAINT_Q (OP) \
|
||||
|
@ -1004,7 +1033,7 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
|
||||
#define MODE_DISP_OK_4(X,MODE) \
|
||||
(GET_MODE_SIZE (MODE) == 4 && (unsigned) INTVAL (X) < 64 \
|
||||
&& ! (INTVAL (X) & 3) && ! (TARGET_SH3E && MODE == SFmode))
|
||||
&& ! (INTVAL (X) & 3) && ! (TARGET_SH3E && (MODE) == SFmode))
|
||||
#define MODE_DISP_OK_8(X,MODE) ((GET_MODE_SIZE(MODE)==8) && ((unsigned)INTVAL(X)<60) && (!(INTVAL(X) &3)))
|
||||
|
||||
#define BASE_REGISTER_RTX_P(X) \
|
||||
|
@ -1048,8 +1077,8 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
do { \
|
||||
if (GET_CODE (OP) == CONST_INT) \
|
||||
{ \
|
||||
if (MODE_DISP_OK_4 (OP, MODE)) goto LABEL; \
|
||||
if (MODE_DISP_OK_8 (OP, MODE)) goto LABEL; \
|
||||
if (MODE_DISP_OK_4 ((OP), (MODE))) goto LABEL; \
|
||||
if (MODE_DISP_OK_8 ((OP), (MODE))) goto LABEL; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
|
@ -1058,14 +1087,14 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
if (BASE_REGISTER_RTX_P (X)) \
|
||||
goto LABEL; \
|
||||
else if ((GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC) \
|
||||
&& BASE_REGISTER_RTX_P (XEXP (X, 0))) \
|
||||
&& BASE_REGISTER_RTX_P (XEXP ((X), 0))) \
|
||||
goto LABEL; \
|
||||
else if (GET_CODE (X) == PLUS) \
|
||||
else if (GET_CODE (X) == PLUS && MODE != PSImode) \
|
||||
{ \
|
||||
rtx xop0 = XEXP (X, 0); \
|
||||
rtx xop1 = XEXP (X, 1); \
|
||||
rtx xop0 = XEXP ((X), 0); \
|
||||
rtx xop1 = XEXP ((X), 1); \
|
||||
if (GET_MODE_SIZE (MODE) <= 8 && BASE_REGISTER_RTX_P (xop0)) \
|
||||
GO_IF_LEGITIMATE_INDEX (MODE, xop1, LABEL); \
|
||||
GO_IF_LEGITIMATE_INDEX ((MODE), xop1, LABEL); \
|
||||
if (GET_MODE_SIZE (MODE) <= 4) \
|
||||
{ \
|
||||
if (BASE_REGISTER_RTX_P (xop1) && INDEX_REGISTER_RTX_P (xop0))\
|
||||
|
@ -1098,15 +1127,15 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
if (GET_CODE (X) == PLUS \
|
||||
&& (GET_MODE_SIZE (MODE) == 4 \
|
||||
|| GET_MODE_SIZE (MODE) == 8) \
|
||||
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
|
||||
&& BASE_REGISTER_RTX_P (XEXP (X, 0)) \
|
||||
&& ! (TARGET_SH3E && MODE == SFmode)) \
|
||||
&& GET_CODE (XEXP ((X), 1)) == CONST_INT \
|
||||
&& BASE_REGISTER_RTX_P (XEXP ((X), 0)) \
|
||||
&& ! (TARGET_SH3E && (MODE) == SFmode)) \
|
||||
{ \
|
||||
rtx index_rtx = XEXP (X, 1); \
|
||||
rtx index_rtx = XEXP ((X), 1); \
|
||||
HOST_WIDE_INT offset = INTVAL (index_rtx), offset_base; \
|
||||
rtx sum; \
|
||||
\
|
||||
GO_IF_LEGITIMATE_INDEX (MODE, index_rtx, WIN); \
|
||||
GO_IF_LEGITIMATE_INDEX ((MODE), index_rtx, WIN); \
|
||||
/* On rare occasions, we might get an unaligned pointer \
|
||||
that is indexed in a way to give an aligned address. \
|
||||
Therefore, keep the lower two bits in offset_base. */ \
|
||||
|
@ -1124,7 +1153,7 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
prevalent. */ \
|
||||
if (GET_MODE_SIZE (MODE) + offset - offset_base <= 64) \
|
||||
{ \
|
||||
sum = expand_binop (Pmode, add_optab, XEXP (X, 0), \
|
||||
sum = expand_binop (Pmode, add_optab, XEXP ((X), 0), \
|
||||
GEN_INT (offset_base), NULL_RTX, 0, \
|
||||
OPTAB_LIB_WIDEN); \
|
||||
\
|
||||
|
@ -1135,7 +1164,13 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
}
|
||||
|
||||
/* Go to LABEL if ADDR (a legitimate address expression)
|
||||
has an effect that depends on the machine mode it is used for. */
|
||||
has an effect that depends on the machine mode it is used for.
|
||||
|
||||
??? Strictly speaking, we should also include all indexed addressing,
|
||||
because the index scale factor is the length of the operand.
|
||||
However, the impact of GO_IF_MODE_DEPENDENT_ADDRESS would be to
|
||||
high if we did that. So we rely on reload to fix things up. */
|
||||
|
||||
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
|
||||
{ \
|
||||
if (GET_CODE(ADDR) == PRE_DEC || GET_CODE(ADDR) == POST_INC) \
|
||||
|
@ -1207,14 +1242,11 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
that the native compiler puts too large (> 32) immediate shift counts
|
||||
into a register and shifts by the register, letting the SH decide what
|
||||
to do instead of doing that itself. */
|
||||
/* ??? This is defined, but the library routines in lib1funcs.asm do not
|
||||
truncate the shift count. This may result in incorrect results for
|
||||
unusual cases. Truncating the shift counts in the library routines would
|
||||
make them faster. However, the SH3 has hardware shifts that do not
|
||||
truncate, so it appears that we need to leave this undefined for correct
|
||||
SH3 code. We can still using truncation in the library routines though to
|
||||
make them faster. */
|
||||
#define SHIFT_COUNT_TRUNCATED 1
|
||||
/* ??? The library routines in lib1funcs.asm truncate the shift count.
|
||||
However, the SH3 has hardware shifts that do not truncate exactly as gcc
|
||||
expects - the sign bit is significant - so it appears that we need to
|
||||
leave this zero for correct SH3 code. */
|
||||
#define SHIFT_COUNT_TRUNCATED (! TARGET_SH3)
|
||||
|
||||
/* All integers have the same format so truncation is easy. */
|
||||
#define TRULY_NOOP_TRUNCATION(OUTPREC,INPREC) 1
|
||||
|
@ -1241,7 +1273,7 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
return 0; \
|
||||
else if (CONST_OK_FOR_I (INTVAL (RTX))) \
|
||||
return 1; \
|
||||
else if ((OUTER_CODE == AND || OUTER_CODE == IOR || OUTER_CODE == XOR) \
|
||||
else if (((OUTER_CODE) == AND || (OUTER_CODE) == IOR || (OUTER_CODE) == XOR) \
|
||||
&& CONST_OK_FOR_L (INTVAL (RTX))) \
|
||||
return 1; \
|
||||
else \
|
||||
|
@ -1307,15 +1339,12 @@ extern struct rtx_def *sh_builtin_saveregs ();
|
|||
#define ADDRESS_COST(RTX) 1
|
||||
|
||||
/* Compute extra cost of moving data between one register class
|
||||
and another.
|
||||
|
||||
On the SH it is hard to move into the T reg, but simple to load
|
||||
from it. */
|
||||
and another. */
|
||||
|
||||
#define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \
|
||||
(((DSTCLASS == T_REGS) || (DSTCLASS == PR_REG)) ? 10 \
|
||||
: ((DSTCLASS == FP_REGS && SRCCLASS == GENERAL_REGS) \
|
||||
|| (DSTCLASS == GENERAL_REGS && SRCCLASS == FP_REGS)) ? 4 \
|
||||
((DSTCLASS) == PR_REG ? 10 \
|
||||
: (((DSTCLASS) == FP_REGS && (SRCCLASS) == GENERAL_REGS) \
|
||||
|| ((DSTCLASS) == GENERAL_REGS && (SRCCLASS) == FP_REGS)) ? 4 \
|
||||
: 1)
|
||||
|
||||
/* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option? This
|
||||
|
@ -1381,10 +1410,10 @@ dtors_section() \
|
|||
do { fprintf (FILE, ".section\t%s\n", NAME); } while (0)
|
||||
|
||||
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
|
||||
do { ctors_section(); fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0)
|
||||
do { ctors_section(); asm_fprintf((FILE),"\t.long\t%U%s\n", (NAME)); } while (0)
|
||||
|
||||
#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
|
||||
do { dtors_section(); fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0)
|
||||
do { dtors_section(); asm_fprintf((FILE),"\t.long\t%U%s\n", (NAME)); } while (0)
|
||||
|
||||
#undef DO_GLOBAL_CTORS_BODY
|
||||
|
||||
|
@ -1414,10 +1443,10 @@ dtors_section() \
|
|||
}
|
||||
|
||||
#define ASM_OUTPUT_REG_PUSH(file, v) \
|
||||
fprintf (file, "\tmov.l r%s,-@r15\n", v);
|
||||
fprintf ((file), "\tmov.l\tr%s,-@r15\n", (v));
|
||||
|
||||
#define ASM_OUTPUT_REG_POP(file, v) \
|
||||
fprintf (file, "\tmov.l @r15+,r%s\n", v);
|
||||
fprintf ((file), "\tmov.l\t@r15+,r%s\n", (v));
|
||||
|
||||
/* The assembler's names for the registers. RFP need not always be used as
|
||||
the Real framepointer; it can also be used as a normal general register.
|
||||
|
@ -1440,7 +1469,7 @@ dtors_section() \
|
|||
|
||||
/* Output a label definition. */
|
||||
#define ASM_OUTPUT_LABEL(FILE,NAME) \
|
||||
do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
|
||||
do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
|
||||
|
||||
/* This is how to output an assembler line
|
||||
that says to advance the location counter
|
||||
|
@ -1448,29 +1477,33 @@ dtors_section() \
|
|||
|
||||
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
if ((LOG) != 0) \
|
||||
fprintf (FILE, "\t.align %d\n", LOG)
|
||||
fprintf ((FILE), "\t.align %d\n", (LOG))
|
||||
|
||||
/* Output a function label definition. */
|
||||
#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
|
||||
ASM_OUTPUT_LABEL(STREAM, NAME)
|
||||
ASM_OUTPUT_LABEL((STREAM), (NAME))
|
||||
|
||||
/* Output a globalising directive for a label. */
|
||||
#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
|
||||
(fprintf (STREAM, "\t.global\t"), \
|
||||
assemble_name (STREAM, NAME), \
|
||||
fputc ('\n',STREAM))
|
||||
(fprintf ((STREAM), "\t.global\t"), \
|
||||
assemble_name ((STREAM), (NAME)), \
|
||||
fputc ('\n', (STREAM)))
|
||||
|
||||
/* The prefix to add to user-visible assembler symbols. */
|
||||
|
||||
#define USER_LABEL_PREFIX "_"
|
||||
|
||||
/* The prefix to add to an internally generated label. */
|
||||
|
||||
#define LOCAL_LABEL_PREFIX ""
|
||||
|
||||
/* Make an internal label into a string. */
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
|
||||
sprintf (STRING, "*%s%d", PREFIX, NUM)
|
||||
sprintf ((STRING), "*%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUM))
|
||||
|
||||
/* Output an internal label definition. */
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
||||
fprintf (FILE, "%s%d:\n", PREFIX, NUM)
|
||||
asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
|
||||
|
||||
/* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE) */
|
||||
|
||||
|
@ -1481,23 +1514,31 @@ dtors_section() \
|
|||
|
||||
/* Jump tables must be 32 bit aligned, no matter the size of the element. */
|
||||
#define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \
|
||||
fprintf (STREAM, "\t.align 2\n%s%d:\n", PREFIX, NUM);
|
||||
fprintf ((STREAM), "\t.align 2\n%s%d:\n", (PREFIX), (NUM));
|
||||
|
||||
/* Output a relative address table. */
|
||||
|
||||
#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,VALUE,REL) \
|
||||
if (TARGET_BIGTABLE) \
|
||||
fprintf (STREAM, "\t.long L%d-L%d\n", VALUE,REL); \
|
||||
else \
|
||||
fprintf (STREAM, "\t.word L%d-L%d\n", VALUE,REL); \
|
||||
switch (sh_addr_diff_vec_mode) \
|
||||
{ \
|
||||
case SImode: \
|
||||
asm_fprintf ((STREAM), "\t.long\t%LL%d-%LL%d\n", (VALUE),(REL)); \
|
||||
break; \
|
||||
case HImode: \
|
||||
asm_fprintf ((STREAM), "\t.word\t%LL%d-%LL%d\n", (VALUE),(REL)); \
|
||||
break; \
|
||||
case QImode: \
|
||||
asm_fprintf ((STREAM), "\t.byte\t%LL%d-%LL%d\n", (VALUE),(REL)); \
|
||||
break; \
|
||||
}
|
||||
|
||||
/* Output an absolute table element. */
|
||||
|
||||
#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \
|
||||
if (TARGET_BIGTABLE) \
|
||||
fprintf (STREAM, "\t.long L%d\n", VALUE); \
|
||||
asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \
|
||||
else \
|
||||
fprintf (STREAM, "\t.word L%d\n", VALUE); \
|
||||
asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); \
|
||||
|
||||
/* Output various types of constants. */
|
||||
|
||||
|
@ -1506,50 +1547,46 @@ dtors_section() \
|
|||
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
|
||||
do { char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
|
||||
fprintf (FILE, "\t.double %s\n", dstr); \
|
||||
fprintf ((FILE), "\t.double %s\n", dstr); \
|
||||
} while (0)
|
||||
|
||||
/* This is how to output an assembler line defining a `float' constant. */
|
||||
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
|
||||
do { char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
|
||||
fprintf (FILE, "\t.float %s\n", dstr); \
|
||||
fprintf ((FILE), "\t.float %s\n", dstr); \
|
||||
} while (0)
|
||||
|
||||
#define ASM_OUTPUT_INT(STREAM, EXP) \
|
||||
(fprintf (STREAM, "\t.long\t"), \
|
||||
output_addr_const (STREAM, (EXP)), \
|
||||
fputc ('\n', STREAM))
|
||||
#define ASM_OUTPUT_INT(STREAM, EXP) \
|
||||
(fprintf ((STREAM), "\t.long\t"), \
|
||||
output_addr_const ((STREAM), (EXP)), \
|
||||
fputc ('\n', (STREAM)))
|
||||
|
||||
#define ASM_OUTPUT_SHORT(STREAM, EXP) \
|
||||
(fprintf (STREAM, "\t.short\t"), \
|
||||
output_addr_const (STREAM, (EXP)), \
|
||||
fputc ('\n', STREAM))
|
||||
(fprintf ((STREAM), "\t.short\t"), \
|
||||
output_addr_const ((STREAM), (EXP)), \
|
||||
fputc ('\n', (STREAM)))
|
||||
|
||||
#define ASM_OUTPUT_CHAR(STREAM, EXP) \
|
||||
(fprintf (STREAM, "\t.byte\t"), \
|
||||
output_addr_const (STREAM, (EXP)), \
|
||||
fputc ('\n', STREAM))
|
||||
#define ASM_OUTPUT_CHAR(STREAM, EXP) \
|
||||
(fprintf ((STREAM), "\t.byte\t"), \
|
||||
output_addr_const ((STREAM), (EXP)), \
|
||||
fputc ('\n', (STREAM)))
|
||||
|
||||
#define ASM_OUTPUT_BYTE(STREAM, VALUE) \
|
||||
fprintf (STREAM, "\t.byte\t%d\n", VALUE) \
|
||||
fprintf ((STREAM), "\t.byte\t%d\n", (VALUE)) \
|
||||
|
||||
/* Align loops and labels after unconditional branches to get faster
|
||||
code. */
|
||||
/* The next two are used for debug info when compiling with -gdwarf. */
|
||||
#define UNALIGNED_SHORT_ASM_OP ".uaword"
|
||||
#define UNALIGNED_INT_ASM_OP ".ualong"
|
||||
|
||||
#define ASM_OUTPUT_LOOP_ALIGN(FILE) \
|
||||
if (! TARGET_SMALLCODE) \
|
||||
ASM_OUTPUT_ALIGN ((FILE), 2)
|
||||
|
||||
#define ASM_OUTPUT_ALIGN_CODE(FILE) \
|
||||
if (! TARGET_SMALLCODE) \
|
||||
ASM_OUTPUT_ALIGN ((FILE), (TARGET_SH3 || TARGET_SH3E) ? 4 : 2)
|
||||
/* Loop alignment is now done in machine_dependent_reorg, so that
|
||||
branch shortening can know about it. */
|
||||
|
||||
/* This is how to output an assembler line
|
||||
that says to advance the location counter by SIZE bytes. */
|
||||
|
||||
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
||||
fprintf (FILE, "\t.space %d\n", (SIZE))
|
||||
fprintf ((FILE), "\t.space %d\n", (SIZE))
|
||||
|
||||
/* This says how to output an assembler line
|
||||
to define a global common symbol. */
|
||||
|
@ -1562,7 +1599,7 @@ do { char dstr[30]; \
|
|||
/* This says how to output an assembler line
|
||||
to define a local common symbol. */
|
||||
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs ("\t.lcomm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%d\n", (SIZE)))
|
||||
|
@ -1580,23 +1617,33 @@ do { char dstr[30]; \
|
|||
#define TARGET_FF 014
|
||||
#define TARGET_CR 015
|
||||
|
||||
/* Only perform branch elimination (by making instructions conditional) if
|
||||
we're optimizing. Otherwise it's of no use anyway. */
|
||||
/* A C statement to be executed just prior to the output of
|
||||
assembler code for INSN, to modify the extracted operands so
|
||||
they will be output differently.
|
||||
|
||||
Here the argument OPVEC is the vector containing the operands
|
||||
extracted from INSN, and NOPERANDS is the number of elements of
|
||||
the vector which contain meaningful data for this insn.
|
||||
The contents of this vector are what will be used to convert the insn
|
||||
template into assembler code, so you can change the assembler output
|
||||
by changing the contents of the vector. */
|
||||
|
||||
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
|
||||
final_prescan_insn (INSN, OPVEC, NOPERANDS)
|
||||
final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
|
||||
|
||||
/* Print operand X (an rtx) in assembler syntax to file FILE.
|
||||
CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
|
||||
For `%' followed by punctuation, CODE is the punctuation and X is null. */
|
||||
|
||||
#define PRINT_OPERAND(STREAM, X, CODE) print_operand (STREAM, X, CODE)
|
||||
#define PRINT_OPERAND(STREAM, X, CODE) print_operand ((STREAM), (X), (CODE))
|
||||
|
||||
/* Print a memory address as an operand to reference that memory location. */
|
||||
|
||||
#define PRINT_OPERAND_ADDRESS(STREAM,X) print_operand_address (STREAM, X)
|
||||
#define PRINT_OPERAND_ADDRESS(STREAM,X) print_operand_address ((STREAM), (X))
|
||||
|
||||
#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
|
||||
((CHAR)=='.' || (CHAR) == '#' || (CHAR)=='@')
|
||||
((CHAR) == '.' || (CHAR) == '#' || (CHAR) == '@' || (CHAR) == ',' \
|
||||
|| (CHAR) == '$')
|
||||
|
||||
extern struct rtx_def *sh_compare_op0;
|
||||
extern struct rtx_def *sh_compare_op1;
|
||||
|
@ -1606,7 +1653,6 @@ extern struct rtx_def *prepare_scc_operands();
|
|||
match exactly the cpu attribute in the sh.md file. */
|
||||
|
||||
enum processor_type {
|
||||
PROCESSOR_SH0,
|
||||
PROCESSOR_SH1,
|
||||
PROCESSOR_SH2,
|
||||
PROCESSOR_SH3,
|
||||
|
@ -1616,15 +1662,39 @@ enum processor_type {
|
|||
#define sh_cpu_attr ((enum attr_cpu)sh_cpu)
|
||||
extern enum processor_type sh_cpu;
|
||||
|
||||
extern enum machine_mode sh_addr_diff_vec_mode;
|
||||
|
||||
extern int optimize; /* needed for gen_casesi, and addr_diff_vec_adjust. */
|
||||
|
||||
/* Declare functions defined in sh.c and used in templates. */
|
||||
|
||||
extern char *output_branch();
|
||||
extern char *output_ieee_ccmpeq();
|
||||
extern char *output_branchy_insn();
|
||||
extern char *output_shift();
|
||||
extern char *output_movedouble();
|
||||
extern char *output_movepcrel();
|
||||
extern char *output_jump_label_table();
|
||||
extern char *output_far_jump();
|
||||
|
||||
enum mdep_reorg_phase_e
|
||||
{
|
||||
SH_BEFORE_MDEP_REORG,
|
||||
SH_INSERT_USES_LABELS,
|
||||
SH_SHORTEN_BRANCHES0,
|
||||
SH_FIXUP_PCLOAD,
|
||||
SH_SHORTEN_BRANCHES1,
|
||||
SH_AFTER_MDEP_REORG
|
||||
};
|
||||
|
||||
void machine_dependent_reorg ();
|
||||
int short_cbranch_p ();
|
||||
int med_branch_p ();
|
||||
int braf_branch_p ();
|
||||
int align_length ();
|
||||
int addr_diff_vec_adjust ();
|
||||
struct rtx_def *sfunc_uses_reg ();
|
||||
|
||||
#define MACHINE_DEPENDENT_REORG(X) machine_dependent_reorg(X)
|
||||
|
||||
/* Generate calls to memcpy, memcmp and memset. */
|
||||
|
@ -1637,7 +1707,7 @@ extern char *output_far_jump();
|
|||
text can be read. CH is the first character after the #pragma. The
|
||||
result of the expression is the terminating character found
|
||||
(newline or EOF). */
|
||||
#define HANDLE_PRAGMA(FILE, NODE) handle_pragma (FILE, NODE)
|
||||
#define HANDLE_PRAGMA(FILE, NODE) handle_pragma ((FILE), (NODE))
|
||||
|
||||
/* Set when processing a function with pragma interrupt turned on. */
|
||||
|
||||
|
@ -1666,58 +1736,42 @@ sh_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
|||
|
||||
#define ADJUST_INSN_LENGTH(X, LENGTH) \
|
||||
if (((GET_CODE (X) == INSN \
|
||||
&& GET_CODE (PATTERN (X)) != SEQUENCE \
|
||||
&& GET_CODE (PATTERN (X)) != USE \
|
||||
&& GET_CODE (PATTERN (X)) != CLOBBER) \
|
||||
|| GET_CODE (X) == CALL_INSN \
|
||||
|| (GET_CODE (X) == JUMP_INSN \
|
||||
&& GET_CODE (PATTERN (X)) != ADDR_DIFF_VEC \
|
||||
&& GET_CODE (PATTERN (X)) != ADDR_VEC)) \
|
||||
&& GET_CODE (PATTERN (NEXT_INSN (PREV_INSN (X)))) != SEQUENCE \
|
||||
&& get_attr_needs_delay_slot (X) == NEEDS_DELAY_SLOT_YES) \
|
||||
LENGTH += 2; \
|
||||
if (! TARGET_SMALLCODE) \
|
||||
{ \
|
||||
/* After the folowing loop, PAD will be an upper bound \
|
||||
for the number of padding bytes the alignment will \
|
||||
require. */ \
|
||||
rtx aip; \
|
||||
int pad = 0; \
|
||||
for (aip = PREV_INSN (X); aip; aip = PREV_INSN (aip)) \
|
||||
{ \
|
||||
if (GET_CODE (aip) == BARRIER) \
|
||||
{ \
|
||||
if (TARGET_SH3 || TARGET_SH3E) \
|
||||
pad = 14; \
|
||||
else \
|
||||
pad = 2; \
|
||||
break; \
|
||||
} \
|
||||
else if ((GET_CODE (aip) == NOTE \
|
||||
&& NOTE_LINE_NUMBER (aip) == NOTE_INSN_LOOP_BEG)) \
|
||||
{ \
|
||||
pad = 2; \
|
||||
/* Don't break here, because there might be a \
|
||||
preceding BARRIER, which requires mores \
|
||||
alignment for SH3[E] . */ \
|
||||
} \
|
||||
else if (GET_CODE (aip) != NOTE \
|
||||
&& GET_CODE (aip) != CODE_LABEL) \
|
||||
break; \
|
||||
} \
|
||||
LENGTH += pad; \
|
||||
}
|
||||
(LENGTH) += 2; \
|
||||
if (GET_CODE (X) == INSN \
|
||||
&& GET_CODE (PATTERN (X)) == UNSPEC_VOLATILE \
|
||||
&& XINT (PATTERN (X), 1) == 7) \
|
||||
(LENGTH) -= addr_diff_vec_adjust (X, LENGTH); \
|
||||
if (GET_CODE (X) == INSN \
|
||||
&& GET_CODE (PATTERN (X)) == UNSPEC_VOLATILE \
|
||||
&& XINT (PATTERN (X), 1) == 1) \
|
||||
(LENGTH) = align_length (X); \
|
||||
if (GET_CODE (X) == JUMP_INSN \
|
||||
&& GET_CODE (PATTERN (X)) == ADDR_DIFF_VEC) \
|
||||
/* The code before an ADDR_DIFF_VEC is even aligned, thus \
|
||||
any odd estimate is wrong. */ \
|
||||
(LENGTH) &= ~1;
|
||||
|
||||
/* Enable a bug fix for the shorten_branches pass. */
|
||||
#define SHORTEN_WITH_ADJUST_INSN_LENGTH
|
||||
|
||||
/* Define the codes that are matched by predicates in sh.c. */
|
||||
#define PREDICATE_CODES \
|
||||
{"arith_reg_operand", {SUBREG, REG}}, \
|
||||
{"arith_operand", {SUBREG, REG, CONST_INT}}, \
|
||||
{"arith_reg_operand", {SUBREG, REG}}, \
|
||||
{"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \
|
||||
{"logical_operand", {SUBREG, REG, CONST_INT}}, \
|
||||
{"braf_label_ref_operand", {LABEL_REF}}, \
|
||||
{"general_movsrc_operand", {SUBREG, REG, CONST_INT, MEM}}, \
|
||||
{"general_movdst_operand", {SUBREG, REG, CONST_INT, MEM}},
|
||||
{"general_movdst_operand", {SUBREG, REG, CONST_INT, MEM}}, \
|
||||
{"logical_operand", {SUBREG, REG, CONST_INT}}, \
|
||||
{"register_operand", {SUBREG, REG}},
|
||||
|
||||
/* Define this macro if it is advisable to hold scalars in registers
|
||||
in a wider mode than that declared by the program. In such cases,
|
||||
|
@ -1731,7 +1785,7 @@ sh_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
|||
#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \
|
||||
if (GET_MODE_CLASS (MODE) == MODE_INT \
|
||||
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
|
||||
MODE = SImode;
|
||||
(MODE) = SImode;
|
||||
|
||||
/* Defining PROMOTE_FUNCTION_ARGS eliminates some unnecessary zero/sign
|
||||
extensions applied to char/short functions arguments. Defining
|
||||
|
@ -1753,11 +1807,10 @@ sh_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
|||
the scheduler that an output- or anti-dependence does not incur
|
||||
the same cost as a data-dependence. */
|
||||
|
||||
/* ??? Should anticipate the effect of delayed branch scheduling
|
||||
and arrange for a second instruction to be put between the
|
||||
load of the function's address and the call. */
|
||||
|
||||
#define ADJUST_COST(insn,link,dep_insn,cost) \
|
||||
do { \
|
||||
rtx reg; \
|
||||
\
|
||||
if (GET_CODE(insn) == CALL_INSN) \
|
||||
{ \
|
||||
/* The only input for a call that is timing-critical is the \
|
||||
|
@ -1768,14 +1821,32 @@ sh_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
|||
call = XVECEXP (call, 0 ,0); \
|
||||
if (GET_CODE (call) == SET) \
|
||||
call = SET_SRC (call); \
|
||||
if (GET_CODE (call) == CALL && GET_CODE (XEXP (call, 0)) == MEM) \
|
||||
{ \
|
||||
rtx set = single_set (dep_insn); \
|
||||
\
|
||||
if (set && ! rtx_equal_p (SET_DEST (set), XEXP (XEXP (call, 0), 0)))\
|
||||
(cost) = 0; \
|
||||
} \
|
||||
}
|
||||
if (GET_CODE (call) == CALL && GET_CODE (XEXP (call, 0)) == MEM \
|
||||
&& ! reg_set_p (XEXP (XEXP (call, 0), 0), dep_insn)) \
|
||||
(cost) = 0; \
|
||||
} \
|
||||
/* All sfunc calls are parallels with at least four components. \
|
||||
Exploit this to avoid unnecessary calls to sfunc_uses_reg. */ \
|
||||
else if (GET_CODE (PATTERN (insn)) == PARALLEL \
|
||||
&& XVECLEN (PATTERN (insn), 0) >= 4 \
|
||||
&& (reg = sfunc_uses_reg (insn))) \
|
||||
{ \
|
||||
/* Likewise, the most timing critical input for an sfuncs call \
|
||||
is the function address. However, sfuncs typically start \
|
||||
using their arguments pretty quickly. \
|
||||
Assume a four cycle delay before they are needed. */ \
|
||||
if (! reg_set_p (reg, dep_insn)) \
|
||||
cost -= 4; \
|
||||
} \
|
||||
/* Adjust load_si / pcload_si type insns latency. Use the known \
|
||||
nominal latency and form of the insn to speed up the check. */ \
|
||||
else if (cost == 3 \
|
||||
&& GET_CODE (PATTERN (dep_insn)) == SET \
|
||||
/* Latency for dmpy type insns is also 3, so check the that \
|
||||
it's actually a move insn. */ \
|
||||
&& general_movsrc_operand (SET_SRC (PATTERN (dep_insn)), SImode))\
|
||||
cost = 2; \
|
||||
} while (0) \
|
||||
|
||||
/* Since the SH architecture lacks negative address offsets,
|
||||
the givs should be sorted smallest to largest so combine_givs
|
||||
|
@ -1787,3 +1858,5 @@ sh_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
|
|||
|
||||
/* For the sake of libgcc2.c, indicate target supports atexit. */
|
||||
#define HAVE_ATEXIT
|
||||
|
||||
#define SH_DYNAMIC_SHIFT_COST (TARGET_SH3 ? (TARGET_SMALLCODE ? 1 : 2) : 20)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
|
||||
Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ron Guilmette (rfg@netcom.com).
|
||||
Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
|
||||
|
||||
|
@ -174,3 +174,8 @@ Boston, MA 02111-1307, USA. */
|
|||
/* Define for support of TFmode long double and REAL_ARITHMETIC.
|
||||
Sparc ABI says that long double is 4 words. */
|
||||
#define LONG_DOUBLE_TYPE_SIZE 128
|
||||
|
||||
/* But indicate that it isn't supported by the hardware. */
|
||||
#define WIDEST_HARDWARE_FP_SIZE 64
|
||||
|
||||
#define STDC_0_IN_SYSTEM_HEADERS
|
||||
|
|
|
@ -21,8 +21,8 @@ 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. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "regs.h"
|
||||
|
@ -102,6 +102,10 @@ static int frame_base_offset;
|
|||
|
||||
static rtx find_addr_reg ();
|
||||
static void sparc_init_modes ();
|
||||
|
||||
#ifdef DWARF2_DEBUGGING_INFO
|
||||
extern char *dwarf2out_cfi_label ();
|
||||
#endif
|
||||
|
||||
/* Option handling. */
|
||||
|
||||
|
|
|
@ -1519,15 +1519,15 @@
|
|||
|
||||
(define_insn "pic_lo_sum_di"
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(lo_sum:SI (match_operand:DI 1 "register_operand" "r")
|
||||
(unspec:SI [(match_operand:DI 2 "immediate_operand" "in")] 0)))]
|
||||
(lo_sum:SI (match_operand:DI 1 "register_operand" "r")
|
||||
(unspec:SI [(match_operand:DI 2 "immediate_operand" "in")] 0)))]
|
||||
"TARGET_ARCH64 && flag_pic"
|
||||
"add %1,%%lo(%a2),%0"
|
||||
[(set_attr "length" "1")])
|
||||
|
||||
(define_insn "pic_sethi_di"
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(high:SI (unspec:SI [(match_operand 1 "" "")] 0)))]
|
||||
(high:SI (unspec:SI [(match_operand 1 "" "")] 0)))]
|
||||
"TARGET_ARCH64 && flag_pic && check_pic (1)"
|
||||
"sethi %%hi(%a1),%0"
|
||||
[(set_attr "type" "move")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Target definitions for GNU compiler for Sparc running System V.4
|
||||
Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
Written by Ron Guilmette (rfg@netcom.com).
|
||||
|
||||
|
|
|
@ -771,13 +771,212 @@ test "$host_alias" != "$target_alias" &&
|
|||
program_prefix=${target_alias}-
|
||||
|
||||
|
||||
# Find the native compiler
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:779: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:808: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
ac_prog_rejected=no
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
fi
|
||||
ac_cv_prog_CC="cc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
if test $ac_prog_rejected = yes; then
|
||||
# We found a bogon in the path, so make sure we never use it.
|
||||
set dummy $ac_cv_prog_CC
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
# We chose a different compiler from the bogus one.
|
||||
# However, it has the same basename, so the bogon will be chosen
|
||||
# first if we set CC to just the basename; use the full file name.
|
||||
shift
|
||||
set dummy "$ac_dir/$ac_word" "$@"
|
||||
shift
|
||||
ac_cv_prog_CC="$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 866 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_prog_cc_cross=no
|
||||
else
|
||||
ac_cv_prog_cc_cross=yes
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
ac_cv_prog_cc_works=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
||||
if test $ac_cv_prog_cc_works = no; then
|
||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:895: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:919: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
echo 'void f(){}' > conftest.c
|
||||
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
|
||||
ac_cv_prog_cc_g=yes
|
||||
else
|
||||
ac_cv_prog_cc_g=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
||||
echo "configure:947: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftestmake <<\EOF
|
||||
all:
|
||||
@echo 'ac_maketemp="${MAKE}"'
|
||||
EOF
|
||||
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
||||
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
|
||||
if test -n "$ac_maketemp"; then
|
||||
eval ac_cv_prog_make_${ac_make}_set=yes
|
||||
else
|
||||
eval ac_cv_prog_make_${ac_make}_set=no
|
||||
fi
|
||||
rm -f conftestmake
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
SET_MAKE=
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
SET_MAKE="MAKE=${MAKE-make}"
|
||||
fi
|
||||
|
||||
|
||||
# Find some useful tools
|
||||
for ac_prog in mawk gawk nawk awk
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:781: checking for $ac_word" >&5
|
||||
echo "configure:980: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -808,7 +1007,7 @@ done
|
|||
# Extract the first word of "flex", so it can be a program name with args.
|
||||
set dummy flex; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:812: checking for $ac_word" >&5
|
||||
echo "configure:1011: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -841,7 +1040,7 @@ then
|
|||
*) ac_lib=l ;;
|
||||
esac
|
||||
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
|
||||
echo "configure:845: checking for yywrap in -l$ac_lib" >&5
|
||||
echo "configure:1044: checking for yywrap in -l$ac_lib" >&5
|
||||
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -849,7 +1048,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-l$ac_lib $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 853 "configure"
|
||||
#line 1052 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -860,7 +1059,7 @@ int main() {
|
|||
yywrap()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -883,7 +1082,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
|
||||
echo "configure:887: checking whether ln works" >&5
|
||||
echo "configure:1086: checking whether ln works" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -915,7 +1114,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||
echo "configure:919: checking whether ln -s works" >&5
|
||||
echo "configure:1118: checking whether ln -s works" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -949,7 +1148,7 @@ fi
|
|||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:953: checking for $ac_word" >&5
|
||||
echo "configure:1152: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -980,7 +1179,7 @@ do
|
|||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:984: checking for $ac_word" >&5
|
||||
echo "configure:1183: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1020,7 +1219,7 @@ test -n "$YACC" || YACC="yacc"
|
|||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:1024: checking for a BSD compatible install" >&5
|
||||
echo "configure:1223: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -1074,7 +1273,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
|||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1078: checking for $ac_word" >&5
|
||||
echo "configure:1277: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1103,7 +1302,7 @@ if test -z "$CC"; then
|
|||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1107: checking for $ac_word" >&5
|
||||
echo "configure:1306: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1151,7 +1350,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:1155: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1354: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
|
@ -1161,11 +1360,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
|
|||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1165 "configure"
|
||||
#line 1364 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
|
@ -1185,12 +1384,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:1189: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1388: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:1194: checking whether we are using GNU C" >&5
|
||||
echo "configure:1393: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1199,7 +1398,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -1214,7 +1413,7 @@ if test $ac_cv_prog_gcc = yes; then
|
|||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:1218: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:1417: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1242,7 +1441,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
||||
echo "configure:1246: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||
echo "configure:1445: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -1270,7 +1469,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:1274: checking how to run the C preprocessor" >&5
|
||||
echo "configure:1473: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -1285,13 +1484,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1289 "configure"
|
||||
#line 1488 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -1302,13 +1501,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1306 "configure"
|
||||
#line 1505 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -1330,21 +1529,21 @@ else
|
|||
fi
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h
|
||||
for ac_hdr in inttypes.h limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1338: checking for $ac_hdr" >&5
|
||||
echo "configure:1537: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1343 "configure"
|
||||
#line 1542 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1372,12 +1571,12 @@ done
|
|||
|
||||
|
||||
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
|
||||
echo "configure:1376: checking whether malloc must be declared" >&5
|
||||
echo "configure:1575: checking whether malloc must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_malloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1381 "configure"
|
||||
#line 1580 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1398,7 +1597,7 @@ int main() {
|
|||
char *(*pfn) = (char *(*)) malloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_malloc=no
|
||||
else
|
||||
|
@ -1420,12 +1619,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
|
||||
echo "configure:1424: checking whether realloc must be declared" >&5
|
||||
echo "configure:1623: checking whether realloc must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_realloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1429 "configure"
|
||||
#line 1628 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1446,7 +1645,7 @@ int main() {
|
|||
char *(*pfn) = (char *(*)) realloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_realloc=no
|
||||
else
|
||||
|
@ -1468,12 +1667,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether calloc must be declared""... $ac_c" 1>&6
|
||||
echo "configure:1472: checking whether calloc must be declared" >&5
|
||||
echo "configure:1671: checking whether calloc must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_calloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1477 "configure"
|
||||
#line 1676 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1494,7 +1693,7 @@ int main() {
|
|||
char *(*pfn) = (char *(*)) calloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_calloc=no
|
||||
else
|
||||
|
@ -1516,12 +1715,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
|
||||
echo "configure:1520: checking whether free must be declared" >&5
|
||||
echo "configure:1719: checking whether free must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_free'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1525 "configure"
|
||||
#line 1724 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1542,7 +1741,7 @@ int main() {
|
|||
char *(*pfn) = (char *(*)) free
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_free=no
|
||||
else
|
||||
|
@ -1565,12 +1764,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
|
||||
echo "configure:1569: checking for sys_siglist declaration in signal.h or unistd.h" >&5
|
||||
echo "configure:1768: checking for sys_siglist declaration in signal.h or unistd.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1574 "configure"
|
||||
#line 1773 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
@ -1582,7 +1781,7 @@ int main() {
|
|||
char *msg = *(sys_siglist + 1);
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_decl_sys_siglist=yes
|
||||
else
|
||||
|
@ -1606,12 +1805,12 @@ fi
|
|||
for ac_func in strerror strtoul bsearch
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:1610: checking for $ac_func" >&5
|
||||
echo "configure:1809: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1615 "configure"
|
||||
#line 1814 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1634,7 +1833,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -1816,7 +2015,7 @@ for machine in $build $host $target; do
|
|||
thread_file='posix'
|
||||
fi
|
||||
;;
|
||||
alpha*-dec-osf[456789]*)
|
||||
alpha*-dec-osf*)
|
||||
if [ x$stabs = xyes ]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
|
@ -1826,48 +2025,24 @@ for machine in $build $host $target; do
|
|||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
# Some versions of OSF4 (specifically X4.0-9 296.7) have
|
||||
# a broken tar, so we use cpio instead.
|
||||
case $machine in
|
||||
alpha*-dec-osf4*)
|
||||
*-*-osf1.2)
|
||||
tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"
|
||||
;;
|
||||
*-*-osf[23]*)
|
||||
tm_file="${tm_file} alpha/osf2or3.h"
|
||||
;;
|
||||
*-*-osf4*)
|
||||
# Some versions of OSF4 (specifically X4.0-9 296.7) have
|
||||
# a broken tar, so we use cpio instead.
|
||||
install_headers_dir=install-headers-cpio
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alpha*-dec-osf[23]*)
|
||||
tm_file="${tm_file} alpha/osf2or3.h"
|
||||
if [ x$stabs = xyes ]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
fi
|
||||
if [ x$gas != xyes ]
|
||||
then
|
||||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
;;
|
||||
alpha*-dec-osf1.2)
|
||||
tm_file="${tm_file} alpha/osf12.h"
|
||||
if [ x$stabs = xyes ]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
fi
|
||||
if [ x$gas != xyes ]
|
||||
then
|
||||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
;;
|
||||
alpha*-*-osf*)
|
||||
if [ x$stabs = xyes ]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
fi
|
||||
if [ x$gas != xyes ]
|
||||
then
|
||||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
case $machine in
|
||||
*-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
|
||||
target_cpu_default=MASK_SUPPORT_ARCH
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alpha*-*-winnt3*)
|
||||
tm_file="${tm_file} alpha/win-nt.h"
|
||||
|
@ -1927,7 +2102,7 @@ for machine in $build $host $target; do
|
|||
arm-*-netbsd*)
|
||||
tm_file=arm/netbsd.h
|
||||
xm_file=arm/xm-netbsd.h
|
||||
tmake_file=arm/t-netbsd
|
||||
tmake_file="t-netbsd arm/t-netbsd"
|
||||
# On NetBSD, the headers are already okay, except for math.h.
|
||||
fixincludes=fixinc.math
|
||||
use_collect2=yes
|
||||
|
@ -1943,6 +2118,7 @@ for machine in $build $host $target; do
|
|||
;;
|
||||
arm-*-aout)
|
||||
tm_file=arm/aout.h
|
||||
tmake_file=arm/t-bare
|
||||
;;
|
||||
c1-convex-*) # Convex C1
|
||||
target_cpu_default=1
|
||||
|
@ -2499,6 +2675,7 @@ for machine in $build $host $target; do
|
|||
extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
|
||||
xmake_file=x-svr4
|
||||
fixincludes=fixinc.svr4
|
||||
broken_install=yes
|
||||
if [ x$enable_threads = xyes ]; then
|
||||
thread_file='solaris'
|
||||
fi
|
||||
|
@ -3526,6 +3703,14 @@ for machine in $build $host $target; do
|
|||
tm_file=mips/rtems64.h
|
||||
tmake_file="mips/t-ecoff t-rtems"
|
||||
;;
|
||||
mipstx39el-*-elf*)
|
||||
tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
|
||||
tmake_file=mips/t-ecoff
|
||||
;;
|
||||
mipstx39-*-elf*)
|
||||
tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
|
||||
tmake_file=mips/t-ecoff
|
||||
;;
|
||||
mips-*-*) # Default MIPS RISC-OS 4.0.
|
||||
if [ x$stabs = xyes ]; then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
|
@ -3752,7 +3937,7 @@ for machine in $build $host $target; do
|
|||
tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
|
||||
fi
|
||||
xmake_file=rs6000/x-sysv4
|
||||
fixincludes=fixinc.svr4
|
||||
fixincludes=fixinc.math
|
||||
extra_headers=ppc-asm.h
|
||||
;;
|
||||
rs6000-ibm-aix3.[01]*)
|
||||
|
@ -3892,6 +4077,8 @@ for machine in $build $host $target; do
|
|||
xmake_file=sparc/x-sysv4
|
||||
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
|
||||
fixincludes=fixinc.svr4
|
||||
float_format=i128
|
||||
broken_install=yes
|
||||
if [ x$enable_threads = xyes ]; then
|
||||
thread_file='solaris'
|
||||
fi
|
||||
|
@ -4062,8 +4249,14 @@ for machine in $build $host $target; do
|
|||
;;
|
||||
alpha*-*-*)
|
||||
case $machine in
|
||||
alphaev6*)
|
||||
target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
|
||||
;;
|
||||
alphapca56*)
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
|
||||
;;
|
||||
alphaev56*)
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
|
||||
;;
|
||||
alphaev5*)
|
||||
target_cpu_default2="MASK_CPU_EV5"
|
||||
|
@ -4260,10 +4453,11 @@ fi
|
|||
# Set up the header files.
|
||||
# $links is the list of header files to create.
|
||||
# $vars is the list of shell variables with file names to include.
|
||||
# config2.h is the old config.h. It is included by the new config.h which
|
||||
# created from config.in. The goal is to simplify the transition to autoconf.
|
||||
# auto-conf.h is the file containing items generated by autoconf and is
|
||||
# the first file included by config.h.
|
||||
host_xm_file="auto-config.h ${host_xm_file}"
|
||||
vars="host_xm_file tm_file xm_file build_xm_file"
|
||||
links="config2.h tm.h tconfig.h hconfig.h"
|
||||
links="config.h tm.h tconfig.h hconfig.h"
|
||||
|
||||
rm -f config.bak
|
||||
if [ -f config.status ]; then mv -f config.status config.bak; fi
|
||||
|
@ -4338,6 +4532,7 @@ then
|
|||
cc_set_by_configure="\$(CC)"
|
||||
stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
|
||||
else
|
||||
symbolic_link="cp -p"
|
||||
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
|
||||
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
|
||||
fi
|
||||
|
@ -4648,6 +4843,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Echo that links are built
|
||||
|
@ -4704,7 +4900,7 @@ EOF
|
|||
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
case `(ac_space=' '; set) 2>&1` in
|
||||
case `(ac_space=' '; set) 2>&1 | grep ac_space` in
|
||||
*ac_space=\ *)
|
||||
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||
# turns \\\\ into \\, and sed turns \\ into \).
|
||||
|
@ -4781,7 +4977,7 @@ done
|
|||
|
||||
ac_given_srcdir=$srcdir
|
||||
|
||||
trap 'rm -fr `echo "$all_outputs config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "$all_outputs auto-config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
|
@ -4827,6 +5023,8 @@ s%@build_alias@%$build_alias%g
|
|||
s%@build_cpu@%$build_cpu%g
|
||||
s%@build_vendor@%$build_vendor%g
|
||||
s%@build_os@%$build_os%g
|
||||
s%@CC@%$CC%g
|
||||
s%@SET_MAKE@%$SET_MAKE%g
|
||||
s%@AWK@%$AWK%g
|
||||
s%@LEX@%$LEX%g
|
||||
s%@LEXLIB@%$LEXLIB%g
|
||||
|
@ -4837,8 +5035,6 @@ s%@YACC@%$YACC%g
|
|||
s%@INSTALL@%$INSTALL%g
|
||||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@CC@%$CC%g
|
||||
s%@SET_MAKE@%$SET_MAKE%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@manext@%$manext%g
|
||||
s%@objext@%$objext%g
|
||||
|
@ -4885,6 +5081,7 @@ s%@maybe_use_collect2@%$maybe_use_collect2%g
|
|||
s%@cc_set_by_configure@%$cc_set_by_configure%g
|
||||
s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
|
||||
s%@install@%$install%g
|
||||
s%@symbolic_link@%$symbolic_link%g
|
||||
/@target_overrides@/r $target_overrides
|
||||
s%@target_overrides@%%g
|
||||
/@host_overrides@/r $host_overrides
|
||||
|
@ -5015,7 +5212,7 @@ ac_eD='%g'
|
|||
if test "${CONFIG_HEADERS+set}" != set; then
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
CONFIG_HEADERS="config.h:config.in"
|
||||
CONFIG_HEADERS="auto-config.h:config.in"
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
fi
|
||||
|
@ -5137,7 +5334,7 @@ cat >> $CONFIG_STATUS <<\EOF
|
|||
|
||||
. $srcdir/configure.lang
|
||||
case x$CONFIG_HEADERS in
|
||||
xconfig.h:config.in)
|
||||
xauto-config.h:config.in)
|
||||
echo > cstamp-h ;;
|
||||
esac
|
||||
# If the host supports symlinks, point stage[1234] at ../stage[1234] so
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
# Initialization and defaults
|
||||
AC_INIT(tree.c)
|
||||
AC_CONFIG_HEADER(config.h:config.in)
|
||||
AC_CONFIG_HEADER(auto-config.h:config.in)
|
||||
|
||||
remove=rm
|
||||
hard_link=ln
|
||||
|
@ -120,6 +120,10 @@ esac
|
|||
# Determine the host, build, and target systems
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
# Find the native compiler
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# Find some useful tools
|
||||
AC_PROG_AWK
|
||||
AC_PROG_LEX
|
||||
|
@ -133,7 +137,7 @@ EGCS_PROG_INSTALL
|
|||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h)
|
||||
AC_CHECK_HEADERS(inttypes.h limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h)
|
||||
|
||||
GCC_NEED_DECLARATION(malloc)
|
||||
GCC_NEED_DECLARATION(realloc)
|
||||
|
@ -301,7 +305,7 @@ for machine in $build $host $target; do
|
|||
thread_file='posix'
|
||||
fi
|
||||
;;
|
||||
alpha*-dec-osf[[456789]]*)
|
||||
alpha*-dec-osf*)
|
||||
if [[ x$stabs = xyes ]]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
|
@ -311,48 +315,24 @@ for machine in $build $host $target; do
|
|||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
# Some versions of OSF4 (specifically X4.0-9 296.7) have
|
||||
# a broken tar, so we use cpio instead.
|
||||
case $machine in
|
||||
alpha*-dec-osf4*)
|
||||
*-*-osf1.2)
|
||||
tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"
|
||||
;;
|
||||
*-*-osf[[23]]*)
|
||||
tm_file="${tm_file} alpha/osf2or3.h"
|
||||
;;
|
||||
*-*-osf4*)
|
||||
# Some versions of OSF4 (specifically X4.0-9 296.7) have
|
||||
# a broken tar, so we use cpio instead.
|
||||
install_headers_dir=install-headers-cpio
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alpha*-dec-osf[[23]]*)
|
||||
tm_file="${tm_file} alpha/osf2or3.h"
|
||||
if [[ x$stabs = xyes ]]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
fi
|
||||
if [[ x$gas != xyes ]]
|
||||
then
|
||||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
;;
|
||||
alpha*-dec-osf1.2)
|
||||
tm_file="${tm_file} alpha/osf12.h"
|
||||
if [[ x$stabs = xyes ]]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
fi
|
||||
if [[ x$gas != xyes ]]
|
||||
then
|
||||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
;;
|
||||
alpha*-*-osf*)
|
||||
if [[ x$stabs = xyes ]]
|
||||
then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
fi
|
||||
if [[ x$gas != xyes ]]
|
||||
then
|
||||
extra_passes="mips-tfile mips-tdump"
|
||||
fi
|
||||
use_collect2=yes
|
||||
case $machine in
|
||||
*-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
|
||||
target_cpu_default=MASK_SUPPORT_ARCH
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alpha*-*-winnt3*)
|
||||
tm_file="${tm_file} alpha/win-nt.h"
|
||||
|
@ -412,7 +392,7 @@ for machine in $build $host $target; do
|
|||
arm-*-netbsd*)
|
||||
tm_file=arm/netbsd.h
|
||||
xm_file=arm/xm-netbsd.h
|
||||
tmake_file=arm/t-netbsd
|
||||
tmake_file="t-netbsd arm/t-netbsd"
|
||||
# On NetBSD, the headers are already okay, except for math.h.
|
||||
fixincludes=fixinc.math
|
||||
use_collect2=yes
|
||||
|
@ -428,6 +408,7 @@ for machine in $build $host $target; do
|
|||
;;
|
||||
arm-*-aout)
|
||||
tm_file=arm/aout.h
|
||||
tmake_file=arm/t-bare
|
||||
;;
|
||||
c1-convex-*) # Convex C1
|
||||
target_cpu_default=1
|
||||
|
@ -984,6 +965,7 @@ for machine in $build $host $target; do
|
|||
extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
|
||||
xmake_file=x-svr4
|
||||
fixincludes=fixinc.svr4
|
||||
broken_install=yes
|
||||
if [[ x$enable_threads = xyes ]]; then
|
||||
thread_file='solaris'
|
||||
fi
|
||||
|
@ -2011,6 +1993,14 @@ for machine in $build $host $target; do
|
|||
tm_file=mips/rtems64.h
|
||||
tmake_file="mips/t-ecoff t-rtems"
|
||||
;;
|
||||
mipstx39el-*-elf*)
|
||||
tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
|
||||
tmake_file=mips/t-ecoff
|
||||
;;
|
||||
mipstx39-*-elf*)
|
||||
tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
|
||||
tmake_file=mips/t-ecoff
|
||||
;;
|
||||
mips-*-*) # Default MIPS RISC-OS 4.0.
|
||||
if [[ x$stabs = xyes ]]; then
|
||||
tm_file="${tm_file} dbx.h"
|
||||
|
@ -2237,7 +2227,7 @@ for machine in $build $host $target; do
|
|||
tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
|
||||
fi
|
||||
xmake_file=rs6000/x-sysv4
|
||||
fixincludes=fixinc.svr4
|
||||
fixincludes=fixinc.math
|
||||
extra_headers=ppc-asm.h
|
||||
;;
|
||||
rs6000-ibm-aix3.[[01]]*)
|
||||
|
@ -2377,6 +2367,8 @@ for machine in $build $host $target; do
|
|||
xmake_file=sparc/x-sysv4
|
||||
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
|
||||
fixincludes=fixinc.svr4
|
||||
float_format=i128
|
||||
broken_install=yes
|
||||
if [[ x$enable_threads = xyes ]]; then
|
||||
thread_file='solaris'
|
||||
fi
|
||||
|
@ -2547,8 +2539,14 @@ for machine in $build $host $target; do
|
|||
;;
|
||||
alpha*-*-*)
|
||||
case $machine in
|
||||
alphaev6*)
|
||||
target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
|
||||
;;
|
||||
alphapca56*)
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
|
||||
;;
|
||||
alphaev56*)
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
|
||||
;;
|
||||
alphaev5*)
|
||||
target_cpu_default2="MASK_CPU_EV5"
|
||||
|
@ -2745,10 +2743,11 @@ fi
|
|||
# Set up the header files.
|
||||
# $links is the list of header files to create.
|
||||
# $vars is the list of shell variables with file names to include.
|
||||
# config2.h is the old config.h. It is included by the new config.h which
|
||||
# created from config.in. The goal is to simplify the transition to autoconf.
|
||||
# auto-conf.h is the file containing items generated by autoconf and is
|
||||
# the first file included by config.h.
|
||||
host_xm_file="auto-config.h ${host_xm_file}"
|
||||
vars="host_xm_file tm_file xm_file build_xm_file"
|
||||
links="config2.h tm.h tconfig.h hconfig.h"
|
||||
links="config.h tm.h tconfig.h hconfig.h"
|
||||
|
||||
rm -f config.bak
|
||||
if [[ -f config.status ]]; then mv -f config.status config.bak; fi
|
||||
|
@ -2823,6 +2822,7 @@ then
|
|||
cc_set_by_configure="\$(CC)"
|
||||
stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
|
||||
else
|
||||
symbolic_link="cp -p"
|
||||
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
|
||||
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
|
||||
fi
|
||||
|
@ -3126,6 +3126,7 @@ AC_SUBST(maybe_use_collect2)
|
|||
AC_SUBST(cc_set_by_configure)
|
||||
AC_SUBST(stage_prefix_set_by_configure)
|
||||
AC_SUBST(install)
|
||||
AC_SUBST(symbolic_link)
|
||||
|
||||
AC_SUBST_FILE(target_overrides)
|
||||
AC_SUBST_FILE(host_overrides)
|
||||
|
@ -3170,7 +3171,7 @@ AC_OUTPUT($all_outputs,
|
|||
[
|
||||
. $srcdir/configure.lang
|
||||
case x$CONFIG_HEADERS in
|
||||
xconfig.h:config.in)
|
||||
xauto-config.h:config.in)
|
||||
echo > cstamp-h ;;
|
||||
esac
|
||||
# If the host supports symlinks, point stage[1234] at ../stage[1234] so
|
||||
|
|
|
@ -77,6 +77,15 @@ Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
|
|||
(common_type): Likewise.
|
||||
* error.c (args_as_string): Recognize null_node.
|
||||
|
||||
Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
|
||||
(unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
|
||||
|
||||
* decl.c (init_decl_processing): Call using_eh_for_cleanups.
|
||||
|
||||
* Make-lang.in (g++): Include prefix.o.
|
||||
|
||||
Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
|
||||
|
||||
* pt.c (determine_explicit_specialization): Initialize "dummy"
|
||||
|
|
|
@ -90,8 +90,8 @@ g++.o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) g++.c
|
|||
-c g++.c
|
||||
|
||||
# Create the compiler driver for g++.
|
||||
g++$(exeext): g++.o g++spec.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g++.o g++spec.o version.o \
|
||||
g++$(exeext): g++.o g++spec.o version.o choose-temp.o pexecute.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g++.o g++spec.o prefix.o version.o \
|
||||
choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
|
||||
|
||||
# Create a version of the g++ driver which calls the cross-compiler.
|
||||
|
|
|
@ -5585,6 +5585,9 @@ init_decl_processing ()
|
|||
|
||||
/* Prepare to check format strings against argument lists. */
|
||||
init_function_format_info ();
|
||||
|
||||
/* Show we use EH for cleanups. */
|
||||
using_eh_for_cleanups ();
|
||||
}
|
||||
|
||||
/* initialize type descriptor type node of various rtti type. */
|
||||
|
|
|
@ -3495,7 +3495,7 @@ static const short yycheck[] = { 4,
|
|||
78, 79, 80, 81, 82, 83, 84, 85
|
||||
};
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line 3 "/usr/lib/bison.simple"
|
||||
#line 3 "/usr/cygnus/latest-940103/share/bison.simple"
|
||||
|
||||
/* Skeleton output parser for bison,
|
||||
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
|
||||
|
@ -3688,7 +3688,7 @@ __yy_memcpy (char *to, char *from, int count)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#line 196 "/usr/lib/bison.simple"
|
||||
#line 196 "/usr/cygnus/latest-940103/share/bison.simple"
|
||||
|
||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||
into yyparse. The argument should have type void *.
|
||||
|
@ -8425,7 +8425,7 @@ case 830:
|
|||
break;}
|
||||
}
|
||||
/* the action file gets copied in in place of this dollarsign */
|
||||
#line 498 "/usr/lib/bison.simple"
|
||||
#line 498 "/usr/cygnus/latest-940103/share/bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
|
|
|
@ -89,4 +89,5 @@ typedef union {long itype; tree ttype; char *strtype; enum tree_code code; flagg
|
|||
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
#define YYEMPTY -2
|
||||
#define YYEMPTY -2
|
||||
|
||||
|
|
|
@ -1681,18 +1681,33 @@ build_component_ref_1 (datum, field, protect)
|
|||
(build_component_ref (datum, field, NULL_TREE, protect));
|
||||
}
|
||||
|
||||
/* Given a COND_EXPR in T, return it in a form that we can, for
|
||||
example, use as an lvalue. This code used to be in unary_complex_lvalue,
|
||||
but we needed it to deal with `a = (d == c) ? b : c' expressions, where
|
||||
we're dealing with aggregates. So, we now call this in unary_complex_lvalue,
|
||||
and in build_modify_expr. The case (in particular) that led to this was
|
||||
with CODE == ADDR_EXPR, since it's not an lvalue when we'd get it there. */
|
||||
/* Given a COND_EXPR, MIN_EXPR, or MAX_EXPR in T, return it in a form that we
|
||||
can, for example, use as an lvalue. This code used to be in
|
||||
unary_complex_lvalue, but we needed it to deal with `a = (d == c) ? b : c'
|
||||
expressions, where we're dealing with aggregates. But now it's again only
|
||||
called from unary_complex_lvalue. The case (in particular) that led to
|
||||
this was with CODE == ADDR_EXPR, since it's not an lvalue when we'd
|
||||
get it there. */
|
||||
|
||||
static tree
|
||||
rationalize_conditional_expr (code, t)
|
||||
enum tree_code code;
|
||||
tree t;
|
||||
{
|
||||
/* For MIN_EXPR or MAX_EXPR, fold-const.c has arranged things so that
|
||||
the first operand is always the one to be used if both operands
|
||||
are equal, so we know what conditional expression this used to be. */
|
||||
if (TREE_CODE (t) == MIN_EXPR || TREE_CODE (t) == MAX_EXPR)
|
||||
{
|
||||
return
|
||||
build_conditional_expr (build_x_binary_op ((TREE_CODE (t) == MIN_EXPR
|
||||
? LE_EXPR : GE_EXPR),
|
||||
TREE_OPERAND (t, 0),
|
||||
TREE_OPERAND (t, 1)),
|
||||
build_unary_op (code, TREE_OPERAND (t, 0), 0),
|
||||
build_unary_op (code, TREE_OPERAND (t, 1), 0));
|
||||
}
|
||||
|
||||
return
|
||||
build_conditional_expr (TREE_OPERAND (t, 0),
|
||||
build_unary_op (code, TREE_OPERAND (t, 1), 0),
|
||||
|
@ -4584,7 +4599,8 @@ unary_complex_lvalue (code, arg)
|
|||
}
|
||||
|
||||
/* Handle (a ? b : c) used as an "lvalue". */
|
||||
if (TREE_CODE (arg) == COND_EXPR)
|
||||
if (TREE_CODE (arg) == COND_EXPR
|
||||
|| TREE_CODE (arg) == MIN_EXPR || TREE_CODE (arg) == MAX_EXPR)
|
||||
return rationalize_conditional_expr (code, arg);
|
||||
|
||||
if (TREE_CODE (arg) == MODIFY_EXPR
|
||||
|
|
|
@ -2426,7 +2426,7 @@ demangle_fund_type (work, mangled, result)
|
|||
case 'J':
|
||||
(*mangled)++;
|
||||
APPEND_BLANK (result);
|
||||
string_append (result, "complex");
|
||||
string_append (result, "__complex");
|
||||
break;
|
||||
default:
|
||||
done = 1;
|
||||
|
|
75
gcc/cpp.info
75
gcc/cpp.info
|
@ -1,75 +0,0 @@
|
|||
This is Info file cpp.info, produced by Makeinfo version 1.67 from the
|
||||
input file cpp.texi.
|
||||
|
||||
This file documents the GNU C Preprocessor.
|
||||
|
||||
Copyright 1987, 1989, 1991, 1992, 1993, 1994, 1995 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of
|
||||
this manual under the conditions for verbatim copying, provided also
|
||||
that the entire resulting derived work is distributed under the terms
|
||||
of a permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this
|
||||
manual into another language, under the above conditions for modified
|
||||
versions.
|
||||
|
||||
|
||||
Indirect:
|
||||
cpp.info-1: 798
|
||||
cpp.info-2: 50062
|
||||
cpp.info-3: 91249
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
Node: Top798
|
||||
Node: Global Actions3707
|
||||
Node: Directives6227
|
||||
Node: Header Files7914
|
||||
Node: Header Uses8573
|
||||
Node: Include Syntax10065
|
||||
Node: Include Operation13207
|
||||
Node: Once-Only15069
|
||||
Node: Inheritance17494
|
||||
Node: Macros20027
|
||||
Node: Simple Macros20941
|
||||
Node: Argument Macros23929
|
||||
Node: Predefined29727
|
||||
Node: Standard Predefined30157
|
||||
Node: Nonstandard Predefined37948
|
||||
Node: Stringification41524
|
||||
Node: Concatenation44450
|
||||
Node: Undefining47723
|
||||
Node: Redefining48762
|
||||
Node: Macro Pitfalls50062
|
||||
Node: Misnesting51166
|
||||
Node: Macro Parentheses52180
|
||||
Node: Swallow Semicolon54048
|
||||
Node: Side Effects55948
|
||||
Node: Self-Reference57646
|
||||
Node: Argument Prescan59922
|
||||
Node: Cascaded Macros64924
|
||||
Node: Newlines in Args66069
|
||||
Node: Conditionals67414
|
||||
Node: Conditional Uses68766
|
||||
Node: Conditional Syntax70189
|
||||
Node: #if Directive70775
|
||||
Node: #else Directive73064
|
||||
Node: #elif Directive73731
|
||||
Node: Deleted Code75109
|
||||
Node: Conditionals-Macros76170
|
||||
Node: Assertions79855
|
||||
Node: #error Directive84090
|
||||
Node: Combining Sources85575
|
||||
Node: Other Directives88486
|
||||
Node: Output89940
|
||||
Node: Invocation91249
|
||||
Node: Concept Index103346
|
||||
Node: Index106199
|
||||
|
||||
End Tag Table
|
1182
gcc/cpp.info-1
1182
gcc/cpp.info-1
File diff suppressed because it is too large
Load Diff
1058
gcc/cpp.info-2
1058
gcc/cpp.info-2
File diff suppressed because it is too large
Load Diff
478
gcc/cpp.info-3
478
gcc/cpp.info-3
|
@ -1,478 +0,0 @@
|
|||
This is Info file cpp.info, produced by Makeinfo version 1.67 from the
|
||||
input file cpp.texi.
|
||||
|
||||
This file documents the GNU C Preprocessor.
|
||||
|
||||
Copyright 1987, 1989, 1991, 1992, 1993, 1994, 1995 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of
|
||||
this manual under the conditions for verbatim copying, provided also
|
||||
that the entire resulting derived work is distributed under the terms
|
||||
of a permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this
|
||||
manual into another language, under the above conditions for modified
|
||||
versions.
|
||||
|
||||
|
||||
File: cpp.info, Node: Invocation, Next: Concept Index, Prev: Output, Up: Top
|
||||
|
||||
Invoking the C Preprocessor
|
||||
===========================
|
||||
|
||||
Most often when you use the C preprocessor you will not have to
|
||||
invoke it explicitly: the C compiler will do so automatically.
|
||||
However, the preprocessor is sometimes useful on its own.
|
||||
|
||||
The C preprocessor expects two file names as arguments, INFILE and
|
||||
OUTFILE. The preprocessor reads INFILE together with any other files
|
||||
it specifies with `#include'. All the output generated by the combined
|
||||
input files is written in OUTFILE.
|
||||
|
||||
Either INFILE or OUTFILE may be `-', which as INFILE means to read
|
||||
from standard input and as OUTFILE means to write to standard output.
|
||||
Also, if OUTFILE or both file names are omitted, the standard output
|
||||
and standard input are used for the omitted file names.
|
||||
|
||||
Here is a table of command options accepted by the C preprocessor.
|
||||
These options can also be given when compiling a C program; they are
|
||||
passed along automatically to the preprocessor when it is invoked by the
|
||||
compiler.
|
||||
|
||||
`-P'
|
||||
Inhibit generation of `#'-lines with line-number information in
|
||||
the output from the preprocessor (*note Output::.). This might be
|
||||
useful when running the preprocessor on something that is not C
|
||||
code and will be sent to a program which might be confused by the
|
||||
`#'-lines.
|
||||
|
||||
`-C'
|
||||
Do not discard comments: pass them through to the output file.
|
||||
Comments appearing in arguments of a macro call will be copied to
|
||||
the output before the expansion of the macro call.
|
||||
|
||||
`-traditional'
|
||||
Try to imitate the behavior of old-fashioned C, as opposed to ANSI
|
||||
C.
|
||||
|
||||
* Traditional macro expansion pays no attention to singlequote
|
||||
or doublequote characters; macro argument symbols are
|
||||
replaced by the argument values even when they appear within
|
||||
apparent string or character constants.
|
||||
|
||||
* Traditionally, it is permissible for a macro expansion to end
|
||||
in the middle of a string or character constant. The
|
||||
constant continues into the text surrounding the macro call.
|
||||
|
||||
* However, traditionally the end of the line terminates a
|
||||
string or character constant, with no error.
|
||||
|
||||
* In traditional C, a comment is equivalent to no text at all.
|
||||
(In ANSI C, a comment counts as whitespace.)
|
||||
|
||||
* Traditional C does not have the concept of a "preprocessing
|
||||
number". It considers `1.0e+4' to be three tokens: `1.0e',
|
||||
`+', and `4'.
|
||||
|
||||
* A macro is not suppressed within its own definition, in
|
||||
traditional C. Thus, any macro that is used recursively
|
||||
inevitably causes an error.
|
||||
|
||||
* The character `#' has no special meaning within a macro
|
||||
definition in traditional C.
|
||||
|
||||
* In traditional C, the text at the end of a macro expansion
|
||||
can run together with the text after the macro call, to
|
||||
produce a single token. (This is impossible in ANSI C.)
|
||||
|
||||
* Traditionally, `\' inside a macro argument suppresses the
|
||||
syntactic significance of the following character.
|
||||
|
||||
`-trigraphs'
|
||||
Process ANSI standard trigraph sequences. These are
|
||||
three-character sequences, all starting with `??', that are
|
||||
defined by ANSI C to stand for single characters. For example,
|
||||
`??/' stands for `\', so `'??/n'' is a character constant for a
|
||||
newline. Strictly speaking, the GNU C preprocessor does not
|
||||
support all programs in ANSI Standard C unless `-trigraphs' is
|
||||
used, but if you ever notice the difference it will be with relief.
|
||||
|
||||
You don't want to know any more about trigraphs.
|
||||
|
||||
`-pedantic'
|
||||
Issue warnings required by the ANSI C standard in certain cases
|
||||
such as when text other than a comment follows `#else' or `#endif'.
|
||||
|
||||
`-pedantic-errors'
|
||||
Like `-pedantic', except that errors are produced rather than
|
||||
warnings.
|
||||
|
||||
`-Wtrigraphs'
|
||||
Warn if any trigraphs are encountered (assuming they are enabled).
|
||||
|
||||
`-Wcomment'
|
||||
Warn whenever a comment-start sequence `/*' appears in a `/*'
|
||||
comment, or whenever a Backslash-Newline appears in a `//' comment.
|
||||
|
||||
`-Wall'
|
||||
Requests both `-Wtrigraphs' and `-Wcomment' (but not
|
||||
`-Wtraditional' or `-Wundef').
|
||||
|
||||
`-Wtraditional'
|
||||
Warn about certain constructs that behave differently in
|
||||
traditional and ANSI C.
|
||||
|
||||
`-Wundef'
|
||||
Warn if an undefined identifier is evaluated in an `#if' directive.
|
||||
|
||||
`-I DIRECTORY'
|
||||
Add the directory DIRECTORY to the head of the list of directories
|
||||
to be searched for header files (*note Include Syntax::.). This
|
||||
can be used to override a system header file, substituting your
|
||||
own version, since these directories are searched before the system
|
||||
header file directories. If you use more than one `-I' option,
|
||||
the directories are scanned in left-to-right order; the standard
|
||||
system directories come after.
|
||||
|
||||
`-I-'
|
||||
Any directories specified with `-I' options before the `-I-'
|
||||
option are searched only for the case of `#include "FILE"'; they
|
||||
are not searched for `#include <FILE>'.
|
||||
|
||||
If additional directories are specified with `-I' options after
|
||||
the `-I-', these directories are searched for all `#include'
|
||||
directives.
|
||||
|
||||
In addition, the `-I-' option inhibits the use of the current
|
||||
directory as the first search directory for `#include "FILE"'.
|
||||
Therefore, the current directory is searched only if it is
|
||||
requested explicitly with `-I.'. Specifying both `-I-' and `-I.'
|
||||
allows you to control precisely which directories are searched
|
||||
before the current one and which are searched after.
|
||||
|
||||
`-nostdinc'
|
||||
Do not search the standard system directories for header files.
|
||||
Only the directories you have specified with `-I' options (and the
|
||||
current directory, if appropriate) are searched.
|
||||
|
||||
`-nostdinc++'
|
||||
Do not search for header files in the C++-specific standard
|
||||
directories, but do still search the other standard directories.
|
||||
(This option is used when building libg++.)
|
||||
|
||||
`-D NAME'
|
||||
Predefine NAME as a macro, with definition `1'.
|
||||
|
||||
`-D NAME=DEFINITION'
|
||||
Predefine NAME as a macro, with definition DEFINITION. There are
|
||||
no restrictions on the contents of DEFINITION, but if you are
|
||||
invoking the preprocessor from a shell or shell-like program you
|
||||
may need to use the shell's quoting syntax to protect characters
|
||||
such as spaces that have a meaning in the shell syntax. If you
|
||||
use more than one `-D' for the same NAME, the rightmost definition
|
||||
takes effect.
|
||||
|
||||
`-U NAME'
|
||||
Do not predefine NAME. If both `-U' and `-D' are specified for
|
||||
one name, the `-U' beats the `-D' and the name is not predefined.
|
||||
|
||||
`-undef'
|
||||
Do not predefine any nonstandard macros.
|
||||
|
||||
`-A PREDICATE(ANSWER)'
|
||||
Make an assertion with the predicate PREDICATE and answer ANSWER.
|
||||
*Note Assertions::.
|
||||
|
||||
You can use `-A-' to disable all predefined assertions; it also
|
||||
undefines all predefined macros that identify the type of target
|
||||
system.
|
||||
|
||||
`-dM'
|
||||
Instead of outputting the result of preprocessing, output a list of
|
||||
`#define' directives for all the macros defined during the
|
||||
execution of the preprocessor, including predefined macros. This
|
||||
gives you a way of finding out what is predefined in your version
|
||||
of the preprocessor; assuming you have no file `foo.h', the command
|
||||
|
||||
touch foo.h; cpp -dM foo.h
|
||||
|
||||
will show the values of any predefined macros.
|
||||
|
||||
`-dD'
|
||||
Like `-dM' except in two respects: it does *not* include the
|
||||
predefined macros, and it outputs *both* the `#define' directives
|
||||
and the result of preprocessing. Both kinds of output go to the
|
||||
standard output file.
|
||||
|
||||
`-dI'
|
||||
Output `#include' directives in addition to the result of
|
||||
preprocessing.
|
||||
|
||||
`-M [-MG]'
|
||||
Instead of outputting the result of preprocessing, output a rule
|
||||
suitable for `make' describing the dependencies of the main source
|
||||
file. The preprocessor outputs one `make' rule containing the
|
||||
object file name for that source file, a colon, and the names of
|
||||
all the included files. If there are many included files then the
|
||||
rule is split into several lines using `\'-newline.
|
||||
|
||||
`-MG' says to treat missing header files as generated files and
|
||||
assume they live in the same directory as the source file. It
|
||||
must be specified in addition to `-M'.
|
||||
|
||||
This feature is used in automatic updating of makefiles.
|
||||
|
||||
`-MM [-MG]'
|
||||
Like `-M' but mention only the files included with `#include
|
||||
"FILE"'. System header files included with `#include <FILE>' are
|
||||
omitted.
|
||||
|
||||
`-MD FILE'
|
||||
Like `-M' but the dependency information is written to FILE. This
|
||||
is in addition to compiling the file as specified--`-MD' does not
|
||||
inhibit ordinary compilation the way `-M' does.
|
||||
|
||||
When invoking gcc, do not specify the FILE argument. Gcc will
|
||||
create file names made by replacing ".c" with ".d" at the end of
|
||||
the input file names.
|
||||
|
||||
In Mach, you can use the utility `md' to merge multiple dependency
|
||||
files into a single dependency file suitable for using with the
|
||||
`make' command.
|
||||
|
||||
`-MMD FILE'
|
||||
Like `-MD' except mention only user header files, not system
|
||||
header files.
|
||||
|
||||
`-H'
|
||||
Print the name of each header file used, in addition to other
|
||||
normal activities.
|
||||
|
||||
`-imacros FILE'
|
||||
Process FILE as input, discarding the resulting output, before
|
||||
processing the regular input file. Because the output generated
|
||||
from FILE is discarded, the only effect of `-imacros FILE' is to
|
||||
make the macros defined in FILE available for use in the main
|
||||
input.
|
||||
|
||||
`-include FILE'
|
||||
Process FILE as input, and include all the resulting output,
|
||||
before processing the regular input file.
|
||||
|
||||
`-idirafter DIR'
|
||||
Add the directory DIR to the second include path. The directories
|
||||
on the second include path are searched when a header file is not
|
||||
found in any of the directories in the main include path (the one
|
||||
that `-I' adds to).
|
||||
|
||||
`-iprefix PREFIX'
|
||||
Specify PREFIX as the prefix for subsequent `-iwithprefix' options.
|
||||
|
||||
`-iwithprefix DIR'
|
||||
Add a directory to the second include path. The directory's name
|
||||
is made by concatenating PREFIX and DIR, where PREFIX was
|
||||
specified previously with `-iprefix'.
|
||||
|
||||
`-isystem DIR'
|
||||
Add a directory to the beginning of the second include path,
|
||||
marking it as a system directory, so that it gets the same special
|
||||
treatment as is applied to the standard system directories.
|
||||
|
||||
`-lang-c'
|
||||
`-lang-c89'
|
||||
`-lang-c++'
|
||||
`-lang-objc'
|
||||
`-lang-objc++'
|
||||
Specify the source language. `-lang-c' is the default; it allows
|
||||
recognition of C++ comments (comments that begin with `//' and end
|
||||
at end of line) and hexadecimal floating-point constants, since
|
||||
these features will most likely appear in the next C standard.
|
||||
`-lang-c89' disables recognition of C++ comments and hexadecimal
|
||||
floating-point constants. `-lang-c++' handles C++ comment syntax
|
||||
and includes extra default include directories for C++.
|
||||
`-lang-objc' enables the Objective C `#import' directive.
|
||||
`-lang-objc++' enables both C++ and Objective C extensions.
|
||||
|
||||
These options are generated by the compiler driver `gcc', but not
|
||||
passed from the `gcc' command line unless you use the driver's
|
||||
`-Wp' option.
|
||||
|
||||
`-lint'
|
||||
Look for commands to the program checker `lint' embedded in
|
||||
comments, and emit them preceded by `#pragma lint'. For example,
|
||||
the comment `/* NOTREACHED */' becomes `#pragma lint NOTREACHED'.
|
||||
|
||||
This option is available only when you call `cpp' directly; `gcc'
|
||||
will not pass it from its command line.
|
||||
|
||||
`-$'
|
||||
Forbid the use of `$' in identifiers. This was formerly required
|
||||
for strict conformance to the C Standard before the standard was
|
||||
corrected.
|
||||
|
||||
This option is available only when you call `cpp' directly; `gcc'
|
||||
will not pass it from its command line.
|
||||
|
||||
|
||||
File: cpp.info, Node: Concept Index, Next: Index, Prev: Invocation, Up: Top
|
||||
|
||||
Concept Index
|
||||
*************
|
||||
|
||||
* Menu:
|
||||
|
||||
* ##: Concatenation.
|
||||
* arguments in macro definitions: Argument Macros.
|
||||
* assertions: Assertions.
|
||||
* assertions, undoing: Assertions.
|
||||
* blank macro arguments: Argument Macros.
|
||||
* cascaded macros: Cascaded Macros.
|
||||
* commenting out code: Deleted Code.
|
||||
* computed #include: Include Syntax.
|
||||
* concatenation: Concatenation.
|
||||
* conditionals: Conditionals.
|
||||
* directives: Directives.
|
||||
* expansion of arguments: Argument Prescan.
|
||||
* function-like macro: Argument Macros.
|
||||
* header file: Header Files.
|
||||
* including just once: Once-Only.
|
||||
* inheritance: Inheritance.
|
||||
* invocation of the preprocessor: Invocation.
|
||||
* line control: Combining Sources.
|
||||
* macro argument expansion: Argument Prescan.
|
||||
* macro body uses macro: Cascaded Macros.
|
||||
* macros with argument: Argument Macros.
|
||||
* manifest constant: Simple Macros.
|
||||
* newlines in macro arguments: Newlines in Args.
|
||||
* null directive: Other Directives.
|
||||
* options: Invocation.
|
||||
* output format: Output.
|
||||
* overriding a header file: Inheritance.
|
||||
* parentheses in macro bodies: Macro Parentheses.
|
||||
* pitfalls of macros: Macro Pitfalls.
|
||||
* predefined macros: Predefined.
|
||||
* predicates: Assertions.
|
||||
* preprocessing directives: Directives.
|
||||
* prescan of macro arguments: Argument Prescan.
|
||||
* problems with macros: Macro Pitfalls.
|
||||
* redefining macros: Redefining.
|
||||
* repeated inclusion: Once-Only.
|
||||
* retracting assertions: Assertions.
|
||||
* second include path: Invocation.
|
||||
* self-reference: Self-Reference.
|
||||
* semicolons (after macro calls): Swallow Semicolon.
|
||||
* side effects (in macro arguments): Side Effects.
|
||||
* simple macro: Simple Macros.
|
||||
* space as macro argument: Argument Macros.
|
||||
* standard predefined macros: Standard Predefined.
|
||||
* stringification: Stringification.
|
||||
* testing predicates: Assertions.
|
||||
* unassert: Assertions.
|
||||
* undefining macros: Undefining.
|
||||
* unsafe macros: Side Effects.
|
||||
|
||||
|
||||
File: cpp.info, Node: Index, Prev: Concept Index, Up: Top
|
||||
|
||||
Index of Directives, Macros and Options
|
||||
***************************************
|
||||
|
||||
* Menu:
|
||||
|
||||
* #assert: Assertions.
|
||||
* #cpu: Assertions.
|
||||
* #define: Argument Macros.
|
||||
* #elif: #elif Directive.
|
||||
* #else: #else Directive.
|
||||
* #error: #error Directive.
|
||||
* #ident: Other Directives.
|
||||
* #if: Conditional Syntax.
|
||||
* #ifdef: Conditionals-Macros.
|
||||
* #ifndef: Conditionals-Macros.
|
||||
* #import: Once-Only.
|
||||
* #include: Include Syntax.
|
||||
* #include_next: Inheritance.
|
||||
* #line: Combining Sources.
|
||||
* #machine: Assertions.
|
||||
* #pragma: Other Directives.
|
||||
* #pragma once: Once-Only.
|
||||
* #system: Assertions.
|
||||
* #unassert: Assertions.
|
||||
* #warning: #error Directive.
|
||||
* -$: Invocation.
|
||||
* -A: Invocation.
|
||||
* -C: Invocation.
|
||||
* -D: Invocation.
|
||||
* -dD: Invocation.
|
||||
* -dI: Invocation.
|
||||
* -dM: Invocation.
|
||||
* -H: Invocation.
|
||||
* -I: Invocation.
|
||||
* -idirafter: Invocation.
|
||||
* -imacros: Invocation.
|
||||
* -include: Invocation.
|
||||
* -iprefix: Invocation.
|
||||
* -isystem: Invocation.
|
||||
* -iwithprefix: Invocation.
|
||||
* -lang-c: Invocation.
|
||||
* -lang-c++: Invocation.
|
||||
* -lang-c89: Invocation.
|
||||
* -lang-objc: Invocation.
|
||||
* -lang-objc++: Invocation.
|
||||
* -M: Invocation.
|
||||
* -MD: Invocation.
|
||||
* -MM: Invocation.
|
||||
* -MMD: Invocation.
|
||||
* -nostdinc: Invocation.
|
||||
* -nostdinc++: Invocation.
|
||||
* -P: Invocation.
|
||||
* -pedantic: Invocation.
|
||||
* -pedantic-errors: Invocation.
|
||||
* -traditional: Invocation.
|
||||
* -trigraphs: Invocation.
|
||||
* -U: Invocation.
|
||||
* -undef: Invocation.
|
||||
* -Wall: Invocation.
|
||||
* -Wcomment: Invocation.
|
||||
* -Wtraditional: Invocation.
|
||||
* -Wtrigraphs: Invocation.
|
||||
* -Wundef: Invocation.
|
||||
* __BASE_FILE__: Standard Predefined.
|
||||
* __CHAR_UNSIGNED__: Standard Predefined.
|
||||
* __cplusplus: Standard Predefined.
|
||||
* __DATE__: Standard Predefined.
|
||||
* __FILE__: Standard Predefined.
|
||||
* __GNUC__: Standard Predefined.
|
||||
* __GNUC_MINOR__: Standard Predefined.
|
||||
* __GNUG__: Standard Predefined.
|
||||
* __INCLUDE_LEVEL_: Standard Predefined.
|
||||
* __LINE__: Standard Predefined.
|
||||
* __OPTIMIZE__: Standard Predefined.
|
||||
* __REGISTER_PREFIX__: Standard Predefined.
|
||||
* __STDC__: Standard Predefined.
|
||||
* __STDC_VERSION__: Standard Predefined.
|
||||
* __STRICT_ANSI__: Standard Predefined.
|
||||
* __TIME__: Standard Predefined.
|
||||
* __USER_LABEL_PREFIX__: Standard Predefined.
|
||||
* __VERSION__: Standard Predefined.
|
||||
* _AM29000: Nonstandard Predefined.
|
||||
* _AM29K: Nonstandard Predefined.
|
||||
* BSD: Nonstandard Predefined.
|
||||
* defined: Conditionals-Macros.
|
||||
* M68020: Nonstandard Predefined.
|
||||
* m68k: Nonstandard Predefined.
|
||||
* mc68000: Nonstandard Predefined.
|
||||
* ns32000: Nonstandard Predefined.
|
||||
* pyr: Nonstandard Predefined.
|
||||
* sequent: Nonstandard Predefined.
|
||||
* sun: Nonstandard Predefined.
|
||||
* system header files: Header Uses.
|
||||
* unix: Nonstandard Predefined.
|
||||
* vax: Nonstandard Predefined.
|
||||
|
||||
|
230
gcc/cpplib.c
230
gcc/cpplib.c
|
@ -80,11 +80,16 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif /* USG */
|
||||
#endif /* not VMS */
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
/* This defines "errno" properly for VMS, and gives us EACCES. */
|
||||
#include <errno.h>
|
||||
|
||||
extern char *index ();
|
||||
extern char *rindex ();
|
||||
extern char *update_path ();
|
||||
|
||||
#ifndef O_RDONLY
|
||||
#define O_RDONLY 0
|
||||
|
@ -95,18 +100,26 @@ extern char *rindex ();
|
|||
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
|
||||
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
|
||||
|
||||
/* Find the largest host integer type and set its size and type. */
|
||||
|
||||
#ifndef HOST_BITS_PER_WIDE_INT
|
||||
|
||||
#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
|
||||
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
|
||||
#define HOST_WIDE_INT long
|
||||
#else
|
||||
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
|
||||
#define HOST_WIDE_INT int
|
||||
#endif
|
||||
/* Find the largest host integer type and set its size and type.
|
||||
Watch out: on some crazy hosts `long' is shorter than `int'. */
|
||||
|
||||
#ifndef HOST_WIDE_INT
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# define HOST_WIDE_INT intmax_t
|
||||
# else
|
||||
# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT \
|
||||
&& HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
|
||||
# define HOST_WIDE_INT int
|
||||
# else
|
||||
# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG \
|
||||
|| ! (defined LONG_LONG_MAX || defined LLONG_MAX))
|
||||
# define HOST_WIDE_INT long
|
||||
# else
|
||||
# define HOST_WIDE_INT long long
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
|
@ -242,36 +255,35 @@ struct cpp_pending {
|
|||
|
||||
/* Forward declarations. */
|
||||
|
||||
extern char *xmalloc ();
|
||||
char *xmalloc ();
|
||||
void cpp_fatal ();
|
||||
void cpp_file_line_for_message PARAMS ((cpp_reader *, char *, int, int));
|
||||
void cpp_hash_cleanup PARAMS ((cpp_reader *));
|
||||
void cpp_message ();
|
||||
void cpp_print_containing_files PARAMS ((cpp_reader *));
|
||||
|
||||
static void add_import ();
|
||||
static void append_include_chain ();
|
||||
static void make_undef ();
|
||||
static void make_assertion ();
|
||||
static void path_include ();
|
||||
static void initialize_builtins ();
|
||||
static void initialize_char_syntax ();
|
||||
static void dump_arg_n ();
|
||||
static void dump_defn_1 ();
|
||||
extern void delete_macro ();
|
||||
#if 0
|
||||
static void trigraph_pcp ();
|
||||
#endif
|
||||
static int finclude ();
|
||||
static void validate_else ();
|
||||
static int comp_def_part ();
|
||||
#ifdef abort
|
||||
extern void fancy_abort ();
|
||||
#endif
|
||||
static void pipe_closed ();
|
||||
static void print_containing_files ();
|
||||
static int lookup_import ();
|
||||
static int redundant_include_p ();
|
||||
static is_system_include ();
|
||||
static struct file_name_map *read_name_map ();
|
||||
static char *read_filename_string ();
|
||||
static int open_include_file ();
|
||||
static int check_preconditions ();
|
||||
static void pcfinclude ();
|
||||
static void pcstring_used ();
|
||||
static int check_macro_name ();
|
||||
static int compare_defs ();
|
||||
static int compare_token_lists ();
|
||||
|
@ -352,6 +364,7 @@ struct file_name_list
|
|||
/* The */
|
||||
static struct default_include {
|
||||
char *fname; /* The name of the directory. */
|
||||
char *component; /* The component containing the directory */
|
||||
int cplusplus; /* Only look here if we're compiling C++. */
|
||||
int cxx_aware; /* Includes in this directory don't need to
|
||||
be wrapped in extern "C" when compiling
|
||||
|
@ -362,40 +375,43 @@ static struct default_include {
|
|||
#else
|
||||
= {
|
||||
/* Pick up GNU C++ specific include files. */
|
||||
{ GPLUSPLUS_INCLUDE_DIR, 1, 1 },
|
||||
{ OLD_GPLUSPLUS_INCLUDE_DIR, 1, 1 },
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
|
||||
{ OLD_GPLUSPLUS_INCLUDE_DIR, 0, 1, 1 },
|
||||
#ifdef CROSS_COMPILE
|
||||
/* This is the dir for fixincludes. Put it just before
|
||||
the files that we fix. */
|
||||
{ GCC_INCLUDE_DIR, 0, 0 },
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
/* For cross-compilation, this dir name is generated
|
||||
automatically in Makefile.in. */
|
||||
{ CROSS_INCLUDE_DIR, 0, 0 },
|
||||
{ CROSS_INCLUDE_DIR, "GCC",0, 0 },
|
||||
#ifdef TOOL_INCLUDE_DIR
|
||||
/* This is another place that the target system's headers might be. */
|
||||
{ TOOL_INCLUDE_DIR, 0, 1 },
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 },
|
||||
#endif
|
||||
#else /* not CROSS_COMPILE */
|
||||
#ifdef LOCAL_INCLUDE_DIR
|
||||
/* This should be /usr/local/include and should come before
|
||||
the fixincludes-fixed header files. */
|
||||
{ LOCAL_INCLUDE_DIR, 0, 1 },
|
||||
{ LOCAL_INCLUDE_DIR, 0, 0, 1 },
|
||||
#endif
|
||||
#ifdef TOOL_INCLUDE_DIR
|
||||
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
|
||||
Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
|
||||
{ TOOL_INCLUDE_DIR, 0, 1 },
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 },
|
||||
#endif
|
||||
/* This is the dir for fixincludes. Put it just before
|
||||
the files that we fix. */
|
||||
{ GCC_INCLUDE_DIR, 0, 0 },
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
/* Some systems have an extra dir of include files. */
|
||||
#ifdef SYSTEM_INCLUDE_DIR
|
||||
{ SYSTEM_INCLUDE_DIR, 0, 0 },
|
||||
{ SYSTEM_INCLUDE_DIR, 0, 0, 0 },
|
||||
#endif
|
||||
{ STANDARD_INCLUDE_DIR, 0, 0 },
|
||||
#ifndef STANDARD_INCLUDE_COMPONENT
|
||||
#define STANDARD_INCLUDE_COMPONENT 0
|
||||
#endif
|
||||
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0 },
|
||||
#endif /* not CROSS_COMPILE */
|
||||
{ 0, 0, 0 }
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
#endif /* no INCLUDE_DEFAULTS */
|
||||
|
||||
|
@ -407,15 +423,15 @@ struct directive {
|
|||
char *name; /* Name of directive */
|
||||
enum node_type type; /* Code which describes which directive. */
|
||||
char command_reads_line; /* One if rest of line is read by func. */
|
||||
char traditional_comments; /* Nonzero: keep comments if -traditional. */
|
||||
char pass_thru; /* Copy preprocessed directive to output file.*/
|
||||
};
|
||||
|
||||
#define IS_INCLUDE_DIRECTIVE_TYPE(t) (T_INCLUDE <= (t) && (t) <= T_IMPORT)
|
||||
|
||||
/* Here is the actual list of #-directives, most-often-used first.
|
||||
The initialize_builtins function assumes #define is the very first. */
|
||||
|
||||
static struct directive directive_table[] = {
|
||||
{ 6, do_define, "define", T_DEFINE, 0, 1},
|
||||
{ 6, do_define, "define", T_DEFINE},
|
||||
{ 5, do_xifdef, "ifdef", T_IFDEF, 1},
|
||||
{ 6, do_xifdef, "ifndef", T_IFNDEF, 1},
|
||||
{ 7, do_include, "include", T_INCLUDE, 1},
|
||||
|
@ -428,9 +444,9 @@ static struct directive directive_table[] = {
|
|||
{ 5, do_undef, "undef", T_UNDEF},
|
||||
{ 5, do_error, "error", T_ERROR},
|
||||
{ 7, do_warning, "warning", T_WARNING},
|
||||
{ 6, do_pragma, "pragma", T_PRAGMA, 0, 0, 1},
|
||||
{ 6, do_pragma, "pragma", T_PRAGMA},
|
||||
{ 4, do_line, "line", T_LINE, 1},
|
||||
{ 5, do_ident, "ident", T_IDENT, 1, 0, 1},
|
||||
{ 5, do_ident, "ident", T_IDENT, 1},
|
||||
#ifdef SCCS_DIRECTIVE
|
||||
{ 4, do_sccs, "sccs", T_SCCS},
|
||||
#endif
|
||||
|
@ -510,7 +526,7 @@ quote_string (pfile, src)
|
|||
CPP_PUTC_Q (pfile, c);
|
||||
else
|
||||
{
|
||||
sprintf ((char *) CPP_PWRITTEN (pfile), "\\%03o", c);
|
||||
sprintf ((char *)CPP_PWRITTEN (pfile), "\\%03o", c);
|
||||
CPP_ADJUST_WRITTEN (pfile, 4);
|
||||
}
|
||||
break;
|
||||
|
@ -981,7 +997,7 @@ copy_rest_of_line (pfile)
|
|||
break;
|
||||
case '/':
|
||||
nextc = PEEKC();
|
||||
if (nextc == '*' || (opts->cplusplus_comments && nextc == '*'))
|
||||
if (nextc == '*' || (opts->cplusplus_comments && nextc == '/'))
|
||||
goto scan_directive_token;
|
||||
break;
|
||||
case '\f':
|
||||
|
@ -1091,7 +1107,7 @@ handle_directive (pfile)
|
|||
{
|
||||
/* Nonzero means do not delete comments within the directive.
|
||||
#define needs this when -traditional. */
|
||||
int comments = CPP_TRADITIONAL (pfile) && kt->traditional_comments;
|
||||
int comments = CPP_TRADITIONAL (pfile) && kt->type == T_DEFINE;
|
||||
int save_put_out_comments = CPP_OPTIONS (pfile)->put_out_comments;
|
||||
CPP_OPTIONS (pfile)->put_out_comments = comments;
|
||||
after_ident = CPP_WRITTEN (pfile);
|
||||
|
@ -1099,37 +1115,39 @@ handle_directive (pfile)
|
|||
CPP_OPTIONS (pfile)->put_out_comments = save_put_out_comments;
|
||||
}
|
||||
|
||||
/* For #pragma and #define, we may want to pass through the directive.
|
||||
/* We may want to pass through #define, #pragma, and #include.
|
||||
Other directives may create output, but we don't want the directive
|
||||
itself out, so we pop it now. For example #include may write a #line
|
||||
command (see comment in do_include), and conditionals may emit
|
||||
itself out, so we pop it now. For example conditionals may emit
|
||||
#failed ... #endfailed stuff. But note that popping the buffer
|
||||
means the parameters to kt->func may point after pfile->limit
|
||||
so these parameters are invalid as soon as something gets appended
|
||||
to the token_buffer. */
|
||||
|
||||
line_end = CPP_PWRITTEN (pfile);
|
||||
if (!kt->pass_thru && kt->type != T_DEFINE)
|
||||
if (! (kt->type == T_DEFINE
|
||||
|| kt->type == T_PRAGMA
|
||||
|| (IS_INCLUDE_DIRECTIVE_TYPE (kt->type)
|
||||
&& CPP_OPTIONS (pfile)->dump_includes)))
|
||||
CPP_SET_WRITTEN (pfile, old_written);
|
||||
|
||||
(*kt->func) (pfile, kt, pfile->token_buffer + after_ident, line_end);
|
||||
if (kt->pass_thru
|
||||
|| (kt->type == T_DEFINE
|
||||
&& CPP_OPTIONS (pfile)->dump_macros == dump_definitions))
|
||||
|
||||
if (kt->type == T_DEFINE)
|
||||
{
|
||||
/* Just leave the entire #define in the output stack. */
|
||||
if (CPP_OPTIONS (pfile)->dump_macros == dump_names)
|
||||
{
|
||||
/* Skip "#define". */
|
||||
U_CHAR *p = pfile->token_buffer + old_written + 7;
|
||||
|
||||
SKIP_WHITE_SPACE (p);
|
||||
while (is_idchar[*p]) p++;
|
||||
pfile->limit = p;
|
||||
CPP_PUTC (pfile, '\n');
|
||||
}
|
||||
else if (CPP_OPTIONS (pfile)->dump_macros != dump_definitions)
|
||||
CPP_SET_WRITTEN (pfile, old_written);
|
||||
}
|
||||
else if (kt->type == T_DEFINE
|
||||
&& CPP_OPTIONS (pfile)->dump_macros == dump_names)
|
||||
{
|
||||
U_CHAR *p = pfile->token_buffer + old_written + 7; /* Skip "#define". */
|
||||
SKIP_WHITE_SPACE (p);
|
||||
while (is_idchar[*p]) p++;
|
||||
pfile->limit = p;
|
||||
CPP_PUTC (pfile, '\n');
|
||||
}
|
||||
else if (kt->type == T_DEFINE)
|
||||
CPP_SET_WRITTEN (pfile, old_written);
|
||||
|
||||
done_a_directive:
|
||||
return 1;
|
||||
|
||||
|
@ -2133,7 +2151,7 @@ output_line_command (pfile, conditional, file_change)
|
|||
CPP_PUTS_Q (pfile, sharp_line, sizeof(sharp_line)-1);
|
||||
}
|
||||
|
||||
sprintf ((char *) CPP_PWRITTEN (pfile), "%d ", line);
|
||||
sprintf ((char *) CPP_PWRITTEN (pfile), "%ld ", line);
|
||||
CPP_ADJUST_WRITTEN (pfile, strlen (CPP_PWRITTEN (pfile)));
|
||||
|
||||
quote_string (pfile, ip->nominal_fname);
|
||||
|
@ -2377,6 +2395,12 @@ special_symbol (hp, pfile)
|
|||
case T_CONST:
|
||||
buf = (char *) alloca (4 * sizeof (int));
|
||||
sprintf (buf, "%d", hp->value.ival);
|
||||
#ifdef STDC_0_IN_SYSTEM_HEADERS
|
||||
if (ip->system_header_p
|
||||
&& hp->length == 8 && bcmp (hp->name, "__STDC__", 8) == 0
|
||||
&& ! cpp_lookup (pfile, (U_CHAR *) "__STRICT_ANSI__", -1, -1))
|
||||
strcpy (buf, "0");
|
||||
#endif
|
||||
#if 0
|
||||
if (pcp_inside_if && pcp_outfile)
|
||||
/* Output a precondition for this macro use */
|
||||
|
@ -2391,7 +2415,7 @@ special_symbol (hp, pfile)
|
|||
adjust_position (CPP_LINE_BASE (ip), ip->cur, &line, &col);
|
||||
|
||||
buf = (char *) alloca (10);
|
||||
sprintf (buf, "%d", line);
|
||||
sprintf (buf, "%ld", line);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2498,26 +2522,26 @@ static void
|
|||
initialize_builtins (pfile)
|
||||
cpp_reader *pfile;
|
||||
{
|
||||
install ("__LINE__", -1, T_SPECLINE, 0, 0, -1);
|
||||
install ("__DATE__", -1, T_DATE, 0, 0, -1);
|
||||
install ("__FILE__", -1, T_FILE, 0, 0, -1);
|
||||
install ("__BASE_FILE__", -1, T_BASE_FILE, 0, 0, -1);
|
||||
install ("__INCLUDE_LEVEL__", -1, T_INCLUDE_LEVEL, 0, 0, -1);
|
||||
install ("__VERSION__", -1, T_VERSION, 0, 0, -1);
|
||||
install ((U_CHAR *)"__LINE__", -1, T_SPECLINE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__DATE__", -1, T_DATE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__FILE__", -1, T_FILE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__BASE_FILE__", -1, T_BASE_FILE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__INCLUDE_LEVEL__", -1, T_INCLUDE_LEVEL, 0, 0, -1);
|
||||
install ((U_CHAR *)"__VERSION__", -1, T_VERSION, 0, 0, -1);
|
||||
#ifndef NO_BUILTIN_SIZE_TYPE
|
||||
install ("__SIZE_TYPE__", -1, T_SIZE_TYPE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__SIZE_TYPE__", -1, T_SIZE_TYPE, 0, 0, -1);
|
||||
#endif
|
||||
#ifndef NO_BUILTIN_PTRDIFF_TYPE
|
||||
install ("__PTRDIFF_TYPE__ ", -1, T_PTRDIFF_TYPE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__PTRDIFF_TYPE__ ", -1, T_PTRDIFF_TYPE, 0, 0, -1);
|
||||
#endif
|
||||
install ("__WCHAR_TYPE__", -1, T_WCHAR_TYPE, 0, 0, -1);
|
||||
install ("__USER_LABEL_PREFIX__", -1, T_USER_LABEL_PREFIX_TYPE, 0, 0, -1);
|
||||
install ("__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE, 0, 0, -1);
|
||||
install ("__TIME__", -1, T_TIME, 0, 0, -1);
|
||||
install ((U_CHAR *)"__WCHAR_TYPE__", -1, T_WCHAR_TYPE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__USER_LABEL_PREFIX__", -1, T_USER_LABEL_PREFIX_TYPE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE, 0, 0, -1);
|
||||
install ((U_CHAR *)"__TIME__", -1, T_TIME, 0, 0, -1);
|
||||
if (!CPP_TRADITIONAL (pfile))
|
||||
install ("__STDC__", -1, T_CONST, STDC_VALUE, 0, -1);
|
||||
install ((U_CHAR *)"__STDC__", -1, T_CONST, STDC_VALUE, 0, -1);
|
||||
if (CPP_OPTIONS (pfile)->objc)
|
||||
install ("__OBJC__", -1, T_CONST, 1, 0, -1);
|
||||
install ((U_CHAR *)"__OBJC__", -1, T_CONST, 1, 0, -1);
|
||||
/* This is supplied using a -D by the compiler driver
|
||||
so that it is present only when truly compiling with GNU C. */
|
||||
/* install ("__GNUC__", -1, T_CONST, 2, 0, -1); */
|
||||
|
@ -2809,7 +2833,7 @@ macroexpand (pfile, hp)
|
|||
else
|
||||
{
|
||||
CPP_RESERVE (pfile, 4);
|
||||
sprintf ((char *) CPP_PWRITTEN (pfile), "\\%03o",
|
||||
sprintf ((char *)CPP_PWRITTEN (pfile), "\\%03o",
|
||||
(unsigned int) c);
|
||||
CPP_ADJUST_WRITTEN (pfile, 4);
|
||||
}
|
||||
|
@ -3728,7 +3752,7 @@ do_line (pfile, keyword)
|
|||
/* The Newline at the end of this line remains to be processed.
|
||||
To put the next line at the specified line number,
|
||||
we must store a line number now that is one less. */
|
||||
new_lineno = atoi ((char *) pfile->token_buffer + old_written) - 1;
|
||||
new_lineno = atoi ((char *)(pfile->token_buffer + old_written)) - 1;
|
||||
CPP_SET_WRITTEN (pfile, old_written);
|
||||
|
||||
/* NEW_LINENO is one less than the actual line number here. */
|
||||
|
@ -3948,7 +3972,7 @@ do_once (pfile)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* #ident has already been copied to the output file, so just ignore it. */
|
||||
/* Report program identification. */
|
||||
|
||||
static int
|
||||
do_ident (pfile, keyword, buf, limit)
|
||||
|
@ -4136,7 +4160,7 @@ eval_if_expression (pfile, buf, length)
|
|||
HOST_WIDE_INT value;
|
||||
long old_written = CPP_WRITTEN (pfile);
|
||||
|
||||
save_defined = install ("defined", -1, T_SPEC_DEFINED, 0, 0, -1);
|
||||
save_defined = install ((U_CHAR *)"defined", -1, T_SPEC_DEFINED, 0, 0, -1);
|
||||
pfile->pcp_inside_if = 1;
|
||||
|
||||
value = cpp_parse_expr (pfile);
|
||||
|
@ -5887,6 +5911,7 @@ cpp_start_read (pfile, fname)
|
|||
nstore[endp-startp] = '\0';
|
||||
|
||||
include_defaults[num_dirs].fname = savestring (nstore);
|
||||
include_defaults[num_dirs].component = 0;
|
||||
include_defaults[num_dirs].cplusplus = opts->cplusplus;
|
||||
include_defaults[num_dirs].cxx_aware = 1;
|
||||
num_dirs++;
|
||||
|
@ -5953,7 +5978,7 @@ cpp_start_read (pfile, fname)
|
|||
= (struct file_name_list *) xmalloc (sizeof (struct file_name_list));
|
||||
new->control_macro = 0;
|
||||
new->c_system_include_path = !p->cxx_aware;
|
||||
new->fname = p->fname;
|
||||
new->fname = update_path (p->fname, p->component);
|
||||
new->got_name_map = 0;
|
||||
append_include_chain (pfile, new, new);
|
||||
if (opts->first_system_include == 0)
|
||||
|
@ -6077,8 +6102,12 @@ cpp_start_read (pfile, fname)
|
|||
deps_output (pfile, "-", ':');
|
||||
else
|
||||
{
|
||||
char *p, *q;
|
||||
int len;
|
||||
char *p, *q, *r;
|
||||
int len, x;
|
||||
static char *known_suffixes[] = { ".c", ".C", ".s", ".S", ".m",
|
||||
".cc", ".cxx", ".cpp", ".cp",
|
||||
".c++", 0
|
||||
};
|
||||
|
||||
/* Discard all directory prefixes from filename. */
|
||||
if ((q = rindex (opts->in_fname, '/')) != NULL
|
||||
|
@ -6097,27 +6126,21 @@ cpp_start_read (pfile, fname)
|
|||
/* Output P, but remove known suffixes. */
|
||||
len = strlen (p);
|
||||
q = p + len;
|
||||
if (len >= 2
|
||||
&& p[len - 2] == '.'
|
||||
&& index("cCsSm", p[len - 1]))
|
||||
q = p + (len - 2);
|
||||
else if (len >= 3
|
||||
&& p[len - 3] == '.'
|
||||
&& p[len - 2] == 'c'
|
||||
&& p[len - 1] == 'c')
|
||||
q = p + (len - 3);
|
||||
else if (len >= 4
|
||||
&& p[len - 4] == '.'
|
||||
&& p[len - 3] == 'c'
|
||||
&& p[len - 2] == 'x'
|
||||
&& p[len - 1] == 'x')
|
||||
q = p + (len - 4);
|
||||
else if (len >= 4
|
||||
&& p[len - 4] == '.'
|
||||
&& p[len - 3] == 'c'
|
||||
&& p[len - 2] == 'p'
|
||||
&& p[len - 1] == 'p')
|
||||
q = p + (len - 4);
|
||||
/* Point to the filename suffix. */
|
||||
r = rindex (p, '.');
|
||||
/* Compare against the known suffixes. */
|
||||
x = 0;
|
||||
while (known_suffixes[x] != 0)
|
||||
{
|
||||
if (strncmp (known_suffixes[x], r, q - r) == 0)
|
||||
{
|
||||
/* Make q point to the bit we're going to overwrite
|
||||
with an object suffix. */
|
||||
q = r;
|
||||
break;
|
||||
}
|
||||
x++;
|
||||
}
|
||||
|
||||
/* Supply our own suffix. */
|
||||
#ifndef VMS
|
||||
|
@ -6575,6 +6598,9 @@ cpp_handle_options (pfile, argc, argv)
|
|||
case 'D':
|
||||
opts->dump_macros = dump_definitions;
|
||||
break;
|
||||
case 'I':
|
||||
opts->dump_includes = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
81
gcc/cse.c
81
gcc/cse.c
|
@ -561,7 +561,8 @@ struct cse_basic_block_data {
|
|||
|| XEXP (X, 0) == hard_frame_pointer_rtx \
|
||||
|| XEXP (X, 0) == arg_pointer_rtx \
|
||||
|| XEXP (X, 0) == virtual_stack_vars_rtx \
|
||||
|| XEXP (X, 0) == virtual_incoming_args_rtx)))
|
||||
|| XEXP (X, 0) == virtual_incoming_args_rtx)) \
|
||||
|| GET_CODE (X) == ADDRESSOF)
|
||||
|
||||
/* Similar, but also allows reference to the stack pointer.
|
||||
|
||||
|
@ -585,7 +586,8 @@ struct cse_basic_block_data {
|
|||
|| (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == CONST_INT \
|
||||
&& (XEXP (X, 0) == stack_pointer_rtx \
|
||||
|| XEXP (X, 0) == virtual_stack_dynamic_rtx \
|
||||
|| XEXP (X, 0) == virtual_outgoing_args_rtx)))
|
||||
|| XEXP (X, 0) == virtual_outgoing_args_rtx)) \
|
||||
|| GET_CODE (X) == ADDRESSOF)
|
||||
|
||||
static int notreg_cost PROTO((rtx));
|
||||
static void new_basic_block PROTO((void));
|
||||
|
@ -1871,15 +1873,12 @@ canon_hash (x, mode)
|
|||
|
||||
if (regno < FIRST_PSEUDO_REGISTER
|
||||
&& (global_regs[regno]
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
|| (SMALL_REGISTER_CLASSES
|
||||
&& ! fixed_regs[regno]
|
||||
&& regno != FRAME_POINTER_REGNUM
|
||||
&& regno != HARD_FRAME_POINTER_REGNUM
|
||||
&& regno != ARG_POINTER_REGNUM
|
||||
&& regno != STACK_POINTER_REGNUM)
|
||||
#endif
|
||||
))
|
||||
&& regno != STACK_POINTER_REGNUM)))
|
||||
{
|
||||
do_not_record = 1;
|
||||
return 0;
|
||||
|
@ -1955,6 +1954,10 @@ canon_hash (x, mode)
|
|||
do_not_record = 1;
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
i = GET_RTX_LENGTH (code) - 1;
|
||||
|
@ -1991,6 +1994,8 @@ canon_hash (x, mode)
|
|||
register unsigned tem = XINT (x, i);
|
||||
hash += tem;
|
||||
}
|
||||
else if (fmt[i] == '0')
|
||||
/* unused */;
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
@ -2129,6 +2134,9 @@ exp_equiv_p (x, y, validate, equal_values)
|
|||
validate, equal_values)
|
||||
&& exp_equiv_p (XEXP (x, 1), XEXP (y, 0),
|
||||
validate, equal_values)));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Compare the elements. If any pair of corresponding elements
|
||||
|
@ -2357,6 +2365,9 @@ set_nonvarying_address_components (addr, size, pbase, pstart, pend)
|
|||
base = *pbase;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -2479,6 +2490,9 @@ canon_reg (x, insn)
|
|||
: REGNO_REG_CLASS (first) == NO_REGS ? x
|
||||
: gen_rtx (REG, qty_mode[reg_qty[REGNO (x)]], first));
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fmt = GET_RTX_FORMAT (code);
|
||||
|
@ -2562,6 +2576,7 @@ find_best_addr (insn, loc)
|
|||
&& (regno = REGNO (addr), regno == FRAME_POINTER_REGNUM
|
||||
|| regno == HARD_FRAME_POINTER_REGNUM
|
||||
|| regno == ARG_POINTER_REGNUM))
|
||||
|| GET_CODE (addr) == ADDRESSOF
|
||||
|| CONSTANT_ADDRESS_P (addr))
|
||||
return;
|
||||
|
||||
|
@ -3322,6 +3337,9 @@ simplify_unary_operation (code, mode, op, op_mode)
|
|||
return convert_memory_address (Pmode, op);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -4249,6 +4267,9 @@ simplify_plus_minus (code, mode, op0, op1)
|
|||
if (negs[i])
|
||||
ops[i] = GEN_INT (- INTVAL (ops[i])), negs[i] = 0, changed = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4574,6 +4595,9 @@ simplify_relational_operation (code, mode, op0, op1)
|
|||
&& INTEGRAL_MODE_P (mode))
|
||||
return const0_rtx;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -4603,9 +4627,9 @@ simplify_relational_operation (code, mode, op0, op1)
|
|||
return equal || op0ltu ? const_true_rtx : const0_rtx;
|
||||
case GEU:
|
||||
return equal || op1ltu ? const_true_rtx : const0_rtx;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* Simplify CODE, an operation with result mode MODE and three operands,
|
||||
|
@ -4994,6 +5018,8 @@ fold_rtx (x, insn)
|
|||
else if (GET_CODE (addr) == LO_SUM
|
||||
&& GET_CODE (XEXP (addr, 1)) == SYMBOL_REF)
|
||||
base = XEXP (addr, 1);
|
||||
else if (GET_CODE (addr) == ADDRESSOF)
|
||||
XEXP (x, 0) = addr;
|
||||
|
||||
/* If this is a constant pool reference, we can fold it into its
|
||||
constant to allow better value tracking. */
|
||||
|
@ -5085,6 +5111,9 @@ fold_rtx (x, insn)
|
|||
validate_change (insn, &XVECEXP (x, 3, i),
|
||||
fold_rtx (XVECEXP (x, 3, i), insn), 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
const_arg0 = 0;
|
||||
|
@ -5420,6 +5449,8 @@ fold_rtx (x, insn)
|
|||
if (has_sign)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5615,6 +5646,10 @@ fold_rtx (x, insn)
|
|||
|
||||
return cse_gen_binary (code, mode, y, new_const);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
new = simplify_binary_operation (code, mode,
|
||||
|
@ -7678,6 +7713,9 @@ cse_process_notes (x, object)
|
|||
|
||||
/* Otherwise, canonicalize this register. */
|
||||
return canon_reg (x, NULL_RTX);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < GET_RTX_LENGTH (code); i++)
|
||||
|
@ -8359,6 +8397,7 @@ cse_basic_block (from, to, next_branch, around_loop)
|
|||
register rtx insn;
|
||||
int to_usage = 0;
|
||||
int in_libcall_block = 0;
|
||||
int num_insns = 0;
|
||||
|
||||
/* Each of these arrays is undefined before max_reg, so only allocate
|
||||
the space actually needed and adjust the start below. */
|
||||
|
@ -8391,6 +8430,29 @@ cse_basic_block (from, to, next_branch, around_loop)
|
|||
for (insn = from; insn != to; insn = NEXT_INSN (insn))
|
||||
{
|
||||
register enum rtx_code code;
|
||||
int i;
|
||||
struct table_elt *p, *next;
|
||||
|
||||
/* If we have processed 1,000 insns, flush the hash table to avoid
|
||||
extreme quadratic behavior.
|
||||
|
||||
??? This is a real kludge and needs to be done some other way.
|
||||
Perhaps for 2.9. */
|
||||
if (num_insns++ > 1000)
|
||||
{
|
||||
for (i = 0; i < NBUCKETS; i++)
|
||||
for (p = table[i]; p; p = next)
|
||||
{
|
||||
next = p->next_same_hash;
|
||||
|
||||
if (GET_CODE (p->exp) == REG)
|
||||
invalidate (p->exp, p->mode);
|
||||
else
|
||||
remove_from_table (p, i);
|
||||
}
|
||||
|
||||
num_insns = 0;
|
||||
}
|
||||
|
||||
/* See if this is a branch that is part of the path. If so, and it is
|
||||
to be taken, do so. */
|
||||
|
@ -8614,6 +8676,9 @@ count_reg_usage (x, counts, dest, incr)
|
|||
count_reg_usage (XEXP (x, 0), counts, NULL_RTX, incr);
|
||||
count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr);
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fmt = GET_RTX_FORMAT (code);
|
||||
|
|
|
@ -67,11 +67,11 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
For more on data type definitions, see `dbxout_type'. */
|
||||
|
||||
/* Include these first, because they may define MIN and MAX. */
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "tree.h"
|
||||
#include "rtl.h"
|
||||
#include "flags.h"
|
||||
|
@ -1870,6 +1870,10 @@ dbxout_symbol (decl, local)
|
|||
#endif
|
||||
|
||||
dbxout_symbol_location (decl, type, 0, DECL_RTL (decl));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Declarations and definitions of codes relating to the DWARF2 symbolic
|
||||
debugging information format.
|
||||
Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Gary Funck (gary@intrepid.com). Derived from the
|
||||
DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com).
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Output Dwarf2 format symbol table information from the GNU C compiler.
|
||||
Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Gary Funck (gary@intrepid.com). Derived from the
|
||||
DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com).
|
||||
Contributed by Gary Funck (gary@intrepid.com).
|
||||
Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
|
||||
Extensively modified by Jason Merrill (jason@cygnus.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -743,6 +743,8 @@ lookup_cfa_1 (cfi, regp, offsetp)
|
|||
*regp = cfi->dw_cfi_oprnd1.dw_cfi_reg_num;
|
||||
*offsetp = cfi->dw_cfi_oprnd2.dw_cfi_offset;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1170,7 +1172,6 @@ dwarf2out_frame_debug (insn)
|
|||
assert (XEXP (src, 1) == stack_pointer_rtx);
|
||||
assert (GET_CODE (XEXP (src, 0)) == REG
|
||||
&& REGNO (XEXP (src, 0)) == cfa_temp_reg);
|
||||
assert (cfa_store_reg == STACK_POINTER_REGNUM);
|
||||
cfa_store_reg = REGNO (dest);
|
||||
cfa_store_offset -= cfa_temp_value;
|
||||
}
|
||||
|
@ -1489,13 +1490,6 @@ output_call_frame_info (for_eh)
|
|||
/* Do we want to include a pointer to the exception table? */
|
||||
int eh_ptr = for_eh && exception_table_p ();
|
||||
|
||||
/* Only output the info if it will be interesting. */
|
||||
for (i = 0; i < fde_table_in_use; ++i)
|
||||
if (fde_table[i].dw_fde_cfi != NULL)
|
||||
break;
|
||||
if (i == fde_table_in_use)
|
||||
return;
|
||||
|
||||
fputc ('\n', asm_out_file);
|
||||
|
||||
/* We're going to be generating comments, so turn on app. */
|
||||
|
@ -4094,6 +4088,8 @@ print_die (die, outfile)
|
|||
else
|
||||
fprintf (outfile, "<null>");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf (outfile, "\n");
|
||||
|
@ -6880,6 +6876,11 @@ add_location_or_const_value_attribute (die, decl)
|
|||
|
||||
switch (GET_CODE (rtl))
|
||||
{
|
||||
case ADDRESSOF:
|
||||
/* The address of a variable that was optimized away; don't emit
|
||||
anything. */
|
||||
break;
|
||||
|
||||
case CONST_INT:
|
||||
case CONST_DOUBLE:
|
||||
case CONST_STRING:
|
||||
|
@ -7667,7 +7668,7 @@ gen_enumeration_type_die (type, context_die)
|
|||
|
||||
TREE_ASM_WRITTEN (type) = 1;
|
||||
add_byte_size_attribute (type_die, type);
|
||||
if (type_tag (type))
|
||||
if (TYPE_STUB_DECL (type) != NULL_TREE)
|
||||
add_src_coords_attributes (type_die, TYPE_STUB_DECL (type));
|
||||
|
||||
/* If the first reference to this type was as the return type of an
|
||||
|
@ -8542,7 +8543,7 @@ gen_struct_or_union_type_die (type, context_die)
|
|||
this type is expressed in terms of this type itself. */
|
||||
TREE_ASM_WRITTEN (type) = 1;
|
||||
add_byte_size_attribute (type_die, type);
|
||||
if (type_tag (type))
|
||||
if (TYPE_STUB_DECL (type) != NULL_TREE)
|
||||
add_src_coords_attributes (type_die, TYPE_STUB_DECL (type));
|
||||
|
||||
/* If the first reference to this type was as the return type of an
|
||||
|
|
104
gcc/dwarfout.c
104
gcc/dwarfout.c
|
@ -531,153 +531,153 @@ static void generate_macinfo_entry PROTO((char *, char *));
|
|||
*/
|
||||
|
||||
#ifndef TEXT_BEGIN_LABEL
|
||||
#define TEXT_BEGIN_LABEL ".L_text_b"
|
||||
#define TEXT_BEGIN_LABEL "*.L_text_b"
|
||||
#endif
|
||||
#ifndef TEXT_END_LABEL
|
||||
#define TEXT_END_LABEL ".L_text_e"
|
||||
#define TEXT_END_LABEL "*.L_text_e"
|
||||
#endif
|
||||
|
||||
#ifndef DATA_BEGIN_LABEL
|
||||
#define DATA_BEGIN_LABEL ".L_data_b"
|
||||
#define DATA_BEGIN_LABEL "*.L_data_b"
|
||||
#endif
|
||||
#ifndef DATA_END_LABEL
|
||||
#define DATA_END_LABEL ".L_data_e"
|
||||
#define DATA_END_LABEL "*.L_data_e"
|
||||
#endif
|
||||
|
||||
#ifndef DATA1_BEGIN_LABEL
|
||||
#define DATA1_BEGIN_LABEL ".L_data1_b"
|
||||
#define DATA1_BEGIN_LABEL "*.L_data1_b"
|
||||
#endif
|
||||
#ifndef DATA1_END_LABEL
|
||||
#define DATA1_END_LABEL ".L_data1_e"
|
||||
#define DATA1_END_LABEL "*.L_data1_e"
|
||||
#endif
|
||||
|
||||
#ifndef RODATA_BEGIN_LABEL
|
||||
#define RODATA_BEGIN_LABEL ".L_rodata_b"
|
||||
#define RODATA_BEGIN_LABEL "*.L_rodata_b"
|
||||
#endif
|
||||
#ifndef RODATA_END_LABEL
|
||||
#define RODATA_END_LABEL ".L_rodata_e"
|
||||
#define RODATA_END_LABEL "*.L_rodata_e"
|
||||
#endif
|
||||
|
||||
#ifndef RODATA1_BEGIN_LABEL
|
||||
#define RODATA1_BEGIN_LABEL ".L_rodata1_b"
|
||||
#define RODATA1_BEGIN_LABEL "*.L_rodata1_b"
|
||||
#endif
|
||||
#ifndef RODATA1_END_LABEL
|
||||
#define RODATA1_END_LABEL ".L_rodata1_e"
|
||||
#define RODATA1_END_LABEL "*.L_rodata1_e"
|
||||
#endif
|
||||
|
||||
#ifndef BSS_BEGIN_LABEL
|
||||
#define BSS_BEGIN_LABEL ".L_bss_b"
|
||||
#define BSS_BEGIN_LABEL "*.L_bss_b"
|
||||
#endif
|
||||
#ifndef BSS_END_LABEL
|
||||
#define BSS_END_LABEL ".L_bss_e"
|
||||
#define BSS_END_LABEL "*.L_bss_e"
|
||||
#endif
|
||||
|
||||
#ifndef LINE_BEGIN_LABEL
|
||||
#define LINE_BEGIN_LABEL ".L_line_b"
|
||||
#define LINE_BEGIN_LABEL "*.L_line_b"
|
||||
#endif
|
||||
#ifndef LINE_LAST_ENTRY_LABEL
|
||||
#define LINE_LAST_ENTRY_LABEL ".L_line_last"
|
||||
#define LINE_LAST_ENTRY_LABEL "*.L_line_last"
|
||||
#endif
|
||||
#ifndef LINE_END_LABEL
|
||||
#define LINE_END_LABEL ".L_line_e"
|
||||
#define LINE_END_LABEL "*.L_line_e"
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG_BEGIN_LABEL
|
||||
#define DEBUG_BEGIN_LABEL ".L_debug_b"
|
||||
#define DEBUG_BEGIN_LABEL "*.L_debug_b"
|
||||
#endif
|
||||
#ifndef SFNAMES_BEGIN_LABEL
|
||||
#define SFNAMES_BEGIN_LABEL ".L_sfnames_b"
|
||||
#define SFNAMES_BEGIN_LABEL "*.L_sfnames_b"
|
||||
#endif
|
||||
#ifndef SRCINFO_BEGIN_LABEL
|
||||
#define SRCINFO_BEGIN_LABEL ".L_srcinfo_b"
|
||||
#define SRCINFO_BEGIN_LABEL "*.L_srcinfo_b"
|
||||
#endif
|
||||
#ifndef MACINFO_BEGIN_LABEL
|
||||
#define MACINFO_BEGIN_LABEL ".L_macinfo_b"
|
||||
#define MACINFO_BEGIN_LABEL "*.L_macinfo_b"
|
||||
#endif
|
||||
|
||||
#ifndef DIE_BEGIN_LABEL_FMT
|
||||
#define DIE_BEGIN_LABEL_FMT ".L_D%u"
|
||||
#define DIE_BEGIN_LABEL_FMT "*.L_D%u"
|
||||
#endif
|
||||
#ifndef DIE_END_LABEL_FMT
|
||||
#define DIE_END_LABEL_FMT ".L_D%u_e"
|
||||
#define DIE_END_LABEL_FMT "*.L_D%u_e"
|
||||
#endif
|
||||
#ifndef PUB_DIE_LABEL_FMT
|
||||
#define PUB_DIE_LABEL_FMT ".L_P%u"
|
||||
#define PUB_DIE_LABEL_FMT "*.L_P%u"
|
||||
#endif
|
||||
#ifndef INSN_LABEL_FMT
|
||||
#define INSN_LABEL_FMT ".L_I%u_%u"
|
||||
#define INSN_LABEL_FMT "*.L_I%u_%u"
|
||||
#endif
|
||||
#ifndef BLOCK_BEGIN_LABEL_FMT
|
||||
#define BLOCK_BEGIN_LABEL_FMT ".L_B%u"
|
||||
#define BLOCK_BEGIN_LABEL_FMT "*.L_B%u"
|
||||
#endif
|
||||
#ifndef BLOCK_END_LABEL_FMT
|
||||
#define BLOCK_END_LABEL_FMT ".L_B%u_e"
|
||||
#define BLOCK_END_LABEL_FMT "*.L_B%u_e"
|
||||
#endif
|
||||
#ifndef SS_BEGIN_LABEL_FMT
|
||||
#define SS_BEGIN_LABEL_FMT ".L_s%u"
|
||||
#define SS_BEGIN_LABEL_FMT "*.L_s%u"
|
||||
#endif
|
||||
#ifndef SS_END_LABEL_FMT
|
||||
#define SS_END_LABEL_FMT ".L_s%u_e"
|
||||
#define SS_END_LABEL_FMT "*.L_s%u_e"
|
||||
#endif
|
||||
#ifndef EE_BEGIN_LABEL_FMT
|
||||
#define EE_BEGIN_LABEL_FMT ".L_e%u"
|
||||
#define EE_BEGIN_LABEL_FMT "*.L_e%u"
|
||||
#endif
|
||||
#ifndef EE_END_LABEL_FMT
|
||||
#define EE_END_LABEL_FMT ".L_e%u_e"
|
||||
#define EE_END_LABEL_FMT "*.L_e%u_e"
|
||||
#endif
|
||||
#ifndef MT_BEGIN_LABEL_FMT
|
||||
#define MT_BEGIN_LABEL_FMT ".L_t%u"
|
||||
#define MT_BEGIN_LABEL_FMT "*.L_t%u"
|
||||
#endif
|
||||
#ifndef MT_END_LABEL_FMT
|
||||
#define MT_END_LABEL_FMT ".L_t%u_e"
|
||||
#define MT_END_LABEL_FMT "*.L_t%u_e"
|
||||
#endif
|
||||
#ifndef LOC_BEGIN_LABEL_FMT
|
||||
#define LOC_BEGIN_LABEL_FMT ".L_l%u"
|
||||
#define LOC_BEGIN_LABEL_FMT "*.L_l%u"
|
||||
#endif
|
||||
#ifndef LOC_END_LABEL_FMT
|
||||
#define LOC_END_LABEL_FMT ".L_l%u_e"
|
||||
#define LOC_END_LABEL_FMT "*.L_l%u_e"
|
||||
#endif
|
||||
#ifndef BOUND_BEGIN_LABEL_FMT
|
||||
#define BOUND_BEGIN_LABEL_FMT ".L_b%u_%u_%c"
|
||||
#define BOUND_BEGIN_LABEL_FMT "*.L_b%u_%u_%c"
|
||||
#endif
|
||||
#ifndef BOUND_END_LABEL_FMT
|
||||
#define BOUND_END_LABEL_FMT ".L_b%u_%u_%c_e"
|
||||
#define BOUND_END_LABEL_FMT "*.L_b%u_%u_%c_e"
|
||||
#endif
|
||||
#ifndef DERIV_BEGIN_LABEL_FMT
|
||||
#define DERIV_BEGIN_LABEL_FMT ".L_d%u"
|
||||
#define DERIV_BEGIN_LABEL_FMT "*.L_d%u"
|
||||
#endif
|
||||
#ifndef DERIV_END_LABEL_FMT
|
||||
#define DERIV_END_LABEL_FMT ".L_d%u_e"
|
||||
#define DERIV_END_LABEL_FMT "*.L_d%u_e"
|
||||
#endif
|
||||
#ifndef SL_BEGIN_LABEL_FMT
|
||||
#define SL_BEGIN_LABEL_FMT ".L_sl%u"
|
||||
#define SL_BEGIN_LABEL_FMT "*.L_sl%u"
|
||||
#endif
|
||||
#ifndef SL_END_LABEL_FMT
|
||||
#define SL_END_LABEL_FMT ".L_sl%u_e"
|
||||
#define SL_END_LABEL_FMT "*.L_sl%u_e"
|
||||
#endif
|
||||
#ifndef BODY_BEGIN_LABEL_FMT
|
||||
#define BODY_BEGIN_LABEL_FMT ".L_b%u"
|
||||
#define BODY_BEGIN_LABEL_FMT "*.L_b%u"
|
||||
#endif
|
||||
#ifndef BODY_END_LABEL_FMT
|
||||
#define BODY_END_LABEL_FMT ".L_b%u_e"
|
||||
#define BODY_END_LABEL_FMT "*.L_b%u_e"
|
||||
#endif
|
||||
#ifndef FUNC_END_LABEL_FMT
|
||||
#define FUNC_END_LABEL_FMT ".L_f%u_e"
|
||||
#define FUNC_END_LABEL_FMT "*.L_f%u_e"
|
||||
#endif
|
||||
#ifndef TYPE_NAME_FMT
|
||||
#define TYPE_NAME_FMT ".L_T%u"
|
||||
#define TYPE_NAME_FMT "*.L_T%u"
|
||||
#endif
|
||||
#ifndef DECL_NAME_FMT
|
||||
#define DECL_NAME_FMT ".L_E%u"
|
||||
#define DECL_NAME_FMT "*.L_E%u"
|
||||
#endif
|
||||
#ifndef LINE_CODE_LABEL_FMT
|
||||
#define LINE_CODE_LABEL_FMT ".L_LC%u"
|
||||
#define LINE_CODE_LABEL_FMT "*.L_LC%u"
|
||||
#endif
|
||||
#ifndef SFNAMES_ENTRY_LABEL_FMT
|
||||
#define SFNAMES_ENTRY_LABEL_FMT ".L_F%u"
|
||||
#define SFNAMES_ENTRY_LABEL_FMT "*.L_F%u"
|
||||
#endif
|
||||
#ifndef LINE_ENTRY_LABEL_FMT
|
||||
#define LINE_ENTRY_LABEL_FMT ".L_LE%u"
|
||||
#define LINE_ENTRY_LABEL_FMT "*.L_LE%u"
|
||||
#endif
|
||||
|
||||
/* Definitions of defaults for various types of primitive assembly language
|
||||
|
@ -2403,6 +2403,11 @@ location_or_const_value_attribute (decl)
|
|||
|
||||
switch (GET_CODE (rtl))
|
||||
{
|
||||
case ADDRESSOF:
|
||||
/* The address of a variable that was optimized away; don't emit
|
||||
anything. */
|
||||
break;
|
||||
|
||||
case CONST_INT:
|
||||
case CONST_DOUBLE:
|
||||
case CONST_STRING:
|
||||
|
@ -5496,7 +5501,10 @@ dwarfout_start_new_source_file (filename)
|
|||
|
||||
sprintf (label, SFNAMES_ENTRY_LABEL_FMT, lookup_filename (filename));
|
||||
sprintf (type_and_offset, "0x%08x+%s-%s",
|
||||
((unsigned) MACINFO_start << 24), label, SFNAMES_BEGIN_LABEL);
|
||||
((unsigned) MACINFO_start << 24),
|
||||
/* Hack: skip leading '*' . */
|
||||
(*label == '*') + label,
|
||||
(*SFNAMES_BEGIN_LABEL == '*') + SFNAMES_BEGIN_LABEL);
|
||||
generate_macinfo_entry (type_and_offset, "");
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */
|
|||
is the kind of rtx's they make and what arguments they use. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
|
@ -48,6 +49,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "expr.h"
|
||||
#include "regs.h"
|
||||
#include "insn-config.h"
|
||||
#include "recog.h"
|
||||
#include "real.h"
|
||||
#include "obstack.h"
|
||||
|
||||
|
@ -58,8 +60,6 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "bc-optab.h"
|
||||
#include "bc-emit.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Opcode names */
|
||||
#ifdef BCDEBUG_PRINT_CODE
|
||||
char *opcode_name[] =
|
||||
|
@ -958,6 +958,8 @@ gen_lowpart (mode, x)
|
|||
|
||||
return change_address (x, mode, plus_constant (XEXP (x, 0), offset));
|
||||
}
|
||||
else if (GET_CODE (x) == ADDRESSOF)
|
||||
return gen_lowpart (mode, force_reg (GET_MODE (x), x));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
@ -1462,7 +1464,7 @@ gen_inline_header_rtx (first_insn, first_parm_insn, first_labelno,
|
|||
pops_args, stack_slots, forced_labels, function_flags,
|
||||
outgoing_args_size, original_arg_vector,
|
||||
original_decl_initial, regno_rtx, regno_flag,
|
||||
regno_align)
|
||||
regno_align, parm_reg_stack_loc)
|
||||
rtx first_insn, first_parm_insn;
|
||||
int first_labelno, last_labelno, max_parm_regnum, max_regnum, args_size;
|
||||
int pops_args;
|
||||
|
@ -1475,6 +1477,7 @@ gen_inline_header_rtx (first_insn, first_parm_insn, first_labelno,
|
|||
rtvec regno_rtx;
|
||||
char *regno_flag;
|
||||
char *regno_align;
|
||||
rtvec parm_reg_stack_loc;
|
||||
{
|
||||
rtx header = gen_rtx (INLINE_HEADER, VOIDmode,
|
||||
cur_insn_uid++, NULL_RTX,
|
||||
|
@ -1484,7 +1487,8 @@ gen_inline_header_rtx (first_insn, first_parm_insn, first_labelno,
|
|||
stack_slots, forced_labels, function_flags,
|
||||
outgoing_args_size, original_arg_vector,
|
||||
original_decl_initial,
|
||||
regno_rtx, regno_flag, regno_align);
|
||||
regno_rtx, regno_flag, regno_align,
|
||||
parm_reg_stack_loc);
|
||||
return header;
|
||||
}
|
||||
|
||||
|
@ -1674,6 +1678,10 @@ copy_rtx_if_shared (orig)
|
|||
x->used = 1;
|
||||
return x;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* This rtx may not be shared. If it has already been seen,
|
||||
|
@ -1763,6 +1771,9 @@ reset_used_flags (x)
|
|||
case BARRIER:
|
||||
/* The chain of insns is not being copied. */
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
x->used = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Implements exception handling.
|
||||
Copyright (C) 1989, 92-95, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 92-96, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Mike Stump <mrs@cygnus.com>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -45,7 +45,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
There are two major codegen options for exception handling. The
|
||||
flag -fsjlj-exceptions can be used to select the setjmp/longjmp
|
||||
approach, which is the default. -fnosjlj-exceptions can be used to
|
||||
approach, which is the default. -fno-sjlj-exceptions can be used to
|
||||
get the PC range table approach. While this is a compile time
|
||||
flag, an entire application must be compiled with the same codegen
|
||||
option. The first is a PC range table approach, the second is a
|
||||
|
|
12
gcc/except.h
12
gcc/except.h
|
@ -1,5 +1,5 @@
|
|||
/* Exception Handling interface routines.
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Mike Stump <mrs@cygnus.com>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -139,8 +139,6 @@ extern rtx catch_clauses;
|
|||
|
||||
#endif
|
||||
|
||||
struct function;
|
||||
|
||||
/* Toplevel initialization for EH. */
|
||||
|
||||
extern void init_eh PROTO((void));
|
||||
|
@ -149,14 +147,6 @@ extern void init_eh PROTO((void));
|
|||
|
||||
extern void init_eh_for_function PROTO((void));
|
||||
|
||||
/* Saves the current per-function EH data into P. */
|
||||
|
||||
extern void save_eh_status PROTO((struct function *p));
|
||||
|
||||
/* Restores the per-function EH data from P. */
|
||||
|
||||
extern void restore_eh_status PROTO((struct function *p));
|
||||
|
||||
/* Adds an EH table entry for EH entry number N. Called from
|
||||
final_scan_insn for NOTE_INSN_EH_REGION_BEG. */
|
||||
|
||||
|
|
12
gcc/expmed.c
12
gcc/expmed.c
|
@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "flags.h"
|
||||
|
@ -2831,13 +2832,13 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
|
|||
op0 = convert_modes (compute_mode, mode, op0, unsignedp);
|
||||
op1 = convert_modes (compute_mode, mode, op1, unsignedp);
|
||||
|
||||
/* convert_modes may have tossed op1 into a register, so we
|
||||
absolutely must recompute the following. */
|
||||
/* convert_modes may have placed op1 into a register, so we
|
||||
must recompute the following. */
|
||||
op1_is_constant = GET_CODE (op1) == CONST_INT;
|
||||
op1_is_pow2 = (op1_is_constant
|
||||
&& ((EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1))
|
||||
|| (! unsignedp
|
||||
&& EXACT_POWER_OF_2_OR_ZERO_P (-INTVAL (op1))))));
|
||||
&& EXACT_POWER_OF_2_OR_ZERO_P (-INTVAL (op1)))))) ;
|
||||
}
|
||||
|
||||
/* If one of the operands is a volatile MEM, copy it into a register. */
|
||||
|
@ -3640,6 +3641,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
|
|||
emit_label (label);
|
||||
}
|
||||
return gen_lowpart (mode, rem_flag ? remainder : quotient);
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
if (quotient == 0)
|
||||
|
@ -3956,6 +3960,8 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
|
|||
if (op1 == const1_rtx)
|
||||
op1 = const0_rtx, code = EQ;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* From now on, we won't change CODE, so set ICODE now. */
|
||||
|
|
341
gcc/expr.c
341
gcc/expr.c
|
@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "machmode.h"
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
|
@ -528,10 +529,11 @@ queued_subexp_p (x)
|
|||
case MULT:
|
||||
case PLUS:
|
||||
case MINUS:
|
||||
return queued_subexp_p (XEXP (x, 0))
|
||||
|| queued_subexp_p (XEXP (x, 1));
|
||||
return (queued_subexp_p (XEXP (x, 0))
|
||||
|| queued_subexp_p (XEXP (x, 1)));
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Perform all the pending incrementations. */
|
||||
|
@ -776,6 +778,9 @@ convert_move (to, from, unsignedp)
|
|||
case TFmode:
|
||||
libcall = extendsftf2_libfunc;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -793,6 +798,9 @@ convert_move (to, from, unsignedp)
|
|||
case TFmode:
|
||||
libcall = extenddftf2_libfunc;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -806,6 +814,9 @@ convert_move (to, from, unsignedp)
|
|||
case DFmode:
|
||||
libcall = truncxfdf2_libfunc;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -819,8 +830,14 @@ convert_move (to, from, unsignedp)
|
|||
case DFmode:
|
||||
libcall = trunctfdf2_libfunc;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (libcall == (rtx) 0)
|
||||
|
@ -1567,14 +1584,19 @@ move_by_pieces_1 (genfun, mode, data)
|
|||
with mode BLKmode.
|
||||
SIZE is an rtx that says how long they are.
|
||||
ALIGN is the maximum alignment we can assume they have,
|
||||
measured in bytes. */
|
||||
measured in bytes.
|
||||
|
||||
void
|
||||
Return the address of the new block, if memcpy is called and returns it,
|
||||
0 otherwise. */
|
||||
|
||||
rtx
|
||||
emit_block_move (x, y, size, align)
|
||||
rtx x, y;
|
||||
rtx size;
|
||||
int align;
|
||||
{
|
||||
rtx retval = 0;
|
||||
|
||||
if (GET_MODE (x) != BLKmode)
|
||||
abort ();
|
||||
|
||||
|
@ -1639,7 +1661,7 @@ emit_block_move (x, y, size, align)
|
|||
if (pat)
|
||||
{
|
||||
emit_insn (pat);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
delete_insns_since (last);
|
||||
|
@ -1647,12 +1669,13 @@ emit_block_move (x, y, size, align)
|
|||
}
|
||||
|
||||
#ifdef TARGET_MEM_FUNCTIONS
|
||||
emit_library_call (memcpy_libfunc, 0,
|
||||
VOIDmode, 3, XEXP (x, 0), Pmode,
|
||||
XEXP (y, 0), Pmode,
|
||||
convert_to_mode (TYPE_MODE (sizetype), size,
|
||||
TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
retval
|
||||
= emit_library_call_value (memcpy_libfunc, NULL_RTX, 0,
|
||||
ptr_mode, 3, XEXP (x, 0), Pmode,
|
||||
XEXP (y, 0), Pmode,
|
||||
convert_to_mode (TYPE_MODE (sizetype), size,
|
||||
TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
#else
|
||||
emit_library_call (bcopy_libfunc, 0,
|
||||
VOIDmode, 3, XEXP (y, 0), Pmode,
|
||||
|
@ -1662,6 +1685,8 @@ emit_block_move (x, y, size, align)
|
|||
TYPE_MODE (integer_type_node));
|
||||
#endif
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Copy all or part of a value X into registers starting at REGNO.
|
||||
|
@ -1929,7 +1954,7 @@ use_group_regs (call_fusage, regs)
|
|||
/* A NULL entry means the parameter goes both on the stack and in
|
||||
registers. This can also be a MEM for targets that pass values
|
||||
partially on the stack and partially in registers. */
|
||||
if (reg && GET_CODE (reg) == REG)
|
||||
if (reg != 0 && GET_CODE (reg) == REG)
|
||||
use_reg (call_fusage, reg);
|
||||
}
|
||||
}
|
||||
|
@ -2066,14 +2091,18 @@ clear_by_pieces_1 (genfun, mode, data)
|
|||
|
||||
/* Write zeros through the storage of OBJECT.
|
||||
If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is
|
||||
the maximum alignment we can is has, measured in bytes. */
|
||||
the maximum alignment we can is has, measured in bytes.
|
||||
|
||||
void
|
||||
If we call a function that returns the length of the block, return it. */
|
||||
|
||||
rtx
|
||||
clear_storage (object, size, align)
|
||||
rtx object;
|
||||
rtx size;
|
||||
int align;
|
||||
{
|
||||
rtx retval = 0;
|
||||
|
||||
if (GET_MODE (object) == BLKmode)
|
||||
{
|
||||
object = protect_from_queue (object, 1);
|
||||
|
@ -2127,7 +2156,7 @@ clear_storage (object, size, align)
|
|||
if (pat)
|
||||
{
|
||||
emit_insn (pat);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
delete_insns_since (last);
|
||||
|
@ -2136,26 +2165,31 @@ clear_storage (object, size, align)
|
|||
|
||||
|
||||
#ifdef TARGET_MEM_FUNCTIONS
|
||||
emit_library_call (memset_libfunc, 0,
|
||||
VOIDmode, 3,
|
||||
XEXP (object, 0), Pmode,
|
||||
const0_rtx, TYPE_MODE (integer_type_node),
|
||||
convert_to_mode (TYPE_MODE (sizetype),
|
||||
size, TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
retval
|
||||
= emit_library_call_value (memset_libfunc, NULL_RTX, 0,
|
||||
ptr_mode, 3,
|
||||
XEXP (object, 0), Pmode,
|
||||
const0_rtx,
|
||||
TYPE_MODE (integer_type_node),
|
||||
convert_to_mode
|
||||
(TYPE_MODE (sizetype), size,
|
||||
TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
#else
|
||||
emit_library_call (bzero_libfunc, 0,
|
||||
VOIDmode, 2,
|
||||
XEXP (object, 0), Pmode,
|
||||
convert_to_mode (TYPE_MODE (integer_type_node),
|
||||
size,
|
||||
TREE_UNSIGNED (integer_type_node)),
|
||||
convert_to_mode
|
||||
(TYPE_MODE (integer_type_node), size,
|
||||
TREE_UNSIGNED (integer_type_node)),
|
||||
TYPE_MODE (integer_type_node));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
emit_move_insn (object, CONST0_RTX (GET_MODE (object)));
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Generate code to copy Y into X.
|
||||
|
@ -2940,9 +2974,11 @@ expand_assignment (to, from, want_value, suggest_reg)
|
|||
size *= GET_MODE_SIZE (best_mode);
|
||||
|
||||
/* Check the access right of the pointer. */
|
||||
emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3, to_addr,
|
||||
ptr_mode, GEN_INT (size), TYPE_MODE (sizetype),
|
||||
GEN_INT (MEMORY_USE_WO), QImode);
|
||||
if (size)
|
||||
emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3,
|
||||
to_addr, ptr_mode,
|
||||
GEN_INT (size), TYPE_MODE (sizetype),
|
||||
GEN_INT (MEMORY_USE_WO), QImode);
|
||||
}
|
||||
|
||||
result = store_field (to_rtx, bitsize, bitpos, mode1, from,
|
||||
|
@ -3450,9 +3486,10 @@ is_zeros_p (exp)
|
|||
return 0;
|
||||
|
||||
return 1;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return 1 if EXP contains mostly (3/4) zeros. */
|
||||
|
@ -3570,7 +3607,7 @@ store_constructor (exp, target, cleared)
|
|||
&& GET_MODE_SIZE (GET_MODE (target)) <= UNITS_PER_WORD)
|
||||
{
|
||||
if (! cleared)
|
||||
emit_move_insn (target, const0_rtx);
|
||||
emit_move_insn (target, CONST0_RTX (GET_MODE (target)));
|
||||
|
||||
cleared = 1;
|
||||
}
|
||||
|
@ -4080,6 +4117,9 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
|
|||
{
|
||||
HOST_WIDE_INT width_mask = 0;
|
||||
|
||||
if (TREE_CODE (exp) == ERROR_MARK)
|
||||
return const0_rtx;
|
||||
|
||||
if (bitsize < HOST_BITS_PER_WIDE_INT)
|
||||
width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
|
||||
|
||||
|
@ -4697,6 +4737,9 @@ safe_from_p (x, exp)
|
|||
case METHOD_CALL_EXPR:
|
||||
/* This takes a rtx argument, but shouldn't appear here. */
|
||||
abort ();
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we have an rtx, we do not need to scan our operands. */
|
||||
|
@ -5215,51 +5258,59 @@ expand_expr (exp, target, tmode, modifier)
|
|||
}
|
||||
|
||||
case PLACEHOLDER_EXPR:
|
||||
/* If there is an object on the head of the placeholder list,
|
||||
see if some object in it's references is of type TYPE. For
|
||||
further information, see tree.def. */
|
||||
if (placeholder_list)
|
||||
{
|
||||
tree need_type = TYPE_MAIN_VARIANT (type);
|
||||
tree object = 0;
|
||||
tree old_list = placeholder_list;
|
||||
tree elt;
|
||||
{
|
||||
tree placeholder_expr;
|
||||
|
||||
/* See if the object is the type that we want. */
|
||||
if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_PURPOSE (placeholder_list)))
|
||||
== need_type))
|
||||
object = TREE_PURPOSE (placeholder_list);
|
||||
/* If there is an object on the head of the placeholder list,
|
||||
see if some object in it's references is of type TYPE. For
|
||||
further information, see tree.def. */
|
||||
for (placeholder_expr = placeholder_list;
|
||||
placeholder_expr != 0;
|
||||
placeholder_expr = TREE_CHAIN (placeholder_expr))
|
||||
{
|
||||
tree need_type = TYPE_MAIN_VARIANT (type);
|
||||
tree object = 0;
|
||||
tree old_list = placeholder_list;
|
||||
tree elt;
|
||||
|
||||
/* Find the innermost reference that is of the type we want. */
|
||||
for (elt = TREE_PURPOSE (placeholder_list);
|
||||
elt != 0
|
||||
&& (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
|
||||
|| TREE_CODE_CLASS (TREE_CODE (elt)) == '1'
|
||||
|| TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
|
||||
|| TREE_CODE_CLASS (TREE_CODE (elt)) == 'e');
|
||||
elt = ((TREE_CODE (elt) == COMPOUND_EXPR
|
||||
|| TREE_CODE (elt) == COND_EXPR)
|
||||
? TREE_OPERAND (elt, 1) : TREE_OPERAND (elt, 0)))
|
||||
if (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
|
||||
&& (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (elt, 0)))
|
||||
== need_type))
|
||||
/* See if the object is the type that we want. */
|
||||
if ((TYPE_MAIN_VARIANT (TREE_TYPE
|
||||
(TREE_PURPOSE (placeholder_expr)))
|
||||
== need_type))
|
||||
object = TREE_PURPOSE (placeholder_expr);
|
||||
|
||||
/* Find the innermost reference that is of the type we want. */
|
||||
for (elt = TREE_PURPOSE (placeholder_expr);
|
||||
elt != 0
|
||||
&& (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
|
||||
|| TREE_CODE_CLASS (TREE_CODE (elt)) == '1'
|
||||
|| TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
|
||||
|| TREE_CODE_CLASS (TREE_CODE (elt)) == 'e');
|
||||
elt = ((TREE_CODE (elt) == COMPOUND_EXPR
|
||||
|| TREE_CODE (elt) == COND_EXPR)
|
||||
? TREE_OPERAND (elt, 1) : TREE_OPERAND (elt, 0)))
|
||||
if (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
|
||||
&& (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (elt, 0)))
|
||||
== need_type))
|
||||
{
|
||||
object = TREE_OPERAND (elt, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (object != 0)
|
||||
{
|
||||
object = TREE_OPERAND (elt, 0);
|
||||
break;
|
||||
/* Expand this object skipping the list entries before
|
||||
it was found in case it is also a PLACEHOLDER_EXPR.
|
||||
In that case, we want to translate it using subsequent
|
||||
entries. */
|
||||
placeholder_list = TREE_CHAIN (placeholder_expr);
|
||||
temp = expand_expr (object, original_target, tmode,
|
||||
ro_modifier);
|
||||
placeholder_list = old_list;
|
||||
return temp;
|
||||
}
|
||||
|
||||
if (object != 0)
|
||||
{
|
||||
/* Expand this object skipping the list entries before
|
||||
it was found in case it is also a PLACEHOLDER_EXPR.
|
||||
In that case, we want to translate it using subsequent
|
||||
entries. */
|
||||
placeholder_list = TREE_CHAIN (placeholder_list);
|
||||
temp = expand_expr (object, original_target, tmode, ro_modifier);
|
||||
placeholder_list = old_list;
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We can't find the object or there was a missing WITH_RECORD_EXPR. */
|
||||
abort ();
|
||||
|
@ -5681,11 +5732,12 @@ expand_expr (exp, target, tmode, modifier)
|
|||
size = (bitpos % BITS_PER_UNIT) + bitsize + BITS_PER_UNIT - 1;
|
||||
|
||||
/* Check the access right of the pointer. */
|
||||
emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3,
|
||||
to, ptr_mode,
|
||||
GEN_INT (size / BITS_PER_UNIT),
|
||||
TYPE_MODE (sizetype),
|
||||
GEN_INT (memory_usage), QImode);
|
||||
if (size > BITS_PER_UNIT)
|
||||
emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3,
|
||||
to, ptr_mode,
|
||||
GEN_INT (size / BITS_PER_UNIT),
|
||||
TYPE_MODE (sizetype),
|
||||
GEN_INT (memory_usage), QImode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6832,7 +6884,8 @@ expand_expr (exp, target, tmode, modifier)
|
|||
&& integer_zerop (TREE_OPERAND (TREE_OPERAND (exp, 0), 1))
|
||||
&& operand_equal_p (TREE_OPERAND (TREE_OPERAND (exp, 0), 0),
|
||||
TREE_OPERAND (exp, 1), 0)
|
||||
&& ! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 0))
|
||||
&& (! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 0))
|
||||
|| TREE_CODE (TREE_OPERAND (exp, 1)) == SAVE_EXPR)
|
||||
&& safe_from_p (temp, TREE_OPERAND (exp, 2)))
|
||||
{
|
||||
if (GET_CODE (temp) == REG && REGNO (temp) < FIRST_PSEUDO_REGISTER)
|
||||
|
@ -6849,7 +6902,8 @@ expand_expr (exp, target, tmode, modifier)
|
|||
&& integer_zerop (TREE_OPERAND (TREE_OPERAND (exp, 0), 1))
|
||||
&& operand_equal_p (TREE_OPERAND (TREE_OPERAND (exp, 0), 0),
|
||||
TREE_OPERAND (exp, 2), 0)
|
||||
&& ! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 0))
|
||||
&& (! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 0))
|
||||
|| TREE_CODE (TREE_OPERAND (exp, 2)) == SAVE_EXPR)
|
||||
&& safe_from_p (temp, TREE_OPERAND (exp, 1)))
|
||||
{
|
||||
if (GET_CODE (temp) == REG && REGNO (temp) < FIRST_PSEUDO_REGISTER)
|
||||
|
@ -6928,10 +6982,15 @@ expand_expr (exp, target, tmode, modifier)
|
|||
}
|
||||
else
|
||||
{
|
||||
target = assign_temp (type, 2, 1, 1);
|
||||
target = assign_temp (type, 2, 0, 1);
|
||||
/* All temp slots at this level must not conflict. */
|
||||
preserve_temp_slots (target);
|
||||
DECL_RTL (slot) = target;
|
||||
if (TREE_ADDRESSABLE (slot))
|
||||
{
|
||||
TREE_ADDRESSABLE (slot) = 0;
|
||||
mark_addressable (slot);
|
||||
}
|
||||
|
||||
/* Since SLOT is not known to the called function
|
||||
to belong to its stack frame, we must build an explicit
|
||||
|
@ -7775,6 +7834,9 @@ bc_expand_expr (exp)
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
abort ();
|
||||
|
@ -8672,6 +8734,16 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
TREE_INT_CST_LOW (TREE_VALUE (arglist)),
|
||||
hard_frame_pointer_rtx);
|
||||
|
||||
/* Some ports cannot access arbitrary stack frames. */
|
||||
if (tem == NULL)
|
||||
{
|
||||
if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
|
||||
warning ("unsupported arg to `__builtin_frame_address'");
|
||||
else
|
||||
warning ("unsupported arg to `__builtin_return_address'");
|
||||
return const0_rtx;
|
||||
}
|
||||
|
||||
/* For __builtin_frame_address, return what we've got. */
|
||||
if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS)
|
||||
return tem;
|
||||
|
@ -8777,13 +8849,19 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
|
||||
if (! (*insn_operand_predicate[(int)icode][0]) (result, insn_mode))
|
||||
result = gen_reg_rtx (insn_mode);
|
||||
|
||||
src_rtx = memory_address (BLKmode,
|
||||
expand_expr (src, NULL_RTX, ptr_mode,
|
||||
EXPAND_NORMAL));
|
||||
|
||||
if (! (*insn_operand_predicate[(int)icode][1]) (src_rtx, Pmode))
|
||||
src_rtx = copy_to_mode_reg (Pmode, src_rtx);
|
||||
|
||||
/* Check the string is readable and has an end. */
|
||||
if (flag_check_memory_usage)
|
||||
emit_library_call (chkr_check_str_libfunc, 1, VOIDmode, 2,
|
||||
src_rtx, ptr_mode,
|
||||
GEN_INT (MEMORY_USE_RO), QImode);
|
||||
|
||||
char_rtx = const0_rtx;
|
||||
char_mode = insn_operand_mode[(int)icode][2];
|
||||
if (! (*insn_operand_predicate[(int)icode][2]) (char_rtx, char_mode))
|
||||
|
@ -8838,9 +8916,12 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
/* Arg could be non-pointer if user redeclared this fcn wrong. */
|
||||
|| TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
|
||||
|| TREE_CHAIN (arglist) == 0
|
||||
|| TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))) != POINTER_TYPE
|
||||
|| (TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
|
||||
!= POINTER_TYPE)
|
||||
|| TREE_CHAIN (TREE_CHAIN (arglist)) == 0
|
||||
|| TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))))) != INTEGER_TYPE)
|
||||
|| (TREE_CODE (TREE_TYPE (TREE_VALUE
|
||||
(TREE_CHAIN (TREE_CHAIN (arglist)))))
|
||||
!= INTEGER_TYPE))
|
||||
break;
|
||||
else
|
||||
{
|
||||
|
@ -8853,7 +8934,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
= get_pointer_alignment (src, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
|
||||
int dest_align
|
||||
= get_pointer_alignment (dest, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
|
||||
rtx dest_rtx, dest_mem, src_mem;
|
||||
rtx dest_rtx, dest_mem, src_mem, src_rtx, dest_addr, len_rtx;
|
||||
|
||||
/* If either SRC or DEST is not a pointer type, don't do
|
||||
this operation in-line. */
|
||||
|
@ -8872,11 +8953,18 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
dest = TREE_OPERAND (dest, 0);
|
||||
type = TREE_TYPE (TREE_TYPE (dest));
|
||||
MEM_IN_STRUCT_P (dest_mem) = AGGREGATE_TYPE_P (type);
|
||||
src_rtx = expand_expr (src, NULL_RTX, ptr_mode, EXPAND_SUM);
|
||||
src_mem = gen_rtx (MEM, BLKmode,
|
||||
memory_address (BLKmode,
|
||||
expand_expr (src, NULL_RTX,
|
||||
ptr_mode,
|
||||
EXPAND_SUM)));
|
||||
memory_address (BLKmode, src_rtx));
|
||||
len_rtx = expand_expr (len, NULL_RTX, VOIDmode, 0);
|
||||
|
||||
/* Just copy the rights of SRC to the rights of DEST. */
|
||||
if (flag_check_memory_usage)
|
||||
emit_library_call (chkr_copy_bitmap_libfunc, 1, VOIDmode, 3,
|
||||
src_rtx, ptr_mode,
|
||||
dest_rtx, ptr_mode,
|
||||
len_rtx, TYPE_MODE (sizetype));
|
||||
|
||||
/* There could be a void* cast on top of the object. */
|
||||
while (TREE_CODE (src) == NOP_EXPR)
|
||||
src = TREE_OPERAND (src, 0);
|
||||
|
@ -8884,10 +8972,14 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
MEM_IN_STRUCT_P (src_mem) = AGGREGATE_TYPE_P (type);
|
||||
|
||||
/* Copy word part most expediently. */
|
||||
emit_block_move (dest_mem, src_mem,
|
||||
expand_expr (len, NULL_RTX, VOIDmode, 0),
|
||||
MIN (src_align, dest_align));
|
||||
return force_operand (dest_rtx, NULL_RTX);
|
||||
dest_addr
|
||||
= emit_block_move (dest_mem, src_mem, len_rtx,
|
||||
MIN (src_align, dest_align));
|
||||
|
||||
if (dest_addr == 0)
|
||||
dest_addr = force_operand (dest_rtx, NULL_RTX);
|
||||
|
||||
return dest_addr;
|
||||
}
|
||||
|
||||
case BUILT_IN_MEMSET:
|
||||
|
@ -8916,7 +9008,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
|
||||
int dest_align
|
||||
= get_pointer_alignment (dest, BIGGEST_ALIGNMENT) / BITS_PER_UNIT;
|
||||
rtx dest_rtx, dest_mem;
|
||||
rtx dest_rtx, dest_mem, dest_addr, len_rtx;
|
||||
|
||||
/* If DEST is not a pointer type, don't do this
|
||||
operation in-line. */
|
||||
|
@ -8930,16 +9022,28 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
dest_rtx = expand_expr (dest, NULL_RTX, ptr_mode, EXPAND_SUM);
|
||||
dest_mem = gen_rtx (MEM, BLKmode,
|
||||
memory_address (BLKmode, dest_rtx));
|
||||
len_rtx = expand_expr (len, NULL_RTX, VOIDmode, 0);
|
||||
|
||||
/* Just check DST is writable and mark it as readable. */
|
||||
if (flag_check_memory_usage)
|
||||
emit_library_call (chkr_check_addr_libfunc, 1, VOIDmode, 3,
|
||||
dest_rtx, ptr_mode,
|
||||
len_rtx, TYPE_MODE (sizetype),
|
||||
GEN_INT (MEMORY_USE_WO), QImode);
|
||||
|
||||
|
||||
/* There could be a void* cast on top of the object. */
|
||||
while (TREE_CODE (dest) == NOP_EXPR)
|
||||
dest = TREE_OPERAND (dest, 0);
|
||||
type = TREE_TYPE (TREE_TYPE (dest));
|
||||
MEM_IN_STRUCT_P (dest_mem) = AGGREGATE_TYPE_P (type);
|
||||
|
||||
clear_storage (dest_mem, expand_expr (len, NULL_RTX, VOIDmode, 0),
|
||||
dest_align);
|
||||
dest_addr = clear_storage (dest_mem, len_rtx, dest_align);
|
||||
|
||||
return force_operand (dest_rtx, NULL_RTX);
|
||||
if (dest_addr == 0)
|
||||
dest_addr = force_operand (dest_rtx, NULL_RTX);
|
||||
|
||||
return dest_addr;
|
||||
}
|
||||
|
||||
/* These comparison functions need an instruction that returns an actual
|
||||
|
@ -8951,6 +9055,10 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
if (!optimize && ! CALLED_AS_BUILT_IN (fndecl))
|
||||
break;
|
||||
|
||||
/* If we need to check memory accesses, call the library function. */
|
||||
if (flag_check_memory_usage)
|
||||
break;
|
||||
|
||||
if (arglist == 0
|
||||
/* Arg could be non-pointer if user redeclared this fcn wrong. */
|
||||
|| TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
|
||||
|
@ -9004,6 +9112,10 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
if (!optimize && ! CALLED_AS_BUILT_IN (fndecl))
|
||||
break;
|
||||
|
||||
/* If we need to check memory accesses, call the library function. */
|
||||
if (flag_check_memory_usage)
|
||||
break;
|
||||
|
||||
if (arglist == 0
|
||||
/* Arg could be non-pointer if user redeclared this fcn wrong. */
|
||||
|| TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
|
||||
|
@ -9498,7 +9610,7 @@ expand_builtin_apply (function, arguments, argsize)
|
|||
haven't figured out how the calling convention macros effect this,
|
||||
but it's likely that the source and/or destination addresses in
|
||||
the block copy will need updating in machine specific ways. */
|
||||
dest = copy_addr_to_reg (push_block (argsize, 0, 0));
|
||||
dest = allocate_dynamic_stack_space (argsize, 0, 0);
|
||||
emit_block_move (gen_rtx (MEM, BLKmode, dest),
|
||||
gen_rtx (MEM, BLKmode, incoming_args),
|
||||
argsize,
|
||||
|
@ -9942,6 +10054,9 @@ preexpand_calls (exp)
|
|||
case SAVE_EXPR:
|
||||
if (SAVE_EXPR_RTL (exp) != 0)
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
nops = tree_code_length[(int) TREE_CODE (exp)];
|
||||
|
@ -10566,9 +10681,38 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
|
|||
rtx if_false_label, if_true_label;
|
||||
{
|
||||
int nwords = GET_MODE_SIZE (GET_MODE (op0)) / UNITS_PER_WORD;
|
||||
rtx part;
|
||||
int i;
|
||||
rtx drop_through_label = 0;
|
||||
|
||||
/* The fastest way of doing this comparison on almost any machine is to
|
||||
"or" all the words and compare the result. If all have to be loaded
|
||||
from memory and this is a very wide item, it's possible this may
|
||||
be slower, but that's highly unlikely. */
|
||||
|
||||
part = gen_reg_rtx (word_mode);
|
||||
emit_move_insn (part, operand_subword_force (op0, 0, GET_MODE (op0)));
|
||||
for (i = 1; i < nwords && part != 0; i++)
|
||||
part = expand_binop (word_mode, ior_optab, part,
|
||||
operand_subword_force (op0, i, GET_MODE (op0)),
|
||||
part, 1, OPTAB_WIDEN);
|
||||
|
||||
if (part != 0)
|
||||
{
|
||||
rtx comp = compare_from_rtx (part, const0_rtx, EQ, 1, word_mode,
|
||||
NULL_RTX, 0);
|
||||
|
||||
if (comp == const_true_rtx)
|
||||
emit_jump (if_false_label);
|
||||
else if (comp == const0_rtx)
|
||||
emit_jump (if_true_label);
|
||||
else
|
||||
do_jump_for_compare (comp, if_false_label, if_true_label);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we couldn't do the "or" simply, do this with a series of compares. */
|
||||
if (! if_false_label)
|
||||
drop_through_label = if_false_label = gen_label_rtx ();
|
||||
|
||||
|
@ -10585,6 +10729,7 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label)
|
|||
|
||||
if (if_true_label)
|
||||
emit_jump (if_true_label);
|
||||
|
||||
if (drop_through_label)
|
||||
emit_label (drop_through_label);
|
||||
}
|
||||
|
|
|
@ -506,6 +506,7 @@ extern rtx chkr_check_addr_libfunc;
|
|||
extern rtx chkr_set_right_libfunc;
|
||||
extern rtx chkr_copy_bitmap_libfunc;
|
||||
extern rtx chkr_check_exec_libfunc;
|
||||
extern rtx chkr_check_str_libfunc;
|
||||
|
||||
typedef rtx (*rtxfun) PROTO ((rtx));
|
||||
|
||||
|
@ -681,7 +682,7 @@ extern rtx convert_to_mode PROTO((enum machine_mode, rtx, int));
|
|||
extern rtx convert_modes PROTO((enum machine_mode, enum machine_mode, rtx, int));
|
||||
|
||||
/* Emit code to move a block Y to a block X. */
|
||||
extern void emit_block_move PROTO((rtx, rtx, rtx, int));
|
||||
extern rtx emit_block_move PROTO((rtx, rtx, rtx, int));
|
||||
|
||||
/* Copy all or part of a value X into registers starting at REGNO.
|
||||
The number of registers to be filled is NREGS. */
|
||||
|
@ -709,7 +710,7 @@ extern void use_group_regs PROTO((rtx *, rtx));
|
|||
/* Write zeros through the storage of OBJECT.
|
||||
If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is its
|
||||
alignment. */
|
||||
extern void clear_storage PROTO((rtx, rtx, int));
|
||||
extern rtx clear_storage PROTO((rtx, rtx, int));
|
||||
|
||||
/* Emit insns to set X from Y. */
|
||||
extern rtx emit_move_insn PROTO((rtx, rtx));
|
||||
|
@ -919,8 +920,6 @@ extern rtx hard_libcall_value PROTO((enum machine_mode));
|
|||
of STACK_BOUNDARY / BITS_PER_UNIT. */
|
||||
extern rtx round_push PROTO((rtx));
|
||||
|
||||
extern void emit_block_move PROTO((rtx, rtx, rtx, int));
|
||||
|
||||
extern rtx store_bit_field PROTO((rtx, int, int, enum machine_mode, rtx, int, int));
|
||||
extern rtx extract_bit_field PROTO((rtx, int, int, int, rtx, enum machine_mode, enum machine_mode, int, int));
|
||||
extern rtx expand_mult PROTO((enum machine_mode, rtx, rtx, rtx, int));
|
||||
|
|
|
@ -126,8 +126,8 @@ g77.o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) g77.c
|
|||
-DLANG_SPECIFIC_DRIVER -c g77.c
|
||||
|
||||
# Create the compiler driver for g77.
|
||||
g77$(exeext): g77.o g77spec.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g77.o g77spec.o version.o \
|
||||
g77$(exeext): g77.o g77spec.o version.o choose-temp.o pexecute.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g77.o g77spec.o prefix.o version.o \
|
||||
choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
|
||||
|
||||
# Create a version of the g77 driver which calls the cross-compiler.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.12
|
||||
# Generated automatically using autoconf version 2.12.1
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
|
@ -49,6 +49,7 @@ mandir='${prefix}/man'
|
|||
# Initialize some other variables.
|
||||
subdirs=
|
||||
MFLAGS= MAKEFLAGS=
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Maximum number of lines to put in a shell here document.
|
||||
ac_max_here_lines=12
|
||||
|
||||
|
@ -332,7 +333,7 @@ EOF
|
|||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.12"
|
||||
echo "configure generated by autoconf version 2.12.1"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
|
@ -526,7 +527,7 @@ fi
|
|||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:530: checking for $ac_word" >&5
|
||||
echo "configure:531: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -555,7 +556,7 @@ if test -z "$CC"; then
|
|||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:559: checking for $ac_word" >&5
|
||||
echo "configure:560: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -603,7 +604,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:607: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:608: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
|
@ -613,11 +614,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
|
|||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 617 "configure"
|
||||
#line 618 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
|
@ -637,12 +638,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:646: checking whether we are using GNU C" >&5
|
||||
echo "configure:647: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -651,7 +652,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -666,7 +667,7 @@ if test $ac_cv_prog_gcc = yes; then
|
|||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:670: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:671: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -711,7 +712,7 @@ else
|
|||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:715: checking for $ac_word" >&5
|
||||
echo "configure:716: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -744,7 +745,7 @@ fi
|
|||
|
||||
# Sanity check for the cross-compilation case:
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:748: checking how to run the C preprocessor" >&5
|
||||
echo "configure:749: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -759,13 +760,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 763 "configure"
|
||||
#line 764 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -776,13 +777,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 780 "configure"
|
||||
#line 781 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -806,17 +807,17 @@ echo "$ac_t""$CPP" 1>&6
|
|||
|
||||
ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
|
||||
echo "configure:810: checking for stdio.h" >&5
|
||||
echo "configure:811: checking for stdio.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 815 "configure"
|
||||
#line 816 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -844,12 +845,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:848: checking for ANSI C header files" >&5
|
||||
echo "configure:849: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 853 "configure"
|
||||
#line 854 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -857,7 +858,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -874,7 +875,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 878 "configure"
|
||||
#line 879 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -892,7 +893,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 896 "configure"
|
||||
#line 897 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -913,7 +914,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 917 "configure"
|
||||
#line 918 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -924,7 +925,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -950,12 +951,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for posix""... $ac_c" 1>&6
|
||||
echo "configure:954: checking for posix" >&5
|
||||
echo "configure:955: checking for posix" >&5
|
||||
if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 959 "configure"
|
||||
#line 960 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -981,12 +982,12 @@ echo "$ac_t""$g77_cv_header_posix" 1>&6
|
|||
# We can rely on the GNU library being posix-ish. I guess checking the
|
||||
# header isn't actually like checking the functions, though...
|
||||
echo $ac_n "checking for GNU library""... $ac_c" 1>&6
|
||||
echo "configure:985: checking for GNU library" >&5
|
||||
echo "configure:986: checking for GNU library" >&5
|
||||
if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 990 "configure"
|
||||
#line 991 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
#ifdef __GNU_LIBRARY__
|
||||
|
@ -1010,12 +1011,12 @@ echo "$ac_t""$g77_cv_lib_gnu" 1>&6
|
|||
|
||||
# Apparently cygwin needs to be special-cased.
|
||||
echo $ac_n "checking for cyg\`win'32""... $ac_c" 1>&6
|
||||
echo "configure:1014: checking for cyg\`win'32" >&5
|
||||
echo "configure:1015: checking for cyg\`win'32" >&5
|
||||
if eval "test \"`echo '$''{'g77_cv_sys_cygwin32'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1019 "configure"
|
||||
#line 1020 "configure"
|
||||
#include "confdefs.h"
|
||||
#ifdef __CYGWIN32__
|
||||
yes
|
||||
|
@ -1038,17 +1039,17 @@ echo "$ac_t""$g77_cv_sys_cygwin32" 1>&6
|
|||
|
||||
ac_safe=`echo "fcntl.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6
|
||||
echo "configure:1042: checking for fcntl.h" >&5
|
||||
echo "configure:1043: checking for fcntl.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1047 "configure"
|
||||
#line 1048 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <fcntl.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1081,12 +1082,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:1085: checking for working const" >&5
|
||||
echo "configure:1086: checking for working const" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1090 "configure"
|
||||
#line 1091 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -1135,7 +1136,7 @@ ccp = (char const *const *) p;
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
|
@ -1156,12 +1157,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:1160: checking for size_t" >&5
|
||||
echo "configure:1161: checking for size_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1165 "configure"
|
||||
#line 1166 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -1190,12 +1191,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
||||
echo "configure:1194: checking return type of signal handlers" >&5
|
||||
echo "configure:1195: checking return type of signal handlers" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1199 "configure"
|
||||
#line 1200 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
@ -1212,7 +1213,7 @@ int main() {
|
|||
int i;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_type_signal=void
|
||||
else
|
||||
|
@ -1233,12 +1234,12 @@ EOF
|
|||
# we'll get atexit by default
|
||||
if test $ac_cv_header_stdc != yes; then
|
||||
echo $ac_n "checking for atexit""... $ac_c" 1>&6
|
||||
echo "configure:1237: checking for atexit" >&5
|
||||
echo "configure:1238: checking for atexit" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1242 "configure"
|
||||
#line 1243 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char atexit(); below. */
|
||||
|
@ -1261,7 +1262,7 @@ atexit();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_atexit=yes"
|
||||
else
|
||||
|
@ -1286,12 +1287,12 @@ else
|
|||
EOF
|
||||
|
||||
echo $ac_n "checking for onexit""... $ac_c" 1>&6
|
||||
echo "configure:1290: checking for onexit" >&5
|
||||
echo "configure:1291: checking for onexit" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1295 "configure"
|
||||
#line 1296 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char onexit(); below. */
|
||||
|
@ -1314,7 +1315,7 @@ onexit();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_onexit=yes"
|
||||
else
|
||||
|
@ -1332,12 +1333,12 @@ if eval "test \"`echo '$ac_cv_func_'onexit`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for on_exit""... $ac_c" 1>&6
|
||||
echo "configure:1336: checking for on_exit" >&5
|
||||
echo "configure:1337: checking for on_exit" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1341 "configure"
|
||||
#line 1342 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char on_exit(); below. */
|
||||
|
@ -1360,7 +1361,7 @@ on_exit();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_on_exit=yes"
|
||||
else
|
||||
|
@ -1393,12 +1394,12 @@ fi
|
|||
# Apparently positive result on cygwin loses re. NON_UNIX_STDIO
|
||||
# (as of cygwin b18).
|
||||
echo $ac_n "checking for fstat""... $ac_c" 1>&6
|
||||
echo "configure:1397: checking for fstat" >&5
|
||||
echo "configure:1398: checking for fstat" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_fstat'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1402 "configure"
|
||||
#line 1403 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char fstat(); below. */
|
||||
|
@ -1421,7 +1422,7 @@ fstat();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_fstat=yes"
|
||||
else
|
||||
|
@ -1441,7 +1442,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6
|
||||
echo "configure:1445: checking need for NON_UNIX_STDIO" >&5
|
||||
echo "configure:1446: checking need for NON_UNIX_STDIO" >&5
|
||||
if test $g77_cv_sys_cygwin32 = yes || test $ac_cv_func_fstat = no; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
|
@ -1454,19 +1455,19 @@ fi
|
|||
|
||||
# This is necessary for e.g. Linux:
|
||||
echo $ac_n "checking for necessary members of struct FILE""... $ac_c" 1>&6
|
||||
echo "configure:1458: checking for necessary members of struct FILE" >&5
|
||||
echo "configure:1459: checking for necessary members of struct FILE" >&5
|
||||
if eval "test \"`echo '$''{'g77_cv_struct_FILE'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1463 "configure"
|
||||
#line 1464 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
FILE s; s._ptr; s._base; s._flag;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
g77_cv_struct_FILE=yes
|
||||
else
|
||||
|
@ -1486,7 +1487,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
|
||||
echo "configure:1490: checking for drem in -lm" >&5
|
||||
echo "configure:1491: checking for drem in -lm" >&5
|
||||
ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -1494,7 +1495,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lm $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1498 "configure"
|
||||
#line 1499 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -1505,7 +1506,7 @@ int main() {
|
|||
drem()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -1535,19 +1536,19 @@ fi
|
|||
# However, on my sunos4/gcc setup unistd.h leads us wrongly to believe
|
||||
# we're posix-conformant, so always do the test.
|
||||
echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6
|
||||
echo "configure:1539: checking for ansi/posix sprintf result" >&5
|
||||
echo "configure:1540: checking for ansi/posix sprintf result" >&5
|
||||
if test "$cross_compiling" = yes; then
|
||||
g77_cv_sys_sprintf_ansi=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1544 "configure"
|
||||
#line 1545 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
/* does sprintf return the number of chars transferred? */
|
||||
main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
g77_cv_sys_sprintf_ansi=yes
|
||||
else
|
||||
|
@ -1581,9 +1582,9 @@ fi
|
|||
|
||||
# define NON_ANSI_RW_MODES on unix (can't hurt)
|
||||
echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6
|
||||
echo "configure:1585: checking NON_ANSI_RW_MODES" >&5
|
||||
echo "configure:1586: checking NON_ANSI_RW_MODES" >&5
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1587 "configure"
|
||||
#line 1588 "configure"
|
||||
#include "confdefs.h"
|
||||
#ifdef unix
|
||||
yes
|
||||
|
@ -1624,14 +1625,14 @@ fi
|
|||
# (via com.h). proj.h and com.h are in $srcdir/.., config.h which they need
|
||||
# is in ../.. and the config files are in $srcdir/../../config.
|
||||
echo $ac_n "checking f2c integer type""... $ac_c" 1>&6
|
||||
echo "configure:1628: checking f2c integer type" >&5
|
||||
echo "configure:1629: checking f2c integer type" >&5
|
||||
late_ac_cpp=$ac_cpp
|
||||
ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../.. -I$srcdir/../../config"
|
||||
if eval "test \"`echo '$''{'g77_cv_sys_f2cinteger'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1635 "configure"
|
||||
#line 1636 "configure"
|
||||
#include "confdefs.h"
|
||||
#include "proj.h"
|
||||
#define FFECOM_DETERMINE_TYPES 1
|
||||
|
@ -1654,7 +1655,7 @@ rm -f conftest*
|
|||
|
||||
if test "$g77_cv_sys_f2cinteger" = ""; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1658 "configure"
|
||||
#line 1659 "configure"
|
||||
#include "confdefs.h"
|
||||
#include "proj.h"
|
||||
#define FFECOM_DETERMINE_TYPES 1
|
||||
|
@ -1689,14 +1690,14 @@ ac_cpp=$late_ac_cpp
|
|||
|
||||
|
||||
echo $ac_n "checking f2c long int type""... $ac_c" 1>&6
|
||||
echo "configure:1693: checking f2c long int type" >&5
|
||||
echo "configure:1694: checking f2c long int type" >&5
|
||||
late_ac_cpp=$ac_cpp
|
||||
ac_cpp="$late_ac_cpp -I$srcdir/.. -I../.. -I$srcdir/../.. -I$srcdir/../../config"
|
||||
if eval "test \"`echo '$''{'g77_cv_sys_f2clongint'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1700 "configure"
|
||||
#line 1701 "configure"
|
||||
#include "confdefs.h"
|
||||
#include "proj.h"
|
||||
#define FFECOM_DETERMINE_TYPES 1
|
||||
|
@ -1719,7 +1720,7 @@ rm -f conftest*
|
|||
|
||||
if test "$g77_cv_sys_f2clongint" = ""; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1723 "configure"
|
||||
#line 1724 "configure"
|
||||
#include "confdefs.h"
|
||||
#include "proj.h"
|
||||
#define FFECOM_DETERMINE_TYPES 1
|
||||
|
@ -1813,7 +1814,7 @@ EOF
|
|||
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
case `(ac_space=' '; set) 2>&1` in
|
||||
case `(ac_space=' '; set) 2>&1 | grep ac_space` in
|
||||
*ac_space=\ *)
|
||||
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||
# turns \\\\ into \\, and sed turns \\ into \).
|
||||
|
@ -1892,7 +1893,7 @@ do
|
|||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.12"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
|
@ -1911,6 +1912,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
|||
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||
$ac_vpsub
|
||||
$extrasub
|
||||
s%@SHELL@%$SHELL%g
|
||||
s%@CFLAGS@%$CFLAGS%g
|
||||
s%@CPPFLAGS@%$CPPFLAGS%g
|
||||
s%@CXXFLAGS@%$CXXFLAGS%g
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.12
|
||||
# Generated automatically using autoconf version 2.12.1
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
|
@ -49,6 +49,7 @@ mandir='${prefix}/man'
|
|||
# Initialize some other variables.
|
||||
subdirs=
|
||||
MFLAGS= MAKEFLAGS=
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Maximum number of lines to put in a shell here document.
|
||||
ac_max_here_lines=12
|
||||
|
||||
|
@ -332,7 +333,7 @@ EOF
|
|||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.12"
|
||||
echo "configure generated by autoconf version 2.12.1"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
|
@ -525,7 +526,7 @@ fi
|
|||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:529: checking for $ac_word" >&5
|
||||
echo "configure:530: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -554,7 +555,7 @@ if test -z "$CC"; then
|
|||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:558: checking for $ac_word" >&5
|
||||
echo "configure:559: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -602,7 +603,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:606: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:607: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
|
@ -612,11 +613,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
|
|||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 616 "configure"
|
||||
#line 617 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
|
@ -636,12 +637,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:640: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:645: checking whether we are using GNU C" >&5
|
||||
echo "configure:646: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -650,7 +651,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -665,7 +666,7 @@ if test $ac_cv_prog_gcc = yes; then
|
|||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:669: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:670: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -701,7 +702,7 @@ fi
|
|||
# Extract the first word of "chmod", so it can be a program name with args.
|
||||
set dummy chmod; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:705: checking for $ac_word" >&5
|
||||
echo "configure:706: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_ac_cv_prog_chmod'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -709,6 +710,9 @@ else
|
|||
/*)
|
||||
ac_cv_path_ac_cv_prog_chmod="$ac_cv_prog_chmod" # Let the user override the test with a path.
|
||||
;;
|
||||
?:/*)
|
||||
ac_cv_path_ac_cv_prog_chmod="$ac_cv_prog_chmod" # Let the user override the test with a dos path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
|
@ -748,7 +752,7 @@ else
|
|||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:752: checking for $ac_word" >&5
|
||||
echo "configure:756: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -781,7 +785,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:785: checking how to run the C preprocessor" >&5
|
||||
echo "configure:789: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -796,13 +800,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 800 "configure"
|
||||
#line 804 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -813,13 +817,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 817 "configure"
|
||||
#line 821 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -842,12 +846,12 @@ fi
|
|||
echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:846: checking for ANSI C header files" >&5
|
||||
echo "configure:850: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 851 "configure"
|
||||
#line 855 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -855,7 +859,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -872,7 +876,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 876 "configure"
|
||||
#line 880 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -890,7 +894,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 894 "configure"
|
||||
#line 898 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -911,7 +915,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 915 "configure"
|
||||
#line 919 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -922,7 +926,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -947,12 +951,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
||||
echo "configure:951: checking whether time.h and sys/time.h may both be included" >&5
|
||||
echo "configure:955: checking whether time.h and sys/time.h may both be included" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 956 "configure"
|
||||
#line 960 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -961,7 +965,7 @@ int main() {
|
|||
struct tm *tp;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_header_time=yes
|
||||
else
|
||||
|
@ -985,17 +989,17 @@ for ac_hdr in limits.h unistd.h sys/time.h string.h stdlib.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:989: checking for $ac_hdr" >&5
|
||||
echo "configure:993: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 994 "configure"
|
||||
#line 998 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -1023,12 +1027,12 @@ done
|
|||
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:1027: checking for working const" >&5
|
||||
echo "configure:1031: checking for working const" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1032 "configure"
|
||||
#line 1036 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -1077,7 +1081,7 @@ ccp = (char const *const *) p;
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
|
@ -1098,12 +1102,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:1102: checking for size_t" >&5
|
||||
echo "configure:1106: checking for size_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1107 "configure"
|
||||
#line 1111 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -1131,12 +1135,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
|
||||
echo "configure:1135: checking for mode_t" >&5
|
||||
echo "configure:1139: checking for mode_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1140 "configure"
|
||||
#line 1144 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -1165,12 +1169,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
|
||||
echo "configure:1169: checking for pid_t" >&5
|
||||
echo "configure:1173: checking for pid_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1174 "configure"
|
||||
#line 1178 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -1198,12 +1202,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
|
||||
echo "configure:1202: checking for st_blksize in struct stat" >&5
|
||||
echo "configure:1206: checking for st_blksize in struct stat" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1207 "configure"
|
||||
#line 1211 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -1211,7 +1215,7 @@ int main() {
|
|||
struct stat s; s.st_blksize;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_struct_st_blksize=yes
|
||||
else
|
||||
|
@ -1232,12 +1236,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
|
||||
echo "configure:1236: checking for st_blocks in struct stat" >&5
|
||||
echo "configure:1240: checking for st_blocks in struct stat" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1241 "configure"
|
||||
#line 1245 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -1245,7 +1249,7 @@ int main() {
|
|||
struct stat s; s.st_blocks;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_struct_st_blocks=yes
|
||||
else
|
||||
|
@ -1268,12 +1272,12 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
|
||||
echo "configure:1272: checking for st_rdev in struct stat" >&5
|
||||
echo "configure:1276: checking for st_rdev in struct stat" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1277 "configure"
|
||||
#line 1281 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -1281,7 +1285,7 @@ int main() {
|
|||
struct stat s; s.st_rdev;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_struct_st_rdev=yes
|
||||
else
|
||||
|
@ -1302,12 +1306,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
|
||||
echo "configure:1306: checking whether struct tm is in sys/time.h or time.h" >&5
|
||||
echo "configure:1310: checking whether struct tm is in sys/time.h or time.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1311 "configure"
|
||||
#line 1315 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
@ -1315,7 +1319,7 @@ int main() {
|
|||
struct tm *tp; tp->tm_sec;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_struct_tm=time.h
|
||||
else
|
||||
|
@ -1340,12 +1344,12 @@ fi
|
|||
for ac_func in symlink getcwd getwd lstat gethostname strerror clock getrusage
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:1344: checking for $ac_func" >&5
|
||||
echo "configure:1348: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1349 "configure"
|
||||
#line 1353 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1368,7 +1372,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -1426,7 +1430,7 @@ EOF
|
|||
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
case `(ac_space=' '; set) 2>&1` in
|
||||
case `(ac_space=' '; set) 2>&1 | grep ac_space` in
|
||||
*ac_space=\ *)
|
||||
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||
# turns \\\\ into \\, and sed turns \\ into \).
|
||||
|
@ -1493,7 +1497,7 @@ do
|
|||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.12"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
|
@ -1512,6 +1516,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
|||
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||
$ac_vpsub
|
||||
$extrasub
|
||||
s%@SHELL@%$SHELL%g
|
||||
s%@CFLAGS@%$CFLAGS%g
|
||||
s%@CPPFLAGS@%$CPPFLAGS%g
|
||||
s%@CXXFLAGS@%$CXXFLAGS%g
|
||||
|
|
45
gcc/final.c
45
gcc/final.c
|
@ -284,10 +284,14 @@ static void add_bb PROTO((FILE *));
|
|||
static int add_bb_string PROTO((char *, int));
|
||||
static void output_source_line PROTO((FILE *, rtx));
|
||||
static rtx walk_alter_subreg PROTO((rtx));
|
||||
static int alter_cond PROTO((rtx));
|
||||
static void output_asm_name PROTO((void));
|
||||
static void output_operand PROTO((rtx, int));
|
||||
#ifdef LEAF_REGISTERS
|
||||
static void leaf_renumber_regs PROTO((rtx));
|
||||
#endif
|
||||
#ifdef HAVE_cc0
|
||||
static int alter_cond PROTO((rtx));
|
||||
#endif
|
||||
|
||||
extern char *getpwd ();
|
||||
|
||||
|
@ -455,11 +459,16 @@ end_final (filename)
|
|||
ASM_OUTPUT_SHARED_LOCAL (asm_out_file, name, size, rounded);
|
||||
else
|
||||
#endif
|
||||
#ifdef ASM_OUTPUT_ALIGNED_DECL_LOCAL
|
||||
ASM_OUTPUT_ALIGNED_DECL_LOCAL (asm_out_file, NULL_TREE, name, size,
|
||||
BIGGEST_ALIGNMENT);
|
||||
#else
|
||||
#ifdef ASM_OUTPUT_ALIGNED_LOCAL
|
||||
ASM_OUTPUT_ALIGNED_LOCAL (asm_out_file, name, size,
|
||||
BIGGEST_ALIGNMENT);
|
||||
#else
|
||||
ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -672,6 +681,10 @@ get_attr_length (insn)
|
|||
length += get_attr_length (XVECEXP (body, 0, i));
|
||||
else
|
||||
length = insn_default_length (insn);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef ADJUST_INSN_LENGTH
|
||||
|
@ -753,6 +766,7 @@ shorten_branches (first)
|
|||
to determine how much padding we need at this point. Therefore,
|
||||
assume worst possible alignment. */
|
||||
insn_lengths[uid] += unitsize - 1;
|
||||
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
@ -2041,9 +2055,12 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
|
|||
PUT_CODE (insn, NOTE);
|
||||
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
|
||||
NOTE_SOURCE_FILE (insn) = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2327,6 +2344,9 @@ walk_alter_subreg (x)
|
|||
|
||||
case SUBREG:
|
||||
return alter_subreg (x);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return x;
|
||||
|
@ -2385,6 +2405,9 @@ alter_cond (cond)
|
|||
PUT_CODE (cond, NE);
|
||||
value = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cc_status.flags & CC_NOT_NEGATIVE)
|
||||
|
@ -2411,6 +2434,9 @@ alter_cond (cond)
|
|||
PUT_CODE (cond, NE);
|
||||
value = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cc_status.flags & CC_NO_OVERFLOW)
|
||||
|
@ -2433,19 +2459,15 @@ alter_cond (cond)
|
|||
case LTU:
|
||||
/* Jump becomes no-op. */
|
||||
return -1;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cc_status.flags & (CC_Z_IN_NOT_N | CC_Z_IN_N))
|
||||
switch (GET_CODE (cond))
|
||||
{
|
||||
case LE:
|
||||
case LEU:
|
||||
case GE:
|
||||
case GEU:
|
||||
case LT:
|
||||
case LTU:
|
||||
case GT:
|
||||
case GTU:
|
||||
default:
|
||||
abort ();
|
||||
|
||||
case NE:
|
||||
|
@ -2483,6 +2505,9 @@ alter_cond (cond)
|
|||
PUT_CODE (cond, GEU);
|
||||
value = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
106
gcc/fixinc.math
106
gcc/fixinc.math
|
@ -2,7 +2,7 @@
|
|||
# Fix struct exception in /usr/include/math.h.
|
||||
#
|
||||
# We expect several systems which did not need fixincludes in the past
|
||||
# to need to fix just math.h. So we created a separate fixinc.mathh
|
||||
# to need to fix just math.h. So we created a separate fixinc.math
|
||||
# script to fix just that problem.
|
||||
# See README-fixinc for more information.
|
||||
|
||||
|
@ -13,99 +13,41 @@ INPUT=${2-${INPUT-/usr/include}}
|
|||
# Directory in which to store the results.
|
||||
LIB=${1?"fixincludes: output directory not specified"}
|
||||
|
||||
# Define PWDCMD as a command to use to get the working dir
|
||||
# in the form that we want.
|
||||
PWDCMD=pwd
|
||||
case "`pwd`" in
|
||||
//*)
|
||||
# On an Apollo, discard everything before `/usr'.
|
||||
PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Original directory.
|
||||
ORIGDIR=`${PWDCMD}`
|
||||
|
||||
# Make sure it exists.
|
||||
if [ ! -d $LIB ]; then
|
||||
mkdir $LIB || exit 1
|
||||
fi
|
||||
|
||||
# Make LIB absolute only if needed to avoid problems with the amd.
|
||||
case $LIB in
|
||||
/*)
|
||||
;;
|
||||
*)
|
||||
cd $LIB; LIB=`${PWDCMD}`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Fail if no arg to specify a directory for the output.
|
||||
if [ x$1 = x ]
|
||||
then echo fixincludes: no output directory specified
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Building fixed headers in ${LIB}
|
||||
|
||||
# Determine whether this system has symbolic links.
|
||||
if ln -s X $LIB/ShouldNotExist 2>/dev/null; then
|
||||
rm -f $LIB/ShouldNotExist
|
||||
LINKS=true
|
||||
elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then
|
||||
rm -f /tmp/ShouldNotExist
|
||||
LINKS=true
|
||||
else
|
||||
LINKS=false
|
||||
fi
|
||||
|
||||
cd ${INPUT}
|
||||
|
||||
# Some math.h files define struct exception, which conflicts with
|
||||
# the class exception defined in the C++ file std/stdexcept.h. We
|
||||
# redefine it to __math_exception. This is not a great fix, but I
|
||||
# haven't been able to think of anything better.
|
||||
file=math.h
|
||||
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
|
||||
cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
|
||||
chmod +w ${LIB}/$file 2>/dev/null
|
||||
chmod a+r ${LIB}/$file 2>/dev/null
|
||||
fi
|
||||
|
||||
if [ -r ${LIB}/$file ]; then
|
||||
echo Fixing $file, exception
|
||||
sed -e '/struct exception/i\
|
||||
#ifdef __cplusplus\
|
||||
#define exception __math_exception\
|
||||
#endif\
|
||||
'\
|
||||
-e '/struct exception/a\
|
||||
#ifdef __cplusplus\
|
||||
#undef exception\
|
||||
#endif\
|
||||
' ${LIB}/$file > ${LIB}/${file}.sed
|
||||
rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
|
||||
if egrep 'matherr()' ${LIB}/$file >/dev/null 2>&1; then
|
||||
sed -e '/matherr/i\
|
||||
#ifdef __cplusplus\
|
||||
#define exception __math_exception\
|
||||
#endif\
|
||||
'\
|
||||
-e '/matherr/a\
|
||||
#ifdef __cplusplus\
|
||||
#undef exception\
|
||||
#endif\
|
||||
' ${LIB}/$file > ${LIB}/${file}.sed
|
||||
rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
|
||||
fi
|
||||
if cmp $file ${LIB}/$file >/dev/null 2>&1; then
|
||||
rm -f ${LIB}/$file
|
||||
else
|
||||
# Find any include directives that use "file".
|
||||
for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
|
||||
dir=`echo $file | sed -e s'|/[^/]*$||'`
|
||||
required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
|
||||
done
|
||||
if [ -r $INPUT/$file ]; then
|
||||
echo Checking $INPUT/$file
|
||||
if grep 'struct exception' $INPUT/$file >/dev/null
|
||||
then
|
||||
echo Fixed $file
|
||||
rm -f $LIB/$file
|
||||
cat <<'__EOF__' >$LIB/$file
|
||||
#ifndef _MATH_H_WRAPPER
|
||||
#ifdef __cplusplus
|
||||
# define exception __math_exception
|
||||
#endif
|
||||
#include_next <math.h>
|
||||
#ifdef __cplusplus
|
||||
# undef exception
|
||||
#endif
|
||||
#define _MATH_H_WRAPPER
|
||||
#endif /* _MATH_H_WRAPPER */
|
||||
__EOF__
|
||||
# Define _MATH_H_WRAPPER at the end of the wrapper, not the start,
|
||||
# so that if #include_next gets another instance of the wrapper,
|
||||
# this will follow the #include_next chain until we arrive at
|
||||
# the real <math.h>.
|
||||
chmod a+r $LIB/$file
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
|
|
@ -2901,6 +2901,43 @@ for file in curses.h dbm.h locale.h stdio.h stdlib.h string.h time.h unistd.h sy
|
|||
fi
|
||||
done
|
||||
|
||||
# HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
|
||||
file=sys/param.h
|
||||
base=`basename $file`
|
||||
if [ -r ${LIB}/$file ]; then
|
||||
file_to_fix=${LIB}/$file
|
||||
else
|
||||
if [ -r ${INPUT}/$file ]; then
|
||||
file_to_fix=${INPUT}/$file
|
||||
else
|
||||
file_to_fix=""
|
||||
fi
|
||||
fi
|
||||
if [ \! -z "$file_to_fix" ]; then
|
||||
echo Checking $file_to_fix
|
||||
sed -e '/[ ]MAXINT[ ]/i\
|
||||
#ifndef MAXINT
|
||||
'\
|
||||
-e '/[ ]MAXINT[ ]/a\
|
||||
#endif
|
||||
' $file_to_fix > /tmp/$base
|
||||
if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \
|
||||
true
|
||||
else
|
||||
echo Fixed $file_to_fix
|
||||
rm -f ${LIB}/$file
|
||||
cp /tmp/$base ${LIB}/$file
|
||||
chmod a+r ${LIB}/$file
|
||||
# Find any include directives that use "file".
|
||||
for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
|
||||
dir=`echo $file | sed -e s'|/[^/]*$||'`
|
||||
required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
|
||||
done
|
||||
fi
|
||||
rm -f /tmp/$base
|
||||
fi
|
||||
|
||||
|
||||
# This loop does not appear to do anything, because it uses file
|
||||
# rather than $file when setting target. It also appears to be
|
||||
# unnecessary, since the main loop processes symbolic links.
|
||||
|
@ -2960,4 +2997,5 @@ for file in $files; do
|
|||
rmdir $LIB/$file > /dev/null 2>&1
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -108,8 +108,8 @@ Boston, MA 02111-1307, USA. */
|
|||
register usage: reg_n_refs, reg_n_deaths, reg_n_sets, reg_live_length,
|
||||
reg_n_calls_crosses and reg_basic_block. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include "rtl.h"
|
||||
#include "basic-block.h"
|
||||
#include "insn-config.h"
|
||||
|
@ -2616,6 +2616,9 @@ mark_used_regs (needed, live, x, final, insn)
|
|||
)
|
||||
SET_REGNO_REG_SET (live, i);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Recursively scan the operands of this expression. */
|
||||
|
|
470
gcc/fold-const.c
470
gcc/fold-const.c
|
@ -42,9 +42,9 @@ Boston, MA 02111-1307, USA. */
|
|||
force_fit_type takes a constant and prior overflow indicator, and
|
||||
forces the value to fit the type. It returns an overflow indicator. */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
#include "config.h"
|
||||
#include "flags.h"
|
||||
#include "tree.h"
|
||||
|
||||
|
@ -62,6 +62,7 @@ int div_and_round_double PROTO((enum tree_code, int, HOST_WIDE_INT,
|
|||
HOST_WIDE_INT *));
|
||||
static int split_tree PROTO((tree, enum tree_code, tree *,
|
||||
tree *, int *));
|
||||
static tree int_const_binop PROTO((enum tree_code, tree, tree, int, int));
|
||||
static tree const_binop PROTO((enum tree_code, tree, tree, int));
|
||||
static tree fold_convert PROTO((tree, tree));
|
||||
static enum tree_code invert_tree_comparison PROTO((enum tree_code));
|
||||
|
@ -1051,6 +1052,197 @@ split_tree (in, code, varp, conp, varsignp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Combine two integer constants ARG1 and ARG2 under operation CODE
|
||||
to produce a new constant.
|
||||
|
||||
If NOTRUNC is nonzero, do not truncate the result to fit the data type.
|
||||
If FORSIZE is nonzero, compute overflow for unsigned types. */
|
||||
|
||||
static tree
|
||||
int_const_binop (code, arg1, arg2, notrunc, forsize)
|
||||
enum tree_code code;
|
||||
register tree arg1, arg2;
|
||||
int notrunc, forsize;
|
||||
{
|
||||
HOST_WIDE_INT int1l, int1h, int2l, int2h;
|
||||
HOST_WIDE_INT low, hi;
|
||||
HOST_WIDE_INT garbagel, garbageh;
|
||||
register tree t;
|
||||
int uns = TREE_UNSIGNED (TREE_TYPE (arg1));
|
||||
int overflow = 0;
|
||||
int no_overflow = 0;
|
||||
|
||||
int1l = TREE_INT_CST_LOW (arg1);
|
||||
int1h = TREE_INT_CST_HIGH (arg1);
|
||||
int2l = TREE_INT_CST_LOW (arg2);
|
||||
int2h = TREE_INT_CST_HIGH (arg2);
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case BIT_IOR_EXPR:
|
||||
low = int1l | int2l, hi = int1h | int2h;
|
||||
break;
|
||||
|
||||
case BIT_XOR_EXPR:
|
||||
low = int1l ^ int2l, hi = int1h ^ int2h;
|
||||
break;
|
||||
|
||||
case BIT_AND_EXPR:
|
||||
low = int1l & int2l, hi = int1h & int2h;
|
||||
break;
|
||||
|
||||
case BIT_ANDTC_EXPR:
|
||||
low = int1l & ~int2l, hi = int1h & ~int2h;
|
||||
break;
|
||||
|
||||
case RSHIFT_EXPR:
|
||||
int2l = - int2l;
|
||||
case LSHIFT_EXPR:
|
||||
/* It's unclear from the C standard whether shifts can overflow.
|
||||
The following code ignores overflow; perhaps a C standard
|
||||
interpretation ruling is needed. */
|
||||
lshift_double (int1l, int1h, int2l,
|
||||
TYPE_PRECISION (TREE_TYPE (arg1)),
|
||||
&low, &hi,
|
||||
!uns);
|
||||
no_overflow = 1;
|
||||
break;
|
||||
|
||||
case RROTATE_EXPR:
|
||||
int2l = - int2l;
|
||||
case LROTATE_EXPR:
|
||||
lrotate_double (int1l, int1h, int2l,
|
||||
TYPE_PRECISION (TREE_TYPE (arg1)),
|
||||
&low, &hi);
|
||||
break;
|
||||
|
||||
case PLUS_EXPR:
|
||||
overflow = add_double (int1l, int1h, int2l, int2h, &low, &hi);
|
||||
break;
|
||||
|
||||
case MINUS_EXPR:
|
||||
neg_double (int2l, int2h, &low, &hi);
|
||||
add_double (int1l, int1h, low, hi, &low, &hi);
|
||||
overflow = overflow_sum_sign (hi, int2h, int1h);
|
||||
break;
|
||||
|
||||
case MULT_EXPR:
|
||||
overflow = mul_double (int1l, int1h, int2l, int2h, &low, &hi);
|
||||
break;
|
||||
|
||||
case TRUNC_DIV_EXPR:
|
||||
case FLOOR_DIV_EXPR: case CEIL_DIV_EXPR:
|
||||
case EXACT_DIV_EXPR:
|
||||
/* This is a shortcut for a common special case. */
|
||||
if (int2h == 0 && int2l > 0
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg2)
|
||||
&& int1h == 0 && int1l >= 0)
|
||||
{
|
||||
if (code == CEIL_DIV_EXPR)
|
||||
int1l += int2l - 1;
|
||||
low = int1l / int2l, hi = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* ... fall through ... */
|
||||
|
||||
case ROUND_DIV_EXPR:
|
||||
if (int2h == 0 && int2l == 1)
|
||||
{
|
||||
low = int1l, hi = int1h;
|
||||
break;
|
||||
}
|
||||
if (int1l == int2l && int1h == int2h
|
||||
&& ! (int1l == 0 && int1h == 0))
|
||||
{
|
||||
low = 1, hi = 0;
|
||||
break;
|
||||
}
|
||||
overflow = div_and_round_double (code, uns,
|
||||
int1l, int1h, int2l, int2h,
|
||||
&low, &hi, &garbagel, &garbageh);
|
||||
break;
|
||||
|
||||
case TRUNC_MOD_EXPR:
|
||||
case FLOOR_MOD_EXPR: case CEIL_MOD_EXPR:
|
||||
/* This is a shortcut for a common special case. */
|
||||
if (int2h == 0 && int2l > 0
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg2)
|
||||
&& int1h == 0 && int1l >= 0)
|
||||
{
|
||||
if (code == CEIL_MOD_EXPR)
|
||||
int1l += int2l - 1;
|
||||
low = int1l % int2l, hi = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* ... fall through ... */
|
||||
|
||||
case ROUND_MOD_EXPR:
|
||||
overflow = div_and_round_double (code, uns,
|
||||
int1l, int1h, int2l, int2h,
|
||||
&garbagel, &garbageh, &low, &hi);
|
||||
break;
|
||||
|
||||
case MIN_EXPR:
|
||||
case MAX_EXPR:
|
||||
if (uns)
|
||||
{
|
||||
low = (((unsigned HOST_WIDE_INT) int1h
|
||||
< (unsigned HOST_WIDE_INT) int2h)
|
||||
|| (((unsigned HOST_WIDE_INT) int1h
|
||||
== (unsigned HOST_WIDE_INT) int2h)
|
||||
&& ((unsigned HOST_WIDE_INT) int1l
|
||||
< (unsigned HOST_WIDE_INT) int2l)));
|
||||
}
|
||||
else
|
||||
{
|
||||
low = ((int1h < int2h)
|
||||
|| ((int1h == int2h)
|
||||
&& ((unsigned HOST_WIDE_INT) int1l
|
||||
< (unsigned HOST_WIDE_INT) int2l)));
|
||||
}
|
||||
if (low == (code == MIN_EXPR))
|
||||
low = int1l, hi = int1h;
|
||||
else
|
||||
low = int2l, hi = int2h;
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
if (TREE_TYPE (arg1) == sizetype && hi == 0
|
||||
&& low >= 0 && low <= TREE_INT_CST_LOW (TYPE_MAX_VALUE (sizetype))
|
||||
&& ! overflow
|
||||
&& ! TREE_OVERFLOW (arg1) && ! TREE_OVERFLOW (arg2))
|
||||
t = size_int (low);
|
||||
else
|
||||
{
|
||||
t = build_int_2 (low, hi);
|
||||
TREE_TYPE (t) = TREE_TYPE (arg1);
|
||||
}
|
||||
|
||||
TREE_OVERFLOW (t)
|
||||
= ((notrunc ? (!uns || forsize) && overflow
|
||||
: force_fit_type (t, (!uns || forsize) && overflow) && ! no_overflow)
|
||||
| TREE_OVERFLOW (arg1)
|
||||
| TREE_OVERFLOW (arg2));
|
||||
/* If we're doing a size calculation, unsigned arithmetic does overflow.
|
||||
So check if force_fit_type truncated the value. */
|
||||
if (forsize
|
||||
&& ! TREE_OVERFLOW (t)
|
||||
&& (TREE_INT_CST_HIGH (t) != hi
|
||||
|| TREE_INT_CST_LOW (t) != low))
|
||||
TREE_OVERFLOW (t) = 1;
|
||||
TREE_CONSTANT_OVERFLOW (t) = (TREE_OVERFLOW (t)
|
||||
| TREE_CONSTANT_OVERFLOW (arg1)
|
||||
| TREE_CONSTANT_OVERFLOW (arg2));
|
||||
return t;
|
||||
}
|
||||
|
||||
/* Combine two constants ARG1 and ARG2 under operation CODE
|
||||
to produce a new constant.
|
||||
We assume ARG1 and ARG2 have the same data type,
|
||||
|
@ -1067,176 +1259,8 @@ const_binop (code, arg1, arg2, notrunc)
|
|||
STRIP_NOPS (arg1); STRIP_NOPS (arg2);
|
||||
|
||||
if (TREE_CODE (arg1) == INTEGER_CST)
|
||||
{
|
||||
register HOST_WIDE_INT int1l = TREE_INT_CST_LOW (arg1);
|
||||
register HOST_WIDE_INT int1h = TREE_INT_CST_HIGH (arg1);
|
||||
HOST_WIDE_INT int2l = TREE_INT_CST_LOW (arg2);
|
||||
HOST_WIDE_INT int2h = TREE_INT_CST_HIGH (arg2);
|
||||
HOST_WIDE_INT low, hi;
|
||||
HOST_WIDE_INT garbagel, garbageh;
|
||||
register tree t;
|
||||
int uns = TREE_UNSIGNED (TREE_TYPE (arg1));
|
||||
int overflow = 0;
|
||||
int no_overflow = 0;
|
||||
return int_const_binop (code, arg1, arg2, notrunc, 0);
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case BIT_IOR_EXPR:
|
||||
low = int1l | int2l, hi = int1h | int2h;
|
||||
break;
|
||||
|
||||
case BIT_XOR_EXPR:
|
||||
low = int1l ^ int2l, hi = int1h ^ int2h;
|
||||
break;
|
||||
|
||||
case BIT_AND_EXPR:
|
||||
low = int1l & int2l, hi = int1h & int2h;
|
||||
break;
|
||||
|
||||
case BIT_ANDTC_EXPR:
|
||||
low = int1l & ~int2l, hi = int1h & ~int2h;
|
||||
break;
|
||||
|
||||
case RSHIFT_EXPR:
|
||||
int2l = - int2l;
|
||||
case LSHIFT_EXPR:
|
||||
/* It's unclear from the C standard whether shifts can overflow.
|
||||
The following code ignores overflow; perhaps a C standard
|
||||
interpretation ruling is needed. */
|
||||
lshift_double (int1l, int1h, int2l,
|
||||
TYPE_PRECISION (TREE_TYPE (arg1)),
|
||||
&low, &hi,
|
||||
!uns);
|
||||
no_overflow = 1;
|
||||
break;
|
||||
|
||||
case RROTATE_EXPR:
|
||||
int2l = - int2l;
|
||||
case LROTATE_EXPR:
|
||||
lrotate_double (int1l, int1h, int2l,
|
||||
TYPE_PRECISION (TREE_TYPE (arg1)),
|
||||
&low, &hi);
|
||||
break;
|
||||
|
||||
case PLUS_EXPR:
|
||||
overflow = add_double (int1l, int1h, int2l, int2h, &low, &hi);
|
||||
break;
|
||||
|
||||
case MINUS_EXPR:
|
||||
neg_double (int2l, int2h, &low, &hi);
|
||||
add_double (int1l, int1h, low, hi, &low, &hi);
|
||||
overflow = overflow_sum_sign (hi, int2h, int1h);
|
||||
break;
|
||||
|
||||
case MULT_EXPR:
|
||||
overflow = mul_double (int1l, int1h, int2l, int2h, &low, &hi);
|
||||
break;
|
||||
|
||||
case TRUNC_DIV_EXPR:
|
||||
case FLOOR_DIV_EXPR: case CEIL_DIV_EXPR:
|
||||
case EXACT_DIV_EXPR:
|
||||
/* This is a shortcut for a common special case. */
|
||||
if (int2h == 0 && int2l > 0
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg2)
|
||||
&& int1h == 0 && int1l >= 0)
|
||||
{
|
||||
if (code == CEIL_DIV_EXPR)
|
||||
int1l += int2l - 1;
|
||||
low = int1l / int2l, hi = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* ... fall through ... */
|
||||
|
||||
case ROUND_DIV_EXPR:
|
||||
if (int2h == 0 && int2l == 1)
|
||||
{
|
||||
low = int1l, hi = int1h;
|
||||
break;
|
||||
}
|
||||
if (int1l == int2l && int1h == int2h
|
||||
&& ! (int1l == 0 && int1h == 0))
|
||||
{
|
||||
low = 1, hi = 0;
|
||||
break;
|
||||
}
|
||||
overflow = div_and_round_double (code, uns,
|
||||
int1l, int1h, int2l, int2h,
|
||||
&low, &hi, &garbagel, &garbageh);
|
||||
break;
|
||||
|
||||
case TRUNC_MOD_EXPR:
|
||||
case FLOOR_MOD_EXPR: case CEIL_MOD_EXPR:
|
||||
/* This is a shortcut for a common special case. */
|
||||
if (int2h == 0 && int2l > 0
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg2)
|
||||
&& int1h == 0 && int1l >= 0)
|
||||
{
|
||||
if (code == CEIL_MOD_EXPR)
|
||||
int1l += int2l - 1;
|
||||
low = int1l % int2l, hi = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* ... fall through ... */
|
||||
|
||||
case ROUND_MOD_EXPR:
|
||||
overflow = div_and_round_double (code, uns,
|
||||
int1l, int1h, int2l, int2h,
|
||||
&garbagel, &garbageh, &low, &hi);
|
||||
break;
|
||||
|
||||
case MIN_EXPR:
|
||||
case MAX_EXPR:
|
||||
if (uns)
|
||||
{
|
||||
low = (((unsigned HOST_WIDE_INT) int1h
|
||||
< (unsigned HOST_WIDE_INT) int2h)
|
||||
|| (((unsigned HOST_WIDE_INT) int1h
|
||||
== (unsigned HOST_WIDE_INT) int2h)
|
||||
&& ((unsigned HOST_WIDE_INT) int1l
|
||||
< (unsigned HOST_WIDE_INT) int2l)));
|
||||
}
|
||||
else
|
||||
{
|
||||
low = ((int1h < int2h)
|
||||
|| ((int1h == int2h)
|
||||
&& ((unsigned HOST_WIDE_INT) int1l
|
||||
< (unsigned HOST_WIDE_INT) int2l)));
|
||||
}
|
||||
if (low == (code == MIN_EXPR))
|
||||
low = int1l, hi = int1h;
|
||||
else
|
||||
low = int2l, hi = int2h;
|
||||
break;
|
||||
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
got_it:
|
||||
if (TREE_TYPE (arg1) == sizetype && hi == 0
|
||||
&& low >= 0 && low <= TREE_INT_CST_LOW (TYPE_MAX_VALUE (sizetype))
|
||||
&& ! overflow
|
||||
&& ! TREE_OVERFLOW (arg1) && ! TREE_OVERFLOW (arg2))
|
||||
t = size_int (low);
|
||||
else
|
||||
{
|
||||
t = build_int_2 (low, hi);
|
||||
TREE_TYPE (t) = TREE_TYPE (arg1);
|
||||
}
|
||||
|
||||
TREE_OVERFLOW (t)
|
||||
= ((notrunc ? !uns && overflow
|
||||
: force_fit_type (t, overflow && !uns) && ! no_overflow)
|
||||
| TREE_OVERFLOW (arg1)
|
||||
| TREE_OVERFLOW (arg2));
|
||||
TREE_CONSTANT_OVERFLOW (t) = (TREE_OVERFLOW (t)
|
||||
| TREE_CONSTANT_OVERFLOW (arg1)
|
||||
| TREE_CONSTANT_OVERFLOW (arg2));
|
||||
return t;
|
||||
}
|
||||
#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
|
||||
if (TREE_CODE (arg1) == REAL_CST)
|
||||
{
|
||||
|
@ -1450,7 +1474,7 @@ size_binop (code, arg0, arg1)
|
|||
return arg1;
|
||||
|
||||
/* Handle general case of two integer constants. */
|
||||
return const_binop (code, arg0, arg1, 0);
|
||||
return int_const_binop (code, arg0, arg1, 0, 1);
|
||||
}
|
||||
|
||||
if (arg0 == error_mark_node || arg1 == error_mark_node)
|
||||
|
@ -1790,6 +1814,8 @@ operand_equal_p (arg0, arg1, only_const)
|
|||
case ADDR_EXPR:
|
||||
return operand_equal_p (TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1, 0),
|
||||
0);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (only_const)
|
||||
|
@ -1847,11 +1873,13 @@ operand_equal_p (arg0, arg1, only_const)
|
|||
TREE_OPERAND (arg1, 1), 0)
|
||||
&& operand_equal_p (TREE_OPERAND (arg0, 2),
|
||||
TREE_OPERAND (arg1, 2), 0));
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Similar to operand_equal_p, but see if ARG0 might have been made by
|
||||
|
@ -2002,9 +2030,10 @@ twoval_comparison_p (arg, cval1, cval2, save_p)
|
|||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ARG is a tree that is known to contain just arithmetic operations and
|
||||
|
@ -2059,7 +2088,10 @@ eval_subst (arg, old0, new0, old1, new1)
|
|||
old0, new0, old1, new1),
|
||||
eval_subst (TREE_OPERAND (arg, 2),
|
||||
old0, new0, old1, new1)));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* fall through (???) */
|
||||
|
||||
case '<':
|
||||
{
|
||||
|
@ -2082,9 +2114,10 @@ eval_subst (arg, old0, new0, old1, new1)
|
|||
|
||||
return fold (build (code, type, arg0, arg1));
|
||||
}
|
||||
}
|
||||
|
||||
return arg;
|
||||
default:
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return a tree for the case when the result of an expression is RESULT
|
||||
|
@ -2222,6 +2255,9 @@ invert_truthvalue (arg)
|
|||
case CLEANUP_POINT_EXPR:
|
||||
return build1 (CLEANUP_POINT_EXPR, type,
|
||||
invert_truthvalue (TREE_OPERAND (arg, 0)));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (TREE_CODE (TREE_TYPE (arg)) != BOOLEAN_TYPE)
|
||||
abort ();
|
||||
|
@ -2704,6 +2740,8 @@ range_binop (code, type, arg0, upper0_p, arg1, upper1_p)
|
|||
case GT_EXPR: case GE_EXPR:
|
||||
result = sgn0 > sgn1;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
return convert (type, result ? integer_one_node : integer_zero_node);
|
||||
|
@ -2780,6 +2818,8 @@ make_range (exp, pin_p, plow, phigh)
|
|||
case LE_EXPR: /* + [-, c] */
|
||||
in_p = ! in_p, low = 0, high = arg1;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
exp = arg0;
|
||||
|
@ -5114,13 +5154,16 @@ fold (expr)
|
|||
arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
|
||||
t = build (code, type, TREE_OPERAND (t, 0), arg1);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is an EQ or NE comparison with zero and ARG0 is
|
||||
(1 << foo) & bar, convert it to (bar >> foo) & 1. Both require
|
||||
two operations, but the latter can be done in one less insn
|
||||
one machine that have only two-operand insns or on which a
|
||||
on machines that have only two-operand insns or on which a
|
||||
constant cannot be the first operand. */
|
||||
if (integer_zerop (arg1) && (code == EQ_EXPR || code == NE_EXPR)
|
||||
&& TREE_CODE (arg0) == BIT_AND_EXPR)
|
||||
|
@ -5246,6 +5289,8 @@ fold (expr)
|
|||
t = build_int_2 (0, 0);
|
||||
TREE_TYPE (t) = type;
|
||||
return t;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5273,9 +5318,41 @@ fold (expr)
|
|||
return omit_one_operand (type,
|
||||
convert (type, integer_zero_node),
|
||||
arg0);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* An unsigned <= 0x7fffffff can be simplified. */
|
||||
{
|
||||
int width = TYPE_PRECISION (TREE_TYPE (arg1));
|
||||
if (TREE_CODE (arg1) == INTEGER_CST
|
||||
&& ! TREE_CONSTANT_OVERFLOW (arg1)
|
||||
&& width <= HOST_BITS_PER_WIDE_INT
|
||||
&& TREE_INT_CST_LOW (arg1) == ((HOST_WIDE_INT) 1 << (width - 1)) - 1
|
||||
&& TREE_INT_CST_HIGH (arg1) == 0
|
||||
&& (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
|
||||
|| TREE_CODE (TREE_TYPE (arg1)) == POINTER_TYPE)
|
||||
&& TREE_UNSIGNED (TREE_TYPE (arg1)))
|
||||
{
|
||||
switch (TREE_CODE (t))
|
||||
{
|
||||
case LE_EXPR:
|
||||
return fold (build (GE_EXPR, type,
|
||||
convert (signed_type (TREE_TYPE (arg0)),
|
||||
arg0),
|
||||
convert (signed_type (TREE_TYPE (arg1)),
|
||||
integer_zero_node)));
|
||||
case GT_EXPR:
|
||||
return fold (build (LT_EXPR, type,
|
||||
convert (signed_type (TREE_TYPE (arg0)),
|
||||
arg0),
|
||||
convert (signed_type (TREE_TYPE (arg1)),
|
||||
integer_zero_node)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we are comparing an expression that just has comparisons
|
||||
of two integer values, arithmetic expressions of those comparisons,
|
||||
and constants, we can simplify it. There are only three cases
|
||||
|
@ -5577,6 +5654,8 @@ fold (expr)
|
|||
fold (build1 (ABS_EXPR,
|
||||
TREE_TYPE (arg1),
|
||||
arg1))))));
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* If this is A != 0 ? A : 0, this is simply A. For ==, it is
|
||||
|
@ -5608,21 +5687,28 @@ fold (expr)
|
|||
return pedantic_non_lvalue (convert (type, arg1));
|
||||
case LE_EXPR:
|
||||
case LT_EXPR:
|
||||
/* In C++ a ?: expression can be an lvalue, so we can't
|
||||
do this; we would lose the distinction between
|
||||
LT and LE. */
|
||||
if (pedantic_lvalues)
|
||||
return pedantic_non_lvalue
|
||||
(convert (type, (fold (build (MIN_EXPR, comp_type,
|
||||
comp_op0, comp_op1)))));
|
||||
/* In C++ a ?: expression can be an lvalue, so put the
|
||||
operand which will be used if they are equal first
|
||||
so that we can convert this back to the
|
||||
corresponding COND_EXPR. */
|
||||
return pedantic_non_lvalue
|
||||
(convert (type, (fold (build (MIN_EXPR, comp_type,
|
||||
(comp_code == LE_EXPR
|
||||
? comp_op0 : comp_op1),
|
||||
(comp_code == LE_EXPR
|
||||
? comp_op1 : comp_op0))))));
|
||||
break;
|
||||
case GE_EXPR:
|
||||
case GT_EXPR:
|
||||
if (pedantic_lvalues)
|
||||
return pedantic_non_lvalue
|
||||
(convert (type, fold (build (MAX_EXPR, comp_type,
|
||||
comp_op0, comp_op1))));
|
||||
return pedantic_non_lvalue
|
||||
(convert (type, fold (build (MAX_EXPR, comp_type,
|
||||
(comp_code == GE_EXPR
|
||||
? comp_op0 : comp_op1),
|
||||
(comp_code == GE_EXPR
|
||||
? comp_op1 : comp_op0)))));
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5683,6 +5769,10 @@ fold (expr)
|
|||
return pedantic_non_lvalue
|
||||
(fold (build (MAX_EXPR, type, arg1, arg2)));
|
||||
break;
|
||||
case NE_EXPR:
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "defaults.h"
|
||||
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
#include "gansidecl.h"
|
||||
#include "dwarf2.h"
|
||||
#include "frame.h"
|
||||
#include <stddef.h>
|
||||
|
|
338
gcc/function.c
338
gcc/function.c
|
@ -300,14 +300,15 @@ static int invalid_stack_slot;
|
|||
/* Last insn of those whose job was to put parms into their nominal homes. */
|
||||
static rtx last_parm_insn;
|
||||
|
||||
/* 1 + last pseudo register number used for loading a copy
|
||||
of a parameter of this function. */
|
||||
static int max_parm_reg;
|
||||
/* 1 + last pseudo register number possibly used for loading a copy
|
||||
of a parameter of this function. */
|
||||
int max_parm_reg;
|
||||
|
||||
/* Vector indexed by REGNO, containing location on stack in which
|
||||
to put the parm which is nominally in pseudo register REGNO,
|
||||
if we discover that that parm must go in the stack. */
|
||||
static rtx *parm_reg_stack_loc;
|
||||
if we discover that that parm must go in the stack. The highest
|
||||
element in this vector is one less than MAX_PARM_REG, above. */
|
||||
rtx *parm_reg_stack_loc;
|
||||
|
||||
/* Nonzero once virtual register instantiation has been done.
|
||||
assign_stack_local uses frame_pointer_rtx when this is nonzero. */
|
||||
|
@ -423,7 +424,7 @@ struct fixup_replacement
|
|||
static struct temp_slot *find_temp_slot_from_address PROTO((rtx));
|
||||
static void put_reg_into_stack PROTO((struct function *, rtx, tree,
|
||||
enum machine_mode, enum machine_mode,
|
||||
int));
|
||||
int, int));
|
||||
static void fixup_var_refs PROTO((rtx, enum machine_mode, int));
|
||||
static struct fixup_replacement
|
||||
*find_fixup_replacement PROTO((struct fixup_replacement **, rtx));
|
||||
|
@ -449,6 +450,8 @@ static tree blocks_nreverse PROTO((tree));
|
|||
static int all_blocks PROTO((tree, tree *));
|
||||
static int *record_insns PROTO((rtx));
|
||||
static int contains PROTO((rtx, int *));
|
||||
static void put_addressof_into_stack PROTO((rtx));
|
||||
static void purge_addressof_1 PROTO((rtx *, rtx, int));
|
||||
|
||||
/* Pointer to chain of `struct function' for containing functions. */
|
||||
struct function *outer_function_chain;
|
||||
|
@ -536,7 +539,7 @@ push_function_context_to (context)
|
|||
init_emit ();
|
||||
save_expr_status (p);
|
||||
save_stmt_status (p);
|
||||
save_varasm_status (p);
|
||||
save_varasm_status (p, context);
|
||||
|
||||
if (save_machine_status)
|
||||
(*save_machine_status) (p);
|
||||
|
@ -1307,6 +1310,7 @@ put_var_into_stack (decl)
|
|||
enum machine_mode promoted_mode, decl_mode;
|
||||
struct function *function = 0;
|
||||
tree context;
|
||||
int can_use_addressof;
|
||||
|
||||
if (output_bytecode)
|
||||
return;
|
||||
|
@ -1346,11 +1350,35 @@ put_var_into_stack (decl)
|
|||
decl_mode = promoted_mode = GET_MODE (reg);
|
||||
}
|
||||
|
||||
can_use_addressof
|
||||
= (function == 0
|
||||
/* FIXME make it work for promoted modes too */
|
||||
&& decl_mode == promoted_mode
|
||||
#ifdef NON_SAVING_SETJMP
|
||||
&& ! (NON_SAVING_SETJMP && current_function_calls_setjmp)
|
||||
#endif
|
||||
);
|
||||
|
||||
/* If we can't use ADDRESSOF, make sure we see through one we already
|
||||
generated. */
|
||||
if (! can_use_addressof && GET_CODE (reg) == MEM
|
||||
&& GET_CODE (XEXP (reg, 0)) == ADDRESSOF)
|
||||
reg = XEXP (XEXP (reg, 0), 0);
|
||||
|
||||
/* Now we should have a value that resides in one or more pseudo regs. */
|
||||
|
||||
if (GET_CODE (reg) == REG)
|
||||
put_reg_into_stack (function, reg, TREE_TYPE (decl),
|
||||
promoted_mode, decl_mode, TREE_SIDE_EFFECTS (decl));
|
||||
{
|
||||
/* If this variable lives in the current function and we don't need
|
||||
to put things in the stack for the sake of setjmp, try to keep it
|
||||
in a register until we know we actually need the address. */
|
||||
if (can_use_addressof)
|
||||
gen_mem_addressof (reg, decl);
|
||||
else
|
||||
put_reg_into_stack (function, reg, TREE_TYPE (decl),
|
||||
promoted_mode, decl_mode,
|
||||
TREE_SIDE_EFFECTS (decl), 0);
|
||||
}
|
||||
else if (GET_CODE (reg) == CONCAT)
|
||||
{
|
||||
/* A CONCAT contains two pseudos; put them both in the stack.
|
||||
|
@ -1360,14 +1388,14 @@ put_var_into_stack (decl)
|
|||
#ifdef FRAME_GROWS_DOWNWARD
|
||||
/* Since part 0 should have a lower address, do it second. */
|
||||
put_reg_into_stack (function, XEXP (reg, 1), part_type, part_mode,
|
||||
part_mode, TREE_SIDE_EFFECTS (decl));
|
||||
part_mode, TREE_SIDE_EFFECTS (decl), 0);
|
||||
put_reg_into_stack (function, XEXP (reg, 0), part_type, part_mode,
|
||||
part_mode, TREE_SIDE_EFFECTS (decl));
|
||||
part_mode, TREE_SIDE_EFFECTS (decl), 0);
|
||||
#else
|
||||
put_reg_into_stack (function, XEXP (reg, 0), part_type, part_mode,
|
||||
part_mode, TREE_SIDE_EFFECTS (decl));
|
||||
part_mode, TREE_SIDE_EFFECTS (decl), 0);
|
||||
put_reg_into_stack (function, XEXP (reg, 1), part_type, part_mode,
|
||||
part_mode, TREE_SIDE_EFFECTS (decl));
|
||||
part_mode, TREE_SIDE_EFFECTS (decl), 0);
|
||||
#endif
|
||||
|
||||
/* Change the CONCAT into a combined MEM for both parts. */
|
||||
|
@ -1399,27 +1427,33 @@ put_var_into_stack (decl)
|
|||
VOLATILE_P is nonzero if this is for a "volatile" decl. */
|
||||
|
||||
static void
|
||||
put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p)
|
||||
put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
|
||||
original_regno)
|
||||
struct function *function;
|
||||
rtx reg;
|
||||
tree type;
|
||||
enum machine_mode promoted_mode, decl_mode;
|
||||
int volatile_p;
|
||||
int original_regno;
|
||||
{
|
||||
rtx new = 0;
|
||||
int regno = original_regno;
|
||||
|
||||
if (regno == 0)
|
||||
regno = REGNO (reg);
|
||||
|
||||
if (function)
|
||||
{
|
||||
if (REGNO (reg) < function->max_parm_reg)
|
||||
new = function->parm_reg_stack_loc[REGNO (reg)];
|
||||
if (regno < function->max_parm_reg)
|
||||
new = function->parm_reg_stack_loc[regno];
|
||||
if (new == 0)
|
||||
new = assign_outer_stack_local (decl_mode, GET_MODE_SIZE (decl_mode),
|
||||
0, function);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (REGNO (reg) < max_parm_reg)
|
||||
new = parm_reg_stack_loc[REGNO (reg)];
|
||||
if (regno < max_parm_reg)
|
||||
new = parm_reg_stack_loc[regno];
|
||||
if (new == 0)
|
||||
new = assign_stack_local (decl_mode, GET_MODE_SIZE (decl_mode), 0);
|
||||
}
|
||||
|
@ -1591,22 +1625,21 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
|
|||
struct fixup_replacement *replacements = 0;
|
||||
rtx next_insn = NEXT_INSN (insn);
|
||||
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
/* If the insn that copies the results of a CALL_INSN
|
||||
into a pseudo now references VAR, we have to use an
|
||||
intermediate pseudo since we want the life of the
|
||||
return value register to be only a single insn.
|
||||
|
||||
If we don't use an intermediate pseudo, such things as
|
||||
address computations to make the address of VAR valid
|
||||
if it is not can be placed between the CALL_INSN and INSN.
|
||||
|
||||
To make sure this doesn't happen, we record the destination
|
||||
of the CALL_INSN and see if the next insn uses both that
|
||||
and VAR. */
|
||||
|
||||
if (SMALL_REGISTER_CLASSES)
|
||||
{
|
||||
/* If the insn that copies the results of a CALL_INSN
|
||||
into a pseudo now references VAR, we have to use an
|
||||
intermediate pseudo since we want the life of the
|
||||
return value register to be only a single insn.
|
||||
|
||||
If we don't use an intermediate pseudo, such things as
|
||||
address computations to make the address of VAR valid
|
||||
if it is not can be placed between the CALL_INSN and INSN.
|
||||
|
||||
To make sure this doesn't happen, we record the destination
|
||||
of the CALL_INSN and see if the next insn uses both that
|
||||
and VAR. */
|
||||
|
||||
if (call_dest != 0 && GET_CODE (insn) == INSN
|
||||
&& reg_mentioned_p (var, PATTERN (insn))
|
||||
&& reg_mentioned_p (call_dest, PATTERN (insn)))
|
||||
|
@ -1629,7 +1662,6 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
|
|||
else
|
||||
call_dest = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* See if we have to do anything to INSN now that VAR is in
|
||||
memory. If it needs to be loaded into a pseudo, use a single
|
||||
|
@ -1732,6 +1764,16 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
|
|||
|
||||
switch (code)
|
||||
{
|
||||
case ADDRESSOF:
|
||||
if (XEXP (x, 0) == var)
|
||||
{
|
||||
start_sequence ();
|
||||
*loc = force_operand (XEXP (var, 0), NULL_RTX);
|
||||
emit_insn_before (gen_sequence (), insn);
|
||||
end_sequence ();
|
||||
}
|
||||
return;
|
||||
|
||||
case MEM:
|
||||
if (var == x)
|
||||
{
|
||||
|
@ -2206,6 +2248,9 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
|
|||
SET_DEST (x) = temp;
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Nothing special about this RTX; fix its operands. */
|
||||
|
@ -2331,6 +2376,11 @@ fixup_stack_1 (x, insn)
|
|||
&& GET_CODE (XEXP (ad, 0)) == REG
|
||||
&& ((REGNO (XEXP (ad, 0)) >= FIRST_VIRTUAL_REGISTER
|
||||
&& REGNO (XEXP (ad, 0)) <= LAST_VIRTUAL_REGISTER)
|
||||
|| REGNO (XEXP (ad, 0)) == FRAME_POINTER_REGNUM
|
||||
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||
|| REGNO (XEXP (ad, 0)) == HARD_FRAME_POINTER_REGNUM
|
||||
#endif
|
||||
|| REGNO (XEXP (ad, 0)) == STACK_POINTER_REGNUM
|
||||
|| XEXP (ad, 0) == current_function_internal_arg_pointer)
|
||||
&& GET_CODE (XEXP (ad, 1)) == CONST_INT)
|
||||
{
|
||||
|
@ -2571,6 +2621,158 @@ static int out_arg_offset;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* Build up a (MEM (ADDRESSOF (REG))) rtx for a register REG that just had
|
||||
its address taken. DECL is the decl for the object stored in the
|
||||
register, for later use if we do need to force REG into the stack.
|
||||
REG is overwritten by the MEM like in put_reg_into_stack. */
|
||||
|
||||
rtx
|
||||
gen_mem_addressof (reg, decl)
|
||||
rtx reg;
|
||||
tree decl;
|
||||
{
|
||||
tree type = TREE_TYPE (decl);
|
||||
|
||||
rtx r = gen_rtx (ADDRESSOF, Pmode, gen_reg_rtx (GET_MODE (reg)));
|
||||
ADDRESSOF_REGNO (r) = REGNO (reg);
|
||||
SET_ADDRESSOF_DECL (r, decl);
|
||||
|
||||
XEXP (reg, 0) = r;
|
||||
PUT_CODE (reg, MEM);
|
||||
PUT_MODE (reg, DECL_MODE (decl));
|
||||
MEM_VOLATILE_P (reg) = TREE_SIDE_EFFECTS (decl);
|
||||
MEM_IN_STRUCT_P (reg) = AGGREGATE_TYPE_P (type);
|
||||
|
||||
fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type));
|
||||
return reg;
|
||||
}
|
||||
|
||||
/* If DECL has an RTL that is an ADDRESSOF rtx, put it into the stack. */
|
||||
|
||||
void
|
||||
flush_addressof (decl)
|
||||
tree decl;
|
||||
{
|
||||
if ((TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL)
|
||||
&& DECL_RTL (decl) != 0
|
||||
&& GET_CODE (DECL_RTL (decl)) == MEM
|
||||
&& GET_CODE (XEXP (DECL_RTL (decl), 0)) == ADDRESSOF
|
||||
&& GET_CODE (XEXP (XEXP (DECL_RTL (decl), 0), 0)) == REG)
|
||||
put_addressof_into_stack (XEXP (DECL_RTL (decl), 0));
|
||||
}
|
||||
|
||||
/* Force the register pointed to by R, an ADDRESSOF rtx, into the stack. */
|
||||
|
||||
static void
|
||||
put_addressof_into_stack (r)
|
||||
rtx r;
|
||||
{
|
||||
tree decl = ADDRESSOF_DECL (r);
|
||||
rtx reg = XEXP (r, 0);
|
||||
|
||||
if (GET_CODE (reg) != REG)
|
||||
abort ();
|
||||
|
||||
put_reg_into_stack (0, reg, TREE_TYPE (decl), GET_MODE (reg),
|
||||
DECL_MODE (decl), TREE_SIDE_EFFECTS (decl),
|
||||
ADDRESSOF_REGNO (r));
|
||||
}
|
||||
|
||||
/* Helper function for purge_addressof. See if the rtx expression at *LOC
|
||||
in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into
|
||||
the stack. */
|
||||
|
||||
static void
|
||||
purge_addressof_1 (loc, insn, force)
|
||||
rtx *loc;
|
||||
rtx insn;
|
||||
int force;
|
||||
{
|
||||
rtx x;
|
||||
RTX_CODE code;
|
||||
int i, j;
|
||||
char *fmt;
|
||||
|
||||
/* Re-start here to avoid recursion in common cases. */
|
||||
restart:
|
||||
|
||||
x = *loc;
|
||||
if (x == 0)
|
||||
return;
|
||||
|
||||
code = GET_CODE (x);
|
||||
|
||||
if (code == ADDRESSOF && GET_CODE (XEXP (x, 0)) == MEM)
|
||||
{
|
||||
rtx insns;
|
||||
|
||||
if (validate_change (insn, loc, XEXP (XEXP (x, 0), 0), 0))
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
if (! validate_change (insn, loc,
|
||||
force_operand (XEXP (XEXP (x, 0), 0), NULL_RTX),
|
||||
0))
|
||||
abort ();
|
||||
|
||||
insns = get_insns ();
|
||||
end_sequence ();
|
||||
emit_insns_before (insns, insn);
|
||||
return;
|
||||
}
|
||||
else if (code == MEM && GET_CODE (XEXP (x, 0)) == ADDRESSOF && ! force)
|
||||
{
|
||||
rtx sub = XEXP (XEXP (x, 0), 0);
|
||||
if (GET_CODE (sub) == REG && GET_MODE (x) != GET_MODE (sub))
|
||||
{
|
||||
if (! BYTES_BIG_ENDIAN && ! WORDS_BIG_ENDIAN)
|
||||
{
|
||||
rtx sub2 = gen_rtx (SUBREG, GET_MODE (x), sub, 0);
|
||||
if (validate_change (insn, loc, sub2, 0))
|
||||
goto restart;
|
||||
}
|
||||
}
|
||||
else if (validate_change (insn, loc, sub, 0))
|
||||
goto restart;
|
||||
/* else give up and put it into the stack */
|
||||
}
|
||||
else if (code == ADDRESSOF)
|
||||
{
|
||||
put_addressof_into_stack (x);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Scan all subexpressions. */
|
||||
fmt = GET_RTX_FORMAT (code);
|
||||
for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
|
||||
{
|
||||
if (*fmt == 'e')
|
||||
purge_addressof_1 (&XEXP (x, i), insn, force);
|
||||
else if (*fmt == 'E')
|
||||
for (j = 0; j < XVECLEN (x, i); j++)
|
||||
purge_addressof_1 (&XVECEXP (x, i, j), insn, force);
|
||||
}
|
||||
}
|
||||
|
||||
/* Eliminate all occurrences of ADDRESSOF from INSNS. Elide any remaining
|
||||
(MEM (ADDRESSOF)) patterns, and force any needed registers into the
|
||||
stack. */
|
||||
|
||||
void
|
||||
purge_addressof (insns)
|
||||
rtx insns;
|
||||
{
|
||||
rtx insn;
|
||||
for (insn = insns; insn; insn = NEXT_INSN (insn))
|
||||
if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
|
||||
|| GET_CODE (insn) == CALL_INSN)
|
||||
{
|
||||
purge_addressof_1 (&PATTERN (insn), insn,
|
||||
asm_noperands (PATTERN (insn)) > 0);
|
||||
purge_addressof_1 (®_NOTES (insn), NULL_RTX, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Pass through the INSNS of function FNDECL and convert virtual register
|
||||
references to hard register references. */
|
||||
|
||||
|
@ -2580,6 +2782,7 @@ instantiate_virtual_regs (fndecl, insns)
|
|||
rtx insns;
|
||||
{
|
||||
rtx insn;
|
||||
int i;
|
||||
|
||||
/* Compute the offsets to use for this function. */
|
||||
in_arg_offset = FIRST_PARM_OFFSET (fndecl);
|
||||
|
@ -2606,6 +2809,12 @@ instantiate_virtual_regs (fndecl, insns)
|
|||
instantiate_virtual_regs_1 (®_NOTES (insn), NULL_RTX, 0);
|
||||
}
|
||||
|
||||
/* Instantiate the stack slots for the parm registers, for later use in
|
||||
addressof elimination. */
|
||||
for (i = 0; i < max_parm_reg; ++i)
|
||||
if (parm_reg_stack_loc[i])
|
||||
instantiate_virtual_regs_1 (&parm_reg_stack_loc[i], NULL_RTX, 0);
|
||||
|
||||
/* Now instantiate the remaining register equivalences for debugging info.
|
||||
These will not be valid addresses. */
|
||||
instantiate_decls (fndecl, 0);
|
||||
|
@ -2703,6 +2912,7 @@ instantiate_decl (x, size, valid_only)
|
|||
|
||||
addr = XEXP (x, 0);
|
||||
if (CONSTANT_P (addr)
|
||||
|| GET_CODE (addr) == ADDRESSOF
|
||||
|| (GET_CODE (addr) == REG
|
||||
&& (REGNO (addr) < FIRST_VIRTUAL_REGISTER
|
||||
|| REGNO (addr) > LAST_VIRTUAL_REGISTER)))
|
||||
|
@ -2832,7 +3042,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
|
|||
emit_insns_before (seq, object);
|
||||
SET_DEST (x) = new;
|
||||
|
||||
if (!validate_change (object, &SET_SRC (x), temp, 0)
|
||||
if (! validate_change (object, &SET_SRC (x), temp, 0)
|
||||
|| ! extra_insns)
|
||||
abort ();
|
||||
|
||||
|
@ -3110,6 +3320,23 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
|
|||
}
|
||||
|
||||
return 1;
|
||||
|
||||
case ADDRESSOF:
|
||||
if (GET_CODE (XEXP (x, 0)) == REG)
|
||||
return 1;
|
||||
|
||||
else if (GET_CODE (XEXP (x, 0)) == MEM)
|
||||
{
|
||||
/* If we have a (addressof (mem ..)), do any instantiation inside
|
||||
since we know we'll be making the inside valid when we finally
|
||||
remove the ADDRESSOF. */
|
||||
instantiate_virtual_regs_1 (&XEXP (XEXP (x, 0), 0), NULL_RTX, 0);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Scan all subexpressions. */
|
||||
|
@ -3336,7 +3563,6 @@ assign_parms (fndecl, second_time)
|
|||
/* This is a dummy PARM_DECL that we used for the function result if
|
||||
the function returns a structure. */
|
||||
tree function_result_decl = 0;
|
||||
int nparmregs = list_length (fnargs) + LAST_VIRTUAL_REGISTER + 1;
|
||||
int varargs_setup = 0;
|
||||
rtx conversion_insns = 0;
|
||||
|
||||
|
@ -3394,8 +3620,9 @@ assign_parms (fndecl, second_time)
|
|||
fnargs = function_result_decl;
|
||||
}
|
||||
|
||||
parm_reg_stack_loc = (rtx *) oballoc (nparmregs * sizeof (rtx));
|
||||
bzero ((char *) parm_reg_stack_loc, nparmregs * sizeof (rtx));
|
||||
max_parm_reg = LAST_VIRTUAL_REGISTER + 1;
|
||||
parm_reg_stack_loc = (rtx *) savealloc (max_parm_reg * sizeof (rtx));
|
||||
bzero ((char *) parm_reg_stack_loc, max_parm_reg * sizeof (rtx));
|
||||
|
||||
#ifdef INIT_CUMULATIVE_INCOMING_ARGS
|
||||
INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, NULL_RTX);
|
||||
|
@ -3924,6 +4151,7 @@ assign_parms (fndecl, second_time)
|
|||
copy = assign_stack_temp (TYPE_MODE (type),
|
||||
int_size_in_bytes (type), 1);
|
||||
MEM_IN_STRUCT_P (copy) = AGGREGATE_TYPE_P (type);
|
||||
RTX_UNCHANGING_P (copy) = TREE_READONLY (parm);
|
||||
|
||||
store_expr (parm, copy, 0);
|
||||
emit_move_insn (parmreg, XEXP (copy, 0));
|
||||
|
@ -3950,17 +4178,20 @@ assign_parms (fndecl, second_time)
|
|||
else
|
||||
regno = REGNO (parmreg);
|
||||
|
||||
if (regno >= nparmregs)
|
||||
if (regno >= max_parm_reg)
|
||||
{
|
||||
rtx *new;
|
||||
int old_nparmregs = nparmregs;
|
||||
int old_max_parm_reg = max_parm_reg;
|
||||
|
||||
nparmregs = regno + 5;
|
||||
new = (rtx *) oballoc (nparmregs * sizeof (rtx));
|
||||
/* It's slow to expand this one register at a time,
|
||||
but it's also rare and we need max_parm_reg to be
|
||||
precisely correct. */
|
||||
max_parm_reg = regno + 1;
|
||||
new = (rtx *) savealloc (max_parm_reg * sizeof (rtx));
|
||||
bcopy ((char *) parm_reg_stack_loc, (char *) new,
|
||||
old_nparmregs * sizeof (rtx));
|
||||
bzero ((char *) (new + old_nparmregs),
|
||||
(nparmregs - old_nparmregs) * sizeof (rtx));
|
||||
old_max_parm_reg * sizeof (rtx));
|
||||
bzero ((char *) (new + old_max_parm_reg),
|
||||
(max_parm_reg - old_max_parm_reg) * sizeof (rtx));
|
||||
parm_reg_stack_loc = new;
|
||||
}
|
||||
|
||||
|
@ -4127,7 +4358,6 @@ assign_parms (fndecl, second_time)
|
|||
now that all parameters have been copied out of hard registers. */
|
||||
emit_insns (conversion_insns);
|
||||
|
||||
max_parm_reg = max_reg_num ();
|
||||
last_parm_insn = get_last_insn ();
|
||||
|
||||
current_function_args_size = stack_args_size.constant;
|
||||
|
@ -4486,7 +4716,9 @@ setjmp_protect (block)
|
|||
if ((TREE_CODE (decl) == VAR_DECL
|
||||
|| TREE_CODE (decl) == PARM_DECL)
|
||||
&& DECL_RTL (decl) != 0
|
||||
&& GET_CODE (DECL_RTL (decl)) == REG
|
||||
&& (GET_CODE (DECL_RTL (decl)) == REG
|
||||
|| (GET_CODE (DECL_RTL (decl)) == MEM
|
||||
&& GET_CODE (XEXP (DECL_RTL (decl), 0)) == ADDRESSOF))
|
||||
/* If this variable came from an inline function, it must be
|
||||
that it's life doesn't overlap the setjmp. If there was a
|
||||
setjmp in the function, it would already be in memory. We
|
||||
|
@ -4517,7 +4749,9 @@ setjmp_protect_args ()
|
|||
if ((TREE_CODE (decl) == VAR_DECL
|
||||
|| TREE_CODE (decl) == PARM_DECL)
|
||||
&& DECL_RTL (decl) != 0
|
||||
&& GET_CODE (DECL_RTL (decl)) == REG
|
||||
&& (GET_CODE (DECL_RTL (decl)) == REG
|
||||
|| (GET_CODE (DECL_RTL (decl)) == MEM
|
||||
&& GET_CODE (XEXP (DECL_RTL (decl), 0)) == ADDRESSOF))
|
||||
&& (
|
||||
/* If longjmp doesn't restore the registers,
|
||||
don't put anything in them. */
|
||||
|
@ -4583,6 +4817,9 @@ fix_lexical_addr (addr, var)
|
|||
if (fp == 0)
|
||||
abort ();
|
||||
|
||||
if (GET_CODE (addr) == ADDRESSOF && GET_CODE (XEXP (addr, 0)) == MEM)
|
||||
addr = XEXP (XEXP (addr, 0), 0);
|
||||
|
||||
/* Decode given address as base reg plus displacement. */
|
||||
if (GET_CODE (addr) == REG)
|
||||
basereg = addr, displacement = 0;
|
||||
|
@ -5247,12 +5484,10 @@ expand_function_start (subr, parms_have_cleanups)
|
|||
{
|
||||
last_ptr = assign_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0);
|
||||
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
/* Delay copying static chain if it is not a register to avoid
|
||||
conflicts with regs used for parameters. */
|
||||
if (! SMALL_REGISTER_CLASSES
|
||||
|| GET_CODE (static_chain_incoming_rtx) == REG)
|
||||
#endif
|
||||
emit_move_insn (last_ptr, static_chain_incoming_rtx);
|
||||
}
|
||||
|
||||
|
@ -5361,14 +5596,12 @@ expand_function_start (subr, parms_have_cleanups)
|
|||
|
||||
assign_parms (subr, 0);
|
||||
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
/* Copy the static chain now if it wasn't a register. The delay is to
|
||||
avoid conflicts with the parameter passing registers. */
|
||||
|
||||
if (SMALL_REGISTER_CLASSES && current_function_needs_context)
|
||||
if (GET_CODE (static_chain_incoming_rtx) != REG)
|
||||
emit_move_insn (last_ptr, static_chain_incoming_rtx);
|
||||
#endif
|
||||
|
||||
/* The following was moved from init_function_start.
|
||||
The move is supposed to make sdb output more accurate. */
|
||||
|
@ -5403,15 +5636,12 @@ expand_function_start (subr, parms_have_cleanups)
|
|||
generated above. */
|
||||
if (tem && ! obey_regdecls)
|
||||
{
|
||||
#ifdef SMALL_REGISTER_CLASSES
|
||||
/* If the static chain originally came in a register, put it back
|
||||
there, then move it out in the next insn. The reason for
|
||||
this peculiar code is to satisfy function integration. */
|
||||
if (SMALL_REGISTER_CLASSES
|
||||
&& GET_CODE (static_chain_incoming_rtx) == REG)
|
||||
emit_move_insn (static_chain_incoming_rtx, last_ptr);
|
||||
#endif
|
||||
|
||||
last_ptr = copy_to_reg (static_chain_incoming_rtx);
|
||||
}
|
||||
|
||||
|
|
215
gcc/gcc.c
215
gcc/gcc.c
|
@ -31,6 +31,8 @@ CC recognizes how to compile each input file by suffixes in the file names.
|
|||
Once it knows which kind of compilation to perform, the procedure for
|
||||
compilation is specified by a string called a "spec". */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
|
@ -41,7 +43,6 @@ compilation is specified by a string called a "spec". */
|
|||
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "obstack.h"
|
||||
#include "gansidecl.h"
|
||||
|
||||
|
@ -62,6 +63,7 @@ compilation is specified by a string called a "spec". */
|
|||
extern int pexecute PROTO ((const char *, char * const *, const char *,
|
||||
const char *, char **, char **, int));
|
||||
extern int pwait PROTO ((int, int *, int));
|
||||
extern char *update_path PROTO((char *, char *));
|
||||
/* Flag arguments to pexecute. */
|
||||
#define PEXECUTE_FIRST 1
|
||||
#define PEXECUTE_LAST 2
|
||||
|
@ -234,7 +236,8 @@ static struct compiler *lookup_compiler PROTO((char *, int, char *));
|
|||
static char *build_search_list PROTO((struct path_prefix *, char *, int));
|
||||
static void putenv_from_prefixes PROTO((struct path_prefix *, char *));
|
||||
static char *find_a_file PROTO((struct path_prefix *, char *, int));
|
||||
static void add_prefix PROTO((struct path_prefix *, char *, int, int, int *));
|
||||
static void add_prefix PROTO((struct path_prefix *, char *, char *,
|
||||
int, int, int *));
|
||||
static char *skip_whitespace PROTO((char *));
|
||||
static void record_temp_file PROTO((char *, int, int));
|
||||
static void delete_if_ordinary PROTO((char *));
|
||||
|
@ -577,13 +580,14 @@ static int n_compilers;
|
|||
static struct compiler default_compilers[] =
|
||||
{
|
||||
/* Add lists of suffixes of known languages here. If those languages
|
||||
were no present when we built the driver, we will hit these copies
|
||||
and given a more meaningful error than "file not used since
|
||||
were not present when we built the driver, we will hit these copies
|
||||
and be given a more meaningful error than "file not used since
|
||||
linking is not done". */
|
||||
{".cc", "#C++"}, {".cxx", "#C++"}, {".cpp", "#C++"}, {".c++", "#C++"},
|
||||
{".C", "#C++"}, {".ads", "#Ada"}, {".adb", "#Ada"}, {".ada", "#Ada"},
|
||||
{".f", "#Fortran"}, {".for", "#Fortran"}, {".F", "#Fortran"},
|
||||
{".fpp", "#Fortran"},
|
||||
{".p", "#Pascal"}, {".pas", "#Pascal"},
|
||||
/* Next come the entries for C. */
|
||||
{".c", "@c"},
|
||||
{"@c",
|
||||
|
@ -1157,7 +1161,8 @@ set_spec (name, spec)
|
|||
if (!specs)
|
||||
{
|
||||
struct spec_list *next = (struct spec_list *)0;
|
||||
for (i = (sizeof (static_specs) / sizeof (static_specs[0])) - 1; i >= 0; i--)
|
||||
for (i = (sizeof (static_specs) / sizeof (static_specs[0])) - 1;
|
||||
i >= 0; i--)
|
||||
{
|
||||
sl = &static_specs[i];
|
||||
sl->next = next;
|
||||
|
@ -1347,9 +1352,8 @@ store_arg (arg, delete_always, delete_failure)
|
|||
int delete_always, delete_failure;
|
||||
{
|
||||
if (argbuf_index + 1 == argbuf_length)
|
||||
{
|
||||
argbuf = (char **) xrealloc (argbuf, (argbuf_length *= 2) * sizeof (char *));
|
||||
}
|
||||
argbuf
|
||||
= (char **) xrealloc (argbuf, (argbuf_length *= 2) * sizeof (char *));
|
||||
|
||||
argbuf[argbuf_index++] = arg;
|
||||
argbuf[argbuf_index] = 0;
|
||||
|
@ -1417,17 +1421,20 @@ read_specs (filename, main_p)
|
|||
if (*p == '%' && !main_p)
|
||||
{
|
||||
p1 = p;
|
||||
while (*p && *p != '\n') p++;
|
||||
p++; /* skip \n */
|
||||
while (*p && *p != '\n')
|
||||
p++;
|
||||
|
||||
p++; /* Skip '\n' */
|
||||
|
||||
if (!strncmp (p1, "%include", sizeof ("%include")-1)
|
||||
&& (p1[ sizeof ("%include")-1 ] == ' '
|
||||
|| p1[ sizeof ("%include")-1 ] == '\t'))
|
||||
&& (p1[sizeof "%include" - 1] == ' '
|
||||
|| p1[sizeof "%include" - 1] == '\t'))
|
||||
{
|
||||
char *new_filename;
|
||||
|
||||
p1 += sizeof ("%include");
|
||||
while (*p1 == ' ' || *p1 == '\t') p1++;
|
||||
while (*p1 == ' ' || *p1 == '\t')
|
||||
p1++;
|
||||
|
||||
if (*p1++ != '<' || p[-2] != '>')
|
||||
fatal ("specs %%include syntax malformed after %d characters",
|
||||
|
@ -1438,13 +1445,13 @@ read_specs (filename, main_p)
|
|||
read_specs (new_filename ? new_filename : p1, FALSE);
|
||||
continue;
|
||||
}
|
||||
else if (!strncmp (p1, "%include_noerr", sizeof ("%include_noerr")-1)
|
||||
&& (p1[ sizeof ("%include_noerr")-1 ] == ' '
|
||||
|| p1[ sizeof ("%include_noerr")-1 ] == '\t'))
|
||||
else if (!strncmp (p1, "%include_noerr", sizeof "%include_noerr" - 1)
|
||||
&& (p1[sizeof "%include_noerr" - 1] == ' '
|
||||
|| p1[sizeof "%include_noerr" - 1] == '\t'))
|
||||
{
|
||||
char *new_filename;
|
||||
|
||||
p1 += sizeof ("%include_noerr");
|
||||
p1 += sizeof "%include_noerr";
|
||||
while (*p1 == ' ' || *p1 == '\t') p1++;
|
||||
|
||||
if (*p1++ != '<' || p[-2] != '>')
|
||||
|
@ -1459,36 +1466,44 @@ read_specs (filename, main_p)
|
|||
fprintf (stderr, "Could not find specs file %s\n", p1);
|
||||
continue;
|
||||
}
|
||||
else if (!strncmp (p1, "%rename", sizeof ("%rename")-1)
|
||||
&& (p1[ sizeof ("%rename")-1 ] == ' '
|
||||
|| p1[ sizeof ("%rename")-1 ] == '\t'))
|
||||
else if (!strncmp (p1, "%rename", sizeof "%rename" - 1)
|
||||
&& (p1[sizeof "%rename" - 1] == ' '
|
||||
|| p1[sizeof "%rename" - 1] == '\t'))
|
||||
{
|
||||
int name_len;
|
||||
struct spec_list *sl;
|
||||
|
||||
/* Get original name */
|
||||
p1 += sizeof ("%rename");
|
||||
while (*p1 == ' ' || *p1 == '\t') p1++;
|
||||
if (!isalpha (*p1))
|
||||
p1 += sizeof "%rename";
|
||||
while (*p1 == ' ' || *p1 == '\t')
|
||||
p1++;
|
||||
|
||||
if (! isalpha (*p1))
|
||||
fatal ("specs %%rename syntax malformed after %d characters",
|
||||
p1 - buffer);
|
||||
|
||||
p2 = p1;
|
||||
while (*p2 && !isspace (*p2)) p2++;
|
||||
while (*p2 && !isspace (*p2))
|
||||
p2++;
|
||||
|
||||
if (*p2 != ' ' && *p2 != '\t')
|
||||
fatal ("specs %%rename syntax malformed after %d characters",
|
||||
p2 - buffer);
|
||||
|
||||
name_len = p2 - p1;
|
||||
*p2++ = '\0';
|
||||
while (*p2 == ' ' || *p2 == '\t') p2++;
|
||||
if (!isalpha (*p2))
|
||||
while (*p2 == ' ' || *p2 == '\t')
|
||||
p2++;
|
||||
|
||||
if (! isalpha (*p2))
|
||||
fatal ("specs %%rename syntax malformed after %d characters",
|
||||
p2 - buffer);
|
||||
|
||||
/* Get new spec name */
|
||||
p3 = p2;
|
||||
while (*p3 && !isspace (*p3)) p3++;
|
||||
while (*p3 && !isspace (*p3))
|
||||
p3++;
|
||||
|
||||
if (p3 != p-1)
|
||||
fatal ("specs %%rename syntax malformed after %d characters",
|
||||
p3 - buffer);
|
||||
|
@ -1501,7 +1516,7 @@ read_specs (filename, main_p)
|
|||
if (!sl)
|
||||
fatal ("specs %s spec was not found to be renamed", p1);
|
||||
|
||||
if (!strcmp (p1, p2))
|
||||
if (strcmp (p1, p2) == 0)
|
||||
continue;
|
||||
|
||||
if (verbose_flag)
|
||||
|
@ -1527,22 +1542,30 @@ read_specs (filename, main_p)
|
|||
|
||||
/* Find the colon that should end the suffix. */
|
||||
p1 = p;
|
||||
while (*p1 && *p1 != ':' && *p1 != '\n') p1++;
|
||||
while (*p1 && *p1 != ':' && *p1 != '\n')
|
||||
p1++;
|
||||
|
||||
/* The colon shouldn't be missing. */
|
||||
if (*p1 != ':')
|
||||
fatal ("specs file malformed after %d characters", p1 - buffer);
|
||||
|
||||
/* Skip back over trailing whitespace. */
|
||||
p2 = p1;
|
||||
while (p2 > buffer && (p2[-1] == ' ' || p2[-1] == '\t')) p2--;
|
||||
while (p2 > buffer && (p2[-1] == ' ' || p2[-1] == '\t'))
|
||||
p2--;
|
||||
|
||||
/* Copy the suffix to a string. */
|
||||
suffix = save_string (p, p2 - p);
|
||||
/* Find the next line. */
|
||||
p = skip_whitespace (p1 + 1);
|
||||
if (p[1] == 0)
|
||||
fatal ("specs file malformed after %d characters", p - buffer);
|
||||
|
||||
p1 = p;
|
||||
/* Find next blank line. */
|
||||
while (*p1 && !(*p1 == '\n' && p1[1] == '\n')) p1++;
|
||||
while (*p1 && !(*p1 == '\n' && p1[1] == '\n'))
|
||||
p1++;
|
||||
|
||||
/* Specs end at the blank line and do not include the newline. */
|
||||
spec = save_string (p, p1 - p);
|
||||
p = p1;
|
||||
|
@ -1555,9 +1578,9 @@ read_specs (filename, main_p)
|
|||
if (in[0] == '\\' && in[1] == '\n')
|
||||
in += 2;
|
||||
else if (in[0] == '#')
|
||||
{
|
||||
while (*in && *in != '\n') in++;
|
||||
}
|
||||
while (*in && *in != '\n')
|
||||
in++;
|
||||
|
||||
else
|
||||
*out++ = *in++;
|
||||
}
|
||||
|
@ -1575,7 +1598,9 @@ read_specs (filename, main_p)
|
|||
/* Add this pair to the vector. */
|
||||
compilers
|
||||
= ((struct compiler *)
|
||||
xrealloc (compilers, (n_compilers + 2) * sizeof (struct compiler)));
|
||||
xrealloc (compilers,
|
||||
(n_compilers + 2) * sizeof (struct compiler)));
|
||||
|
||||
compilers[n_compilers].suffix = suffix;
|
||||
bzero ((char *) compilers[n_compilers].spec,
|
||||
sizeof compilers[n_compilers].spec);
|
||||
|
@ -1648,10 +1673,12 @@ record_temp_file (filename, always_delete, fail_delete)
|
|||
for (temp = always_delete_queue; temp; temp = temp->next)
|
||||
if (! strcmp (name, temp->name))
|
||||
goto already1;
|
||||
|
||||
temp = (struct temp_file *) xmalloc (sizeof (struct temp_file));
|
||||
temp->next = always_delete_queue;
|
||||
temp->name = name;
|
||||
always_delete_queue = temp;
|
||||
|
||||
already1:;
|
||||
}
|
||||
|
||||
|
@ -1661,10 +1688,12 @@ record_temp_file (filename, always_delete, fail_delete)
|
|||
for (temp = failure_delete_queue; temp; temp = temp->next)
|
||||
if (! strcmp (name, temp->name))
|
||||
goto already2;
|
||||
|
||||
temp = (struct temp_file *) xmalloc (sizeof (struct temp_file));
|
||||
temp->next = failure_delete_queue;
|
||||
temp->name = name;
|
||||
failure_delete_queue = temp;
|
||||
|
||||
already2:;
|
||||
}
|
||||
}
|
||||
|
@ -1683,7 +1712,9 @@ delete_if_ordinary (name)
|
|||
fflush (stdout);
|
||||
i = getchar ();
|
||||
if (i != '\n')
|
||||
while ((c = getchar ()) != '\n' && c != EOF) ;
|
||||
while ((c = getchar ()) != '\n' && c != EOF)
|
||||
;
|
||||
|
||||
if (i == 'y' || i == 'Y')
|
||||
#endif /* DEBUG */
|
||||
if (stat (name, &st) >= 0 && S_ISREG (st.st_mode))
|
||||
|
@ -1799,7 +1830,7 @@ build_search_list (paths, prefix, check_dir_p)
|
|||
int len = strlen (pprefix->prefix);
|
||||
|
||||
if (machine_suffix
|
||||
&& (!check_dir_p
|
||||
&& (! check_dir_p
|
||||
|| is_directory (pprefix->prefix, machine_suffix, 0)))
|
||||
{
|
||||
if (!first_time)
|
||||
|
@ -1812,10 +1843,10 @@ build_search_list (paths, prefix, check_dir_p)
|
|||
|
||||
if (just_machine_suffix
|
||||
&& pprefix->require_machine_suffix == 2
|
||||
&& (!check_dir_p
|
||||
&& (! check_dir_p
|
||||
|| is_directory (pprefix->prefix, just_machine_suffix, 0)))
|
||||
{
|
||||
if (!first_time)
|
||||
if (! first_time)
|
||||
obstack_1grow (&collect_obstack, PATH_SEPARATOR);
|
||||
|
||||
first_time = FALSE;
|
||||
|
@ -1824,15 +1855,16 @@ build_search_list (paths, prefix, check_dir_p)
|
|||
just_suffix_len);
|
||||
}
|
||||
|
||||
if (!pprefix->require_machine_suffix)
|
||||
if (! pprefix->require_machine_suffix)
|
||||
{
|
||||
if (!first_time)
|
||||
if (! first_time)
|
||||
obstack_1grow (&collect_obstack, PATH_SEPARATOR);
|
||||
|
||||
first_time = FALSE;
|
||||
obstack_grow (&collect_obstack, pprefix->prefix, len);
|
||||
}
|
||||
}
|
||||
|
||||
obstack_1grow (&collect_obstack, '\0');
|
||||
return obstack_finish (&collect_obstack);
|
||||
}
|
||||
|
@ -1870,7 +1902,10 @@ find_a_file (pprefix, name, mode)
|
|||
|
||||
/* Determine the filename to execute (special case for absolute paths). */
|
||||
|
||||
if (*name == '/' || *name == DIR_SEPARATOR)
|
||||
if (*name == '/' || *name == DIR_SEPARATOR
|
||||
/* Check for disk name on MS-DOS-based systems. */
|
||||
|| (DIR_SEPARATOR == '\\' && name[1] == ':'
|
||||
&& (name[2] == DIR_SEPARATOR || name[2] == '/')))
|
||||
{
|
||||
if (access (name, mode))
|
||||
{
|
||||
|
@ -1944,7 +1979,7 @@ find_a_file (pprefix, name, mode)
|
|||
|
||||
/* Certain prefixes can't be used without the machine suffix
|
||||
when the machine or version is explicitly specified. */
|
||||
if (!pl->require_machine_suffix)
|
||||
if (! pl->require_machine_suffix)
|
||||
{
|
||||
/* Some systems have a suffix for executable files.
|
||||
So try appending that first. */
|
||||
|
@ -1983,14 +2018,17 @@ find_a_file (pprefix, name, mode)
|
|||
through this prefix. WARN should point to an int
|
||||
which will be set to 1 if this entry is used.
|
||||
|
||||
COMPONENT is the value to be passed to update_path.
|
||||
|
||||
REQUIRE_MACHINE_SUFFIX is 1 if this prefix can't be used without
|
||||
the complete value of machine_suffix.
|
||||
2 means try both machine_suffix and just_machine_suffix. */
|
||||
|
||||
static void
|
||||
add_prefix (pprefix, prefix, first, require_machine_suffix, warn)
|
||||
add_prefix (pprefix, prefix, component, first, require_machine_suffix, warn)
|
||||
struct path_prefix *pprefix;
|
||||
char *prefix;
|
||||
char *component;
|
||||
int first;
|
||||
int require_machine_suffix;
|
||||
int *warn;
|
||||
|
@ -1998,7 +2036,7 @@ add_prefix (pprefix, prefix, first, require_machine_suffix, warn)
|
|||
struct prefix_list *pl, **prev;
|
||||
int len;
|
||||
|
||||
if (!first && pprefix->plist)
|
||||
if (! first && pprefix->plist)
|
||||
{
|
||||
for (pl = pprefix->plist; pl->next; pl = pl->next)
|
||||
;
|
||||
|
@ -2009,6 +2047,7 @@ add_prefix (pprefix, prefix, first, require_machine_suffix, warn)
|
|||
|
||||
/* Keep track of the longest prefix */
|
||||
|
||||
prefix = update_path (prefix, component);
|
||||
len = strlen (prefix);
|
||||
if (len > pprefix->max_len)
|
||||
pprefix->max_len = len;
|
||||
|
@ -2048,6 +2087,7 @@ unused_prefix_warnings (pprefix)
|
|||
/* Prevent duplicate warnings. */
|
||||
*pl->used_flag_ptr = 1;
|
||||
}
|
||||
|
||||
pl = pl->next;
|
||||
}
|
||||
}
|
||||
|
@ -2068,6 +2108,7 @@ free_path_prefix (pprefix)
|
|||
free (temp->prefix);
|
||||
free ((char *) temp);
|
||||
}
|
||||
|
||||
pprefix->plist = (struct prefix_list *) 0;
|
||||
}
|
||||
|
||||
|
@ -2114,7 +2155,7 @@ execute ()
|
|||
for (n_commands = 1, i = 0; i < argbuf_index; i++)
|
||||
if (strcmp (argbuf[i], "|") == 0)
|
||||
{ /* each command. */
|
||||
#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__)) || defined (OS2)
|
||||
#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__)) || defined (OS2) || defined (VMS)
|
||||
fatal ("-pipe not supported");
|
||||
#endif
|
||||
argbuf[i] = 0; /* termination of command args. */
|
||||
|
@ -2151,7 +2192,9 @@ execute ()
|
|||
fflush (stderr);
|
||||
i = getchar ();
|
||||
if (i != '\n')
|
||||
while (getchar () != '\n') ;
|
||||
while (getchar () != '\n')
|
||||
;
|
||||
|
||||
if (i != 'y' && i != 'Y')
|
||||
return 0;
|
||||
#endif /* DEBUG */
|
||||
|
@ -2359,8 +2402,8 @@ process_command (argc, argv)
|
|||
|
||||
if (gcc_exec_prefix)
|
||||
{
|
||||
add_prefix (&exec_prefixes, gcc_exec_prefix, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, gcc_exec_prefix, 0, 0, NULL_PTR);
|
||||
add_prefix (&exec_prefixes, gcc_exec_prefix, "GCC", 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", 0, 0, NULL_PTR);
|
||||
}
|
||||
|
||||
/* COMPILER_PATH and LIBRARY_PATH have values
|
||||
|
@ -2387,10 +2430,10 @@ process_command (argc, argv)
|
|||
}
|
||||
else
|
||||
nstore[endp-startp] = 0;
|
||||
add_prefix (&exec_prefixes, nstore, 0, 0, NULL_PTR);
|
||||
add_prefix (&exec_prefixes, nstore, 0, 0, 0, NULL_PTR);
|
||||
add_prefix (&include_prefixes,
|
||||
concat (nstore, "include", NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
0, 0, 0, NULL_PTR);
|
||||
if (*endp == 0)
|
||||
break;
|
||||
endp = startp = endp + 1;
|
||||
|
@ -2421,7 +2464,8 @@ process_command (argc, argv)
|
|||
}
|
||||
else
|
||||
nstore[endp-startp] = 0;
|
||||
add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, nstore, NULL_PTR,
|
||||
0, 0, NULL_PTR);
|
||||
if (*endp == 0)
|
||||
break;
|
||||
endp = startp = endp + 1;
|
||||
|
@ -2453,7 +2497,8 @@ process_command (argc, argv)
|
|||
}
|
||||
else
|
||||
nstore[endp-startp] = 0;
|
||||
add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, nstore, NULL_PTR,
|
||||
0, 0, NULL_PTR);
|
||||
if (*endp == 0)
|
||||
break;
|
||||
endp = startp = endp + 1;
|
||||
|
@ -2651,10 +2696,12 @@ process_command (argc, argv)
|
|||
value = argv[++i];
|
||||
else
|
||||
value = p + 1;
|
||||
add_prefix (&exec_prefixes, value, 1, 0, &warn_B);
|
||||
add_prefix (&startfile_prefixes, value, 1, 0, &warn_B);
|
||||
add_prefix (&include_prefixes, concat (value, "include", NULL_PTR),
|
||||
1, 0, NULL_PTR);
|
||||
add_prefix (&exec_prefixes, value, NULL_PTR, 1, 0, &warn_B);
|
||||
add_prefix (&startfile_prefixes, value, NULL_PTR,
|
||||
1, 0, &warn_B);
|
||||
add_prefix (&include_prefixes, concat (value, "include",
|
||||
NULL_PTR),
|
||||
NULL_PTR, 1, 0, NULL_PTR);
|
||||
|
||||
/* As a kludge, if the arg is "[foo/]stageN/", just add
|
||||
"[foo/]include" to the include prefix. */
|
||||
|
@ -2670,14 +2717,14 @@ process_command (argc, argv)
|
|||
|| value[len - 1] == DIR_SEPARATOR))
|
||||
{
|
||||
if (len == 7)
|
||||
add_prefix (&include_prefixes, "include",
|
||||
add_prefix (&include_prefixes, "include", NULL_PTR,
|
||||
1, 0, NULL_PTR);
|
||||
else
|
||||
{
|
||||
char *string = xmalloc (len + 1);
|
||||
strncpy (string, value, len-7);
|
||||
strcpy (string+len-7, "include");
|
||||
add_prefix (&include_prefixes, string,
|
||||
add_prefix (&include_prefixes, string, NULL_PTR,
|
||||
1, 0, NULL_PTR);
|
||||
}
|
||||
}
|
||||
|
@ -2752,12 +2799,16 @@ process_command (argc, argv)
|
|||
/* Use 2 as fourth arg meaning try just the machine as a suffix,
|
||||
as well as trying the machine and the version. */
|
||||
#ifndef OS2
|
||||
add_prefix (&exec_prefixes, standard_exec_prefix, 0, 2, warn_std_ptr);
|
||||
add_prefix (&exec_prefixes, standard_exec_prefix_1, 0, 2, warn_std_ptr);
|
||||
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
|
||||
0, 2, warn_std_ptr);
|
||||
add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
|
||||
0, 2, warn_std_ptr);
|
||||
#endif
|
||||
|
||||
add_prefix (&startfile_prefixes, standard_exec_prefix, 0, 1, warn_std_ptr);
|
||||
add_prefix (&startfile_prefixes, standard_exec_prefix_1, 0, 1, warn_std_ptr);
|
||||
add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
|
||||
0, 1, warn_std_ptr);
|
||||
add_prefix (&startfile_prefixes, standard_exec_prefix_1, "BINUTILS",
|
||||
0, 1, warn_std_ptr);
|
||||
|
||||
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
|
||||
dir_separator_str, NULL_PTR);
|
||||
|
@ -2780,11 +2831,11 @@ process_command (argc, argv)
|
|||
add_prefix (&exec_prefixes,
|
||||
concat (gcc_exec_tooldir_prefix, "bin",
|
||||
dir_separator_str, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
NULL_PTR, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (gcc_exec_tooldir_prefix, "lib",
|
||||
dir_separator_str, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
NULL_PTR, 0, 0, NULL_PTR);
|
||||
}
|
||||
|
||||
tooldir_prefix = concat (standard_exec_prefix, spec_machine,
|
||||
|
@ -2794,10 +2845,10 @@ process_command (argc, argv)
|
|||
|
||||
add_prefix (&exec_prefixes,
|
||||
concat (tooldir_prefix, "bin", dir_separator_str, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
"BINUTILS", 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (tooldir_prefix, "lib", dir_separator_str, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
"BINUTILS", 0, 0, NULL_PTR);
|
||||
|
||||
/* More prefixes are enabled in main, after we read the specs file
|
||||
and determine whether this is cross-compilation or not. */
|
||||
|
@ -4465,16 +4516,18 @@ main (argc, argv)
|
|||
if (*cross_compile == '0')
|
||||
{
|
||||
#ifdef MD_EXEC_PREFIX
|
||||
add_prefix (&exec_prefixes, md_exec_prefix, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, md_exec_prefix, 0, 0, NULL_PTR);
|
||||
add_prefix (&exec_prefixes, md_exec_prefix, "GCC", 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, md_exec_prefix, "GCC", 0, 0, NULL_PTR);
|
||||
#endif
|
||||
|
||||
#ifdef MD_STARTFILE_PREFIX
|
||||
add_prefix (&startfile_prefixes, md_startfile_prefix, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, md_startfile_prefix, "GCC",
|
||||
0, 0, NULL_PTR);
|
||||
#endif
|
||||
|
||||
#ifdef MD_STARTFILE_PREFIX_1
|
||||
add_prefix (&startfile_prefixes, md_startfile_prefix_1, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, md_startfile_prefix_1, "GCC",
|
||||
0, 0, NULL_PTR);
|
||||
#endif
|
||||
|
||||
/* If standard_startfile_prefix is relative, base it on
|
||||
|
@ -4483,28 +4536,28 @@ main (argc, argv)
|
|||
standard_startfile_prefix on that as well. */
|
||||
if (*standard_startfile_prefix == '/'
|
||||
|| *standard_startfile_prefix == DIR_SEPARATOR)
|
||||
add_prefix (&startfile_prefixes, standard_startfile_prefix, 0, 0,
|
||||
NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, standard_startfile_prefix, "BINUTILS",
|
||||
0, 0, NULL_PTR);
|
||||
else
|
||||
{
|
||||
if (gcc_exec_prefix)
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (gcc_exec_prefix, machine_suffix,
|
||||
standard_startfile_prefix, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
NULL_PTR, 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (standard_exec_prefix,
|
||||
machine_suffix,
|
||||
standard_startfile_prefix, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
NULL_PTR, 0, 0, NULL_PTR);
|
||||
}
|
||||
|
||||
add_prefix (&startfile_prefixes, standard_startfile_prefix_1, 0, 0,
|
||||
NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, standard_startfile_prefix_2, 0, 0,
|
||||
NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
|
||||
"BINUTILS", 0, 0, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, standard_startfile_prefix_2,
|
||||
"BINUTILS", 0, 0, NULL_PTR);
|
||||
#if 0 /* Can cause surprises, and one can use -B./ instead. */
|
||||
add_prefix (&startfile_prefixes, "./", 0, 1, NULL_PTR);
|
||||
add_prefix (&startfile_prefixes, "./", NULL_PTR, 0, 1, NULL_PTR);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -4513,7 +4566,7 @@ main (argc, argv)
|
|||
add_prefix (&startfile_prefixes,
|
||||
concat (gcc_exec_prefix, machine_suffix,
|
||||
standard_startfile_prefix, NULL_PTR),
|
||||
0, 0, NULL_PTR);
|
||||
"BINUTILS", 0, 0, NULL_PTR);
|
||||
}
|
||||
|
||||
/* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue