gcc/gcc/config/i370
Zack Weinberg b548dffbda aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
libiberty:
	* aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
	* configure.in: Replace all alloca logic with a simple use of
	the above new macro.
	* config.table: Kill *-*-beos* entry.
	* config/mh-beos: Delete.
	* configure, config.in: Regenerate.

	* Makefile.in (ALLOCA, HFILES): Kill.
	(REQUIRED_OFILES): Add alloca.o.
	(alloca.o): Depend on libiberty.h.
	(argv.o): Don't depend on alloca-conf.h.
	* alloca-conf.h: Delete.
	* alloca.c: Include libiberty.h.  Kill all #ifdef emacs
	blocks.  Provide the C alloca unconditionally.  Use PTR where
	appropriate.  Make i00afunc static.
	* argv.c: Don't include alloca-conf.h.

include:
	* libiberty.h: Prototype C_alloca; define alloca to either
	__builtin_alloca or C_alloca as appropriate.

gcc:
	* aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE
	AC_FUNC_ALLOCA.
	* configure, config.in: Regenerate.
	* config.gcc: Remove references to deleted files.

	* genattr.c, genattrtab.c, genextract.c, genoutput.c,
	genrecog.c, rtl.c: Do not use alloca anywhere.

	* Makefile.in, build-make, system.h, config/x-interix,
	config/x-svr4, config/xm-interix.h, config/xm-openbsd.h,
	config/alpha/xm-alpha.h, config/alpha/xm-vms.h,
	config/arc/xm-arc.h, config/arm/xm-arm.h,
	config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
	config/h8300/xm-h8300.h, config/i370/x-oe,
	config/i370/xm-linux.h, config/i386/x-aix, config/i386/x-beos,
	config/i386/x-ncr3000, config/i386/x-sco5,
	config/i386/xm-dgux.h, config/i860/x-sysv4,
	config/i960/xm-i960.h, config/m32r/xm-m32r.h,
	config/m68k/x-crds, config/m68k/x-dpx2, config/m68k/x-hp320,
	config/m68k/x-hp320g, config/m69k/x-mot3300,
	config/m68k/x-mot3300-gas, config/m68k/xm-amix.h,
	config/m68k/xm-hp320.h, config/m68k/xm-m68kv.h,
	config/m68k/xm-mot3300.h, config/m88k/x-dolph,
	config/m88k/x-sysv4, config/m88k/x-tekXD88,
	config/m88k/xm-m88k.h, config/mcore/xm-mcore.h,
	config/mips/x-iris, config/mips/x-iris3,
	config/mips/x-sni-svr4, config/mips/x-sysv,
	config/mips/xm-iris6.h, config/mips/xm-mips.h,
	config/mips/xm-nws3250v4.h, config/pa/x-hpux,
	config/pa/x-pa-mpeix, config/pa/xm-pa.h,
	config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h,
	config/pa/xm-papro.h, config/romp/xm-romp.h,
	config/rs6000/x-aix31, config/rs6000/x-aix41,
	config/rs6000/x-beos, config/rs6000/x-lynx,
	config/rs6000/x-mach, config/rs6000/x-rs6000,
	config/rs6000/x-sysv4, config/rs6000/xm-rs6000.h,
	config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
	config/sparc/x-sysv4, config/sparc/xm-linux.h,
	config/sparc/xm-pbd.h, config/sparc/xm-sparc.h,
	config/vax/xm-vms.h: Eradicate all references to alloca and
	related stuff.

	* config/xm-alloca.h, config/clipper/x-clix,
	config/i386/xm-sysv4.h, config/i860/x-fx2800,
	config/i860/x-sysv3, config/m88k/x-sysv3,
	config/sparc/xm-sol2.h, config/we32k/x-we32k: Delete
	(contained only alloca related hacks).

	* config/i386/xm-beos.h, config/rs6000/xm-beos.h: Just define
	USE_C_ALLOCA.

From-SVN: r40259
2001-03-06 09:52:35 +00:00
..
README Linas Vepstas <linas@linas.org> 1999-09-07 23:23:46 -07:00
i370-protos.h c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if REGISTER_TARGET_PRAGMAS is defined. 2000-09-07 22:24:34 +00:00
i370.c safe-ctype.h: New file. 2000-12-08 03:00:26 +00:00
i370.h Change callers in config/[h-l]*/ to match: 2000-09-25 13:03:20 +00:00
i370.md * i370.md: Fix spelling typo. 2000-10-17 20:06:38 -06:00
linux.h config: 2000-11-02 23:29:13 +00:00
mvs.h config: 2000-11-02 23:29:13 +00:00
oe.h config: 2000-11-02 23:29:13 +00:00
t-i370 Initial revision 1996-03-18 19:33:11 -05:00
t-linux Bulk patch from Linas. 1999-07-19 12:26:30 -07:00
t-mvs Bulk patch from Linas. 1999-07-19 12:26:30 -07:00
t-oe Bulk patch from Linas. 1999-07-19 12:26:30 -07:00
x-oe aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New. 2001-03-06 09:52:35 +00:00
xm-i370.h configure.in: Kill tm.h. 2001-03-03 03:32:55 +00:00
xm-linux.h aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New. 2001-03-06 09:52:35 +00:00
xm-mvs.h configure.in: Kill tm.h. 2001-03-03 03:32:55 +00:00
xm-oe.h configure.in: Kill tm.h. 2001-03-03 03:32:55 +00:00

README

This directory contains code for building a compiler for the
32-bit ESA/390 architecture.  It supports three different styles 
of assembly:

-- MVS for use with the HLASM assembler
-- Open Edition (USS Unix System Services) 
-- ELF/Linux for use with the binutils/gas GNU assembler.


Cross-compiling Hints
---------------------
When building a cross-compiler on AIX, set the environment variable CC
and be sure to set the -ma and -qcpluscmt flags; i.e.

   export CC="cc -ma -qcpluscmt"

do this *before* running configure, e.g.

   configure --target=i370-ibm-linux --prefix=/where/to/install/usr

The Objective-C and FORTRAN front ends don't build.  To avoid looking at
errors, do only 

   make LANGUAGES=c


OpenEdition Hints
-----------------
The shell script "install" is handy for users of OpenEdition.


The ELF ABI
-----------
This compiler, in conjunction with the gas/binutils assembler, defines
a defacto ELF-based ABI for the ESA/390 architecture.  Be warned: this 
ABI has several major faults.  It should be fixed.  As it is fixed,
it is subject to change without warning.  You should not commit to major
software systems without further exploring and fixing these problems.
Here are some of the problems:

-- No support for shared libraries or dynamically loadable objects.
   This is because the compiler currently places address literals in 
   the text section.  Although the GAS assembler supports a syntax for 
   USING that will place address literals in the data section, this forces
   the use of two base registers, one for branches and one for the literal 
   pool. Work is needed to redesign the function prologue, epilogue and the 
   base register reloads to minimize the currently excessive use of reserved 
   registers. 

   I beleive the best solution would be to add a toc or plt, and extending
   the meaning of the USING directive to encompass this.  This would 
   allow the continued use of the human-readable and familiar practice
   of using =A() and =F'' to denote address literals, as opposed to more 
   difficult jump-table notation.

-- the stackframe is almost twice as big as it needs to be.

-- currently, r15 is used to return 32-bit values.  Because this is the
   last register, it prevents 64-bit ints and small structures from being 
   returned in registers, forcing return in memory.  It would be more
   efficient to use r14 to return 32-bit values, and r14+r15 to return
   64-bit values.

-- all arguments are currently passed in memory.  It would be more efficient 
   to pass arguments in registers.




ChangeLog
---------
Oct98-Dec98 -- add ELF back end; work on getting ABI more or less functional.
98.12.05 -- fix numerous MVC bugs
99.02.06 -- multiply insn sometimes not generated when needed.
         -- extendsidi bugs, bad literal values printed
         -- remove broken adddi subdi patterns
99.02.15 -- add clrstrsi pattern
         -- fix -O2 divide bug
99.03.04 -- base & index reg usage bugs
99.03.15 -- fixes for returning long longs and structs (struct value return)
99.03.29 -- fix handling & alignment of shorts
99.03.31 -- clobbered register 14 is not always clobbered
99.04.02 -- operand constraints for cmphi
99.04.07 -- function pointer fixes for call, call_value patterns,
            function pointers derefed once too often.
99.04.14 -- add pattern to print double-wide int
         -- check intval<4096 for misc operands
         -- add clrstrsi pattern
         -- movstrsi fixes
99.04.16 -- use r2 to pass args into r11 in subroutine call.
         -- fixes to movsi; some operand combinations impossible;
            rework constraints
         -- start work on forward jump optimization
         -- char alignment bug
99.04.25 -- add untyped_call pattern so that builtin_apply works
99.04.27 -- fixes to compare logical under mask
99.04.28 -- reg 2 is clobbered by calls
99.04.30 -- fix rare mulsi bug
99.04.30 -- add constraints so that all RS, SI, SS forms insns have valid
            addressing modes
99.04.30 -- major condition code fixes. The old code was just way off 
            w.r.t. which insns set condition code, and the codes that
            were set.  The extent of this damage was unbeleivable.
99.05.01 -- restructuring of operand constraints on many patterns,
            many lead to invalid instructions being genned.
99.05.02 -- float pt fixes
         -- fix movdi issue bugs
99.05.03 -- fix divide insn; was dividing incorrectly
99.05.05 -- fix sign extension problems on andhi
         -- deprecate some constraints
99.05.06 -- add set_attr insn lengths; fix misc litpool sizes
         -- add notes about how unsigned jumps work (i.e. 
            arithmetic vs. logical vs. signed vs unsigned).
99.05.11 -- use insn length to predict forward branch target;
            use relative branchining where possible,
            remove un-needed base register reload.
99.05.15 -- fix movstrsi, clrstrsi, cmpstrsi patterns as per conversation 
            w/ Richard Henderson