To apply this patch: cd gcc-2.7.2.2 patch -p1 < this-file Send comments or bug reports to dje@cygnus.com. Mon Mar 17 10:59:14 1997 * configure (i386-go32): Set xmake_file to x-go32. * config/i386/x-go32: New file. * ginclude/ppc-asm.h: New file. Tue Nov 21 13:24:41 1995 * Makefile.in (objc): Don't build objc-runtime, must be done later. (distclean): rm float.h. * config/float.h-ieee: New file. * config/float.h-i32: New file. * config/float.h-vax: New file. * i386/t-go32 (LIBGCC1, CROSS_LIBGCC1): Define as null. * i386/xm-go32.h: New file. * config.sub: Recognize go32* as an os. * configure: Handle float_format. (i[345]86-*-go32): Define xm_file and tmake_file. (LIBGCC2_FLAGS): Define inhibit_libc if cross compiler. diff -rcp2N /tege/gcc/gcc-2.7.2.2/Makefile.in ./Makefile.in *** /tege/gcc/gcc-2.7.2.2/Makefile.in Sun Nov 26 11:44:25 1995 --- ./Makefile.in Fri Feb 21 16:38:53 1997 *************** native: config.status cpp $(LANGUAGES) $ *** 636,641 **** # Define the names for selecting languages in LANGUAGES. C c: cc1 ! OBJC objc: cc1obj objc-runtime ! OBJECTIVE-C objective-c: cc1obj objc-runtime PROTO: proto --- 636,642 ---- # Define the names for selecting languages in LANGUAGES. C c: cc1 ! # Don't build objc-runtime. For a cross compiler, it must be built later. ! OBJC objc: cc1obj ! OBJECTIVE-C objective-c: cc1obj PROTO: proto *************** distclean: clean bytecode.distclean lang *** 1983,1986 **** --- 1984,1988 ---- -rm -f c-parse.output -rm -f *.asm + -rm -f float.h # Delete anything likely to be found in the source directory diff -rcp2N /tege/gcc/gcc-2.7.2.2/config/float.h-i32 ./config/float.h-i32 *** /tege/gcc/gcc-2.7.2.2/config/float.h-i32 Wed Dec 31 16:00:00 1969 --- ./config/float.h-i32 Fri Feb 21 16:38:53 1997 *************** *** 0 **** --- 1,96 ---- + /* float.h for target with only IEEE 32 bit floating point format */ + #ifndef _FLOAT_H_ + #define _FLOAT_H_ + /* Produced by enquire version 4.3, CWI, Amsterdam */ + + /* Radix of exponent representation */ + #undef FLT_RADIX + #define FLT_RADIX 2 + /* Number of base-FLT_RADIX digits in the significand of a float */ + #undef FLT_MANT_DIG + #define FLT_MANT_DIG 24 + /* Number of decimal digits of precision in a float */ + #undef FLT_DIG + #define FLT_DIG 6 + /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ + #undef FLT_ROUNDS + #define FLT_ROUNDS 1 + /* Difference between 1.0 and the minimum float greater than 1.0 */ + #undef FLT_EPSILON + #define FLT_EPSILON 1.19209290e-07F + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ + #undef FLT_MIN_EXP + #define FLT_MIN_EXP (-125) + /* Minimum normalised float */ + #undef FLT_MIN + #define FLT_MIN 1.17549435e-38F + /* Minimum int x such that 10**x is a normalised float */ + #undef FLT_MIN_10_EXP + #define FLT_MIN_10_EXP (-37) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ + #undef FLT_MAX_EXP + #define FLT_MAX_EXP 128 + /* Maximum float */ + #undef FLT_MAX + #define FLT_MAX 3.40282347e+38F + /* Maximum int x such that 10**x is a representable float */ + #undef FLT_MAX_10_EXP + #define FLT_MAX_10_EXP 38 + + /* Number of base-FLT_RADIX digits in the significand of a double */ + #undef DBL_MANT_DIG + #define DBL_MANT_DIG 24 + /* Number of decimal digits of precision in a double */ + #undef DBL_DIG + #define DBL_DIG 6 + /* Difference between 1.0 and the minimum double greater than 1.0 */ + #undef DBL_EPSILON + #define DBL_EPSILON 1.19209290e-07F + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ + #undef DBL_MIN_EXP + #define DBL_MIN_EXP (-125) + /* Minimum normalised double */ + #undef DBL_MIN + #define DBL_MIN 1.17549435e-38F + /* Minimum int x such that 10**x is a normalised double */ + #undef DBL_MIN_10_EXP + #define DBL_MIN_10_EXP (-37) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ + #undef DBL_MAX_EXP + #define DBL_MAX_EXP 128 + /* Maximum double */ + #undef DBL_MAX + #define DBL_MAX 3.40282347e+38F + /* Maximum int x such that 10**x is a representable double */ + #undef DBL_MAX_10_EXP + #define DBL_MAX_10_EXP 38 + + /* Number of base-FLT_RADIX digits in the significand of a long double */ + #undef LDBL_MANT_DIG + #define LDBL_MANT_DIG 24 + /* Number of decimal digits of precision in a long double */ + #undef LDBL_DIG + #define LDBL_DIG 6 + /* Difference between 1.0 and the minimum long double greater than 1.0 */ + #undef LDBL_EPSILON + #define LDBL_EPSILON 1.19209290e-07F + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ + #undef LDBL_MIN_EXP + #define LDBL_MIN_EXP (-125) + /* Minimum normalised long double */ + #undef LDBL_MIN + #define LDBL_MIN 1.17549435e-38F + /* Minimum int x such that 10**x is a normalised long double */ + #undef LDBL_MIN_10_EXP + #define LDBL_MIN_10_EXP (-37) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ + #undef LDBL_MAX_EXP + #define LDBL_MAX_EXP 128 + /* Maximum long double */ + #undef LDBL_MAX + #define LDBL_MAX 3.40282347e+38F + /* Maximum int x such that 10**x is a representable long double */ + #undef LDBL_MAX_10_EXP + #define LDBL_MAX_10_EXP 38 + + #endif /* _FLOAT_H_ */ diff -rcp2N /tege/gcc/gcc-2.7.2.2/config/float.h-ieee ./config/float.h-ieee *** /tege/gcc/gcc-2.7.2.2/config/float.h-ieee Wed Dec 31 16:00:00 1969 --- ./config/float.h-ieee Fri Feb 21 16:38:54 1997 *************** *** 0 **** --- 1,96 ---- + /* float.h for target with IEEE 32 bit and 64 bit floating point formats */ + #ifndef _FLOAT_H_ + #define _FLOAT_H_ + /* Produced by enquire version 4.3, CWI, Amsterdam */ + + /* Radix of exponent representation */ + #undef FLT_RADIX + #define FLT_RADIX 2 + /* Number of base-FLT_RADIX digits in the significand of a float */ + #undef FLT_MANT_DIG + #define FLT_MANT_DIG 24 + /* Number of decimal digits of precision in a float */ + #undef FLT_DIG + #define FLT_DIG 6 + /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ + #undef FLT_ROUNDS + #define FLT_ROUNDS 1 + /* Difference between 1.0 and the minimum float greater than 1.0 */ + #undef FLT_EPSILON + #define FLT_EPSILON 1.19209290e-07F + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ + #undef FLT_MIN_EXP + #define FLT_MIN_EXP (-125) + /* Minimum normalised float */ + #undef FLT_MIN + #define FLT_MIN 1.17549435e-38F + /* Minimum int x such that 10**x is a normalised float */ + #undef FLT_MIN_10_EXP + #define FLT_MIN_10_EXP (-37) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ + #undef FLT_MAX_EXP + #define FLT_MAX_EXP 128 + /* Maximum float */ + #undef FLT_MAX + #define FLT_MAX 3.40282347e+38F + /* Maximum int x such that 10**x is a representable float */ + #undef FLT_MAX_10_EXP + #define FLT_MAX_10_EXP 38 + + /* Number of base-FLT_RADIX digits in the significand of a double */ + #undef DBL_MANT_DIG + #define DBL_MANT_DIG 53 + /* Number of decimal digits of precision in a double */ + #undef DBL_DIG + #define DBL_DIG 15 + /* Difference between 1.0 and the minimum double greater than 1.0 */ + #undef DBL_EPSILON + #define DBL_EPSILON 2.2204460492503131e-16 + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ + #undef DBL_MIN_EXP + #define DBL_MIN_EXP (-1021) + /* Minimum normalised double */ + #undef DBL_MIN + #define DBL_MIN 2.2250738585072014e-308 + /* Minimum int x such that 10**x is a normalised double */ + #undef DBL_MIN_10_EXP + #define DBL_MIN_10_EXP (-307) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ + #undef DBL_MAX_EXP + #define DBL_MAX_EXP 1024 + /* Maximum double */ + #undef DBL_MAX + #define DBL_MAX 1.7976931348623157e+308 + /* Maximum int x such that 10**x is a representable double */ + #undef DBL_MAX_10_EXP + #define DBL_MAX_10_EXP 308 + + /* Number of base-FLT_RADIX digits in the significand of a long double */ + #undef LDBL_MANT_DIG + #define LDBL_MANT_DIG 53 + /* Number of decimal digits of precision in a long double */ + #undef LDBL_DIG + #define LDBL_DIG 15 + /* Difference between 1.0 and the minimum long double greater than 1.0 */ + #undef LDBL_EPSILON + #define LDBL_EPSILON 2.2204460492503131e-16L + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ + #undef LDBL_MIN_EXP + #define LDBL_MIN_EXP (-1021) + /* Minimum normalised long double */ + #undef LDBL_MIN + #define LDBL_MIN 2.2250738585072014e-308L + /* Minimum int x such that 10**x is a normalised long double */ + #undef LDBL_MIN_10_EXP + #define LDBL_MIN_10_EXP (-307) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ + #undef LDBL_MAX_EXP + #define LDBL_MAX_EXP 1024 + /* Maximum long double */ + #undef LDBL_MAX + #define LDBL_MAX 1.7976931348623157e+308L + /* Maximum int x such that 10**x is a representable long double */ + #undef LDBL_MAX_10_EXP + #define LDBL_MAX_10_EXP 308 + + #endif /* _FLOAT_H_ */ diff -rcp2N /tege/gcc/gcc-2.7.2.2/config/float.h-vax ./config/float.h-vax *** /tege/gcc/gcc-2.7.2.2/config/float.h-vax Wed Dec 31 16:00:00 1969 --- ./config/float.h-vax Fri Feb 21 16:38:54 1997 *************** *** 0 **** --- 1,96 ---- + /* float.h for target with VAX floating point formats */ + #ifndef _FLOAT_H_ + #define _FLOAT_H_ + /* Produced by enquire version 4.3, CWI, Amsterdam */ + + /* Radix of exponent representation */ + #undef FLT_RADIX + #define FLT_RADIX 2 + /* Number of base-FLT_RADIX digits in the significand of a float */ + #undef FLT_MANT_DIG + #define FLT_MANT_DIG 24 + /* Number of decimal digits of precision in a float */ + #undef FLT_DIG + #define FLT_DIG 6 + /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ + #undef FLT_ROUNDS + #define FLT_ROUNDS 1 + /* Difference between 1.0 and the minimum float greater than 1.0 */ + #undef FLT_EPSILON + #define FLT_EPSILON 1.19209290e-07F + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ + #undef FLT_MIN_EXP + #define FLT_MIN_EXP (-127) + /* Minimum normalised float */ + #undef FLT_MIN + #define FLT_MIN 2.93873588e-39F + /* Minimum int x such that 10**x is a normalised float */ + #undef FLT_MIN_10_EXP + #define FLT_MIN_10_EXP (-38) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ + #undef FLT_MAX_EXP + #define FLT_MAX_EXP 127 + /* Maximum float */ + #undef FLT_MAX + #define FLT_MAX 1.70141173e+38F + /* Maximum int x such that 10**x is a representable float */ + #undef FLT_MAX_10_EXP + #define FLT_MAX_10_EXP 38 + + /* Number of base-FLT_RADIX digits in the significand of a double */ + #undef DBL_MANT_DIG + #define DBL_MANT_DIG 56 + /* Number of decimal digits of precision in a double */ + #undef DBL_DIG + #define DBL_DIG 16 + /* Difference between 1.0 and the minimum double greater than 1.0 */ + #undef DBL_EPSILON + #define DBL_EPSILON 2.77555756156289135e-17 + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ + #undef DBL_MIN_EXP + #define DBL_MIN_EXP (-127) + /* Minimum normalised double */ + #undef DBL_MIN + #define DBL_MIN 2.93873587705571877e-39 + /* Minimum int x such that 10**x is a normalised double */ + #undef DBL_MIN_10_EXP + #define DBL_MIN_10_EXP (-38) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ + #undef DBL_MAX_EXP + #define DBL_MAX_EXP 127 + /* Maximum double */ + #undef DBL_MAX + #define DBL_MAX 1.70141183460469229e+38 + /* Maximum int x such that 10**x is a representable double */ + #undef DBL_MAX_10_EXP + #define DBL_MAX_10_EXP 38 + + /* Number of base-FLT_RADIX digits in the significand of a long double */ + #undef LDBL_MANT_DIG + #define LDBL_MANT_DIG 56 + /* Number of decimal digits of precision in a long double */ + #undef LDBL_DIG + #define LDBL_DIG 16 + /* Difference between 1.0 and the minimum long double greater than 1.0 */ + #undef LDBL_EPSILON + #define LDBL_EPSILON 2.77555756156289135e-17 + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ + #undef LDBL_MIN_EXP + #define LDBL_MIN_EXP (-127) + /* Minimum normalised long double */ + #undef LDBL_MIN + #define LDBL_MIN 2.93873587705571877e-39 + /* Minimum int x such that 10**x is a normalised long double */ + #undef LDBL_MIN_10_EXP + #define LDBL_MIN_10_EXP (-38) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ + #undef LDBL_MAX_EXP + #define LDBL_MAX_EXP 127 + /* Maximum long double */ + #undef LDBL_MAX + #define LDBL_MAX 1.70141183460469229e+38 + /* Maximum int x such that 10**x is a representable long double */ + #undef LDBL_MAX_10_EXP + #define LDBL_MAX_10_EXP 38 + + #endif /* _FLOAT_H_ */ diff -rcp2N /tege/gcc/gcc-2.7.2.2/config/i386/t-go32 ./config/i386/t-go32 *** /tege/gcc/gcc-2.7.2.2/config/i386/t-go32 Wed Dec 31 16:00:00 1969 --- ./config/i386/t-go32 Fri Feb 21 16:38:54 1997 *************** *** 0 **** --- 1,2 ---- + LIBGCC1 = libgcc1.null + CROSS_LIBGCC1 = libgcc1.null diff -rcp2N /tege/gcc/gcc-2.7.2.2/config/i386/x-go32 ./config/i386/x-go32 *** /tege/gcc/gcc-2.7.2.2/config/i386/x-go32 Wed Dec 31 16:00:00 1969 --- ./config/i386/x-go32 Sat Mar 15 16:44:28 1997 *************** *** 0 **** --- 1,2 ---- + # FIXME: Protoize doesn't build on go32, so disable it. + LANGUAGES = c objective-c diff -rcp2N /tege/gcc/gcc-2.7.2.2/config/i386/xm-go32.h ./config/i386/xm-go32.h *** /tege/gcc/gcc-2.7.2.2/config/i386/xm-go32.h Wed Dec 31 16:00:00 1969 --- ./config/i386/xm-go32.h Fri Feb 21 16:38:54 1997 *************** *** 0 **** --- 1,27 ---- + /* Configuration for GNU C-compiler for Intel 80386. + Copyright (C) 1988 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define __MSDOS__ 1 + + #define NO_STAB_H + + #include "i386/xm-i386.h" + + /* Use semicolons to separate elements of a path. */ + #define PATH_SEPARATOR ';' diff -rcp2N /tege/gcc/gcc-2.7.2.2/config.sub ./config.sub *** /tege/gcc/gcc-2.7.2.2/config.sub Thu Jun 15 14:01:49 1995 --- ./config.sub Fri Feb 21 16:38:54 1997 *************** case $os in *** 642,646 **** | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ ! | -udi* | -eabi* | -lites* ) # Remember, each alternative MUST END IN *, to match a version number. ;; --- 642,646 ---- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ ! | -udi* | -eabi* | -lites* | -go32* ) # Remember, each alternative MUST END IN *, to match a version number. ;; diff -rcp2N /tege/gcc/gcc-2.7.2.2/configure ./configure *** /tege/gcc/gcc-2.7.2.2/configure Thu Jan 30 14:20:15 1997 --- ./configure Sat Mar 15 16:43:47 1997 *************** for machine in $canon_build $canon_host *** 493,496 **** --- 493,497 ---- extra_objs= extra_gcc_objs= + float_format= # Set this to force installation and use of collect2. use_collect2= *************** for machine in $canon_build $canon_host *** 672,675 **** --- 673,677 ---- h8300-*-*) cpu_type=h8300 + float_format=i32 ;; hppa1.1-*-osf*) *************** for machine in $canon_build $canon_host *** 1025,1031 **** ;; i[3456]86-go32-msdos | i[3456]86-*-go32) ! cpu_type=i386 ! tm_file=i386/go32.h ! ;; i[3456]86-*-lynxos*) cpu_type=i386 --- 1027,1036 ---- ;; i[3456]86-go32-msdos | i[3456]86-*-go32) ! cpu_type=i386 ! xm_file=i386/xm-go32.h ! tm_file=i386/go32.h ! xmake_file=i386/x-go32 ! tmake_file=i386/t-go32 ! ;; i[3456]86-*-lynxos*) cpu_type=i386 *************** for machine in $canon_build $canon_host *** 2348,2355 **** --- 2353,2362 ---- vax-*-bsd*) # vaxen running BSD use_collect2=yes + float_format=vax ;; vax-*-sysv*) # vaxen running system V xm_file=vax/xm-vaxv.h tm_file=vax/vaxv.h + float_format=vax ;; vax-*-netbsd*) *************** for machine in $canon_build $canon_host *** 2360,2371 **** --- 2367,2384 ---- fixincludes=Makefile.in xmake_file=x-netbsd + float_format=vax ;; vax-*-ultrix*) # vaxen running ultrix tm_file=vax/ultrix.h use_collect2=yes + float_format=vax ;; vax-*-vms*) # vaxen running VMS xm_file=vax/xm-vms.h tm_file=vax/vms.h + float_format=vax + ;; + vax-*-*) # vax default entry + float_format=vax ;; pdp11-*-bsd) *************** then tmake_file=$cpu_type/t-$cpu_type *** 2501,2504 **** --- 2514,2521 ---- fi + if [ x$float_format = x ] + then float_format=ieee + fi + # Say what files are being used for the output code and MD file. echo "Using \`$srcdir/config/$out_file' to output insns." *************** MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFA *** 2850,2853 **** --- 2867,2880 ---- fi + # If this is a cross compilation, then define inhibit_libc in + # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of + # libgcc.a, but that's OK because libc should have its own version of + # assert.h. + if [ x$host != x$target ]; then + sed -e 's/^\(LIBGCC2_CFLAGS[ ]*=[ ]*\)/\1-Dinhibit_libc /' Makefile.tem > Makefile.tem2 + rm -f Makefile.tem + mv Makefile.tem2 Makefile.tem + fi + # If this is the top level Makefile, add the language fragments. # Languages are added via two mechanisms. Some information must be *************** MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFA *** 2972,2977 **** # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES' # `out_file', `out_object', `md_file', `lang_specs_files', ! # `lang_options_files', and `INSTALL_HEADERS_DIR' values in the ! # Makefile from the values they have in this script. rm -f Makefile.xx rm -f aux-output.c aux-output.o md --- 2999,3005 ---- # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES' # `out_file', `out_object', `md_file', `lang_specs_files', ! # `lang_options_files', `INSTALL_HEADERS_DIR', `FLOAT_H' and ! # `CROSS_FLOAT_H' values in the Makefile from the values they have in ! # this script. rm -f Makefile.xx rm -f aux-output.c aux-output.o md *************** MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFA *** 2999,3002 **** --- 3027,3032 ---- echo "s|^FIXINCLUDES[ ]*=.*|FIXINCLUDES = $fixincludes|" >> Makefile.sed echo "s|^INSTALL_HEADERS_DIR[ ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" >> Makefile.sed + echo "s|^FLOAT_H[ ]*=.*|FLOAT_H=\$(srcdir)/config/float.h-${float_format}|" >> Makefile.sed + echo "s|^CROSS_FLOAT_H[ ]*=.*|CROSS_FLOAT_H=\$(srcdir)/config/float.h-${float_format}|" >> Makefile.sed sed -f Makefile.sed Makefile.tem > Makefile.xx rm -f Makefile.tem Makefile.sed diff -rcp2N /tege/gcc/gcc-2.7.2.2/ginclude/ppc-asm.h ./ginclude/ppc-asm.h *** /tege/gcc/gcc-2.7.2.2/ginclude/ppc-asm.h Wed Dec 31 16:00:00 1969 --- ./ginclude/ppc-asm.h Sun Mar 16 19:23:55 1997 *************** *** 0 **** --- 1,170 ---- + /* PowerPC asm definitions for GNU C. */ + /* Under winnt, 1) gas suppports the following as names and 2) in particular + defining "toc" breaks the FUNC_START macro as ".toc" becomes ".2" */ + + #if !defined(__WINNT__) + #define r0 0 + #define sp 1 + #define toc 2 + #define r3 3 + #define r4 4 + #define r5 5 + #define r6 6 + #define r7 7 + #define r8 8 + #define r9 9 + #define r10 10 + #define r11 11 + #define r12 12 + #define r13 13 + #define r14 14 + #define r15 15 + #define r16 16 + #define r17 17 + #define r18 18 + #define r19 19 + #define r20 20 + #define r21 21 + #define r22 22 + #define r23 23 + #define r24 24 + #define r25 25 + #define r26 26 + #define r27 27 + #define r28 28 + #define r29 29 + #define r30 30 + #define r31 31 + + #define cr0 0 + #define cr1 1 + #define cr2 2 + #define cr3 3 + #define cr4 4 + #define cr5 5 + #define cr6 6 + #define cr7 7 + + #define f0 0 + #define f1 1 + #define f2 2 + #define f3 3 + #define f4 4 + #define f5 5 + #define f6 6 + #define f7 7 + #define f8 8 + #define f9 9 + #define f10 10 + #define f11 11 + #define f12 12 + #define f13 13 + #define f14 14 + #define f15 15 + #define f16 16 + #define f17 17 + #define f18 18 + #define f19 19 + #define f20 20 + #define f21 21 + #define f22 22 + #define f23 23 + #define f24 24 + #define f25 25 + #define f26 26 + #define f27 27 + #define f28 28 + #define f29 29 + #define f30 30 + #define f31 31 + #endif + + /* + * Macros to glue together two tokens. + */ + + #ifdef __STDC__ + #define XGLUE(a,b) a##b + #else + #define XGLUE(a,b) a/**/b + #endif + + #define GLUE(a,b) XGLUE(a,b) + + /* + * Macros to begin and end a function written in assembler. If -mcall-aixdesc + * or -mcall-nt, create a function descriptor with the given name, and create + * the real function with one or two leading periods respectively. + */ + + #ifdef _RELOCATABLE + #define DESC_SECTION ".got2" + #else + #define DESC_SECTION ".got1" + #endif + + #if defined(_CALL_AIXDESC) + #define FUNC_NAME(name) GLUE(.,name) + #define FUNC_START(name) \ + .section DESC_SECTION,"aw"; \ + name: \ + .long GLUE(.,name); \ + .long _GLOBAL_OFFSET_TABLE_; \ + .long 0; \ + .previous; \ + .type GLUE(.,name),@function; \ + .globl name; \ + .globl GLUE(.,name); \ + GLUE(.,name): + + #define FUNC_END(name) \ + GLUE(.L,name): \ + .size GLUE(.,name),GLUE(.L,name)-GLUE(.,name) + + #elif defined(__WINNT__) + #define FUNC_NAME(name) GLUE(..,name) + #define FUNC_START(name) \ + .pdata; \ + .align 2; \ + .ualong GLUE(..,name),GLUE(name,.e),0,0,GLUE(..,name); \ + .reldata; \ + name: \ + .ualong GLUE(..,name),.toc; \ + .section .text; \ + .globl name; \ + .globl GLUE(..,name); \ + GLUE(..,name): + + #define FUNC_END(name) \ + GLUE(name,.e): ; \ + GLUE(FE_MOT_RESVD..,name): + + #elif defined(_CALL_NT) + #define FUNC_NAME(name) GLUE(..,name) + #define FUNC_START(name) \ + .section DESC_SECTION,"aw"; \ + name: \ + .long GLUE(..,name); \ + .long _GLOBAL_OFFSET_TABLE_; \ + .previous; \ + .type GLUE(..,name),@function; \ + .globl name; \ + .globl GLUE(..,name); \ + GLUE(..,name): + + #define FUNC_END(name) \ + GLUE(.L,name): \ + .size GLUE(..,name),GLUE(.L,name)-GLUE(..,name) + + #else + #define FUNC_NAME(name) name + #define FUNC_START(name) \ + .type name,@function; \ + .globl name; \ + name: + + #define FUNC_END(name) \ + GLUE(.L,name): \ + .size name,GLUE(.L,name)-name + #endif +