1992-01-30 21:58:19 +01:00
|
|
|
|
/* Definitions of target machine for GNU compiler, for Sun SPARC.
|
2000-02-26 22:44:42 +01:00
|
|
|
|
Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999
|
2011-01-14 22:01:18 +01:00
|
|
|
|
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
2009-02-20 16:20:38 +01:00
|
|
|
|
Free Software Foundation, Inc.
|
1992-01-30 21:58:19 +01:00
|
|
|
|
Contributed by Michael Tiemann (tiemann@cygnus.com).
|
2004-01-30 15:46:43 +01:00
|
|
|
|
64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
at Cygnus Support.
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
|
This file is part of GCC.
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
|
GCC is free software; you can redistribute it and/or modify
|
1992-01-30 21:58:19 +01:00
|
|
|
|
it under the terms of the GNU General Public License as published by
|
host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public License...
* config/host-hpux.c: Change copyright header to refer to version 3 of the GNU
General Public License and to point readers at the COPYING3 file and the FSF's
license web page.
* config/alpha/predicates.md, config/alpha/vms-ld.c,
config/alpha/linux.h, config/alpha/alpha.opt,
config/alpha/linux-elf.h, config/alpha/vms.h, config/alpha/elf.h,
config/alpha/vms-unwind.h, config/alpha/ev4.md,
config/alpha/ev6.md, config/alpha/alpha.c, config/alpha/vms-cc.c,
config/alpha/alpha.h, config/alpha/sync.md,
config/alpha/openbsd.h, config/alpha/alpha.md,
config/alpha/alpha-modes.def, config/alpha/ev5.md,
config/alpha/alpha-protos.h, config/alpha/freebsd.h,
config/alpha/osf5.h, config/alpha/netbsd.h, config/alpha/vms64.h,
config/alpha/constraints.md, config/alpha/osf.h,
config/alpha/xm-vms.h, config/alpha/unicosmk.h, config/linux.h,
config/frv/predicates.md, config/frv/frv.h, config/frv/linux.h,
config/frv/frv.md, config/frv/frv.opt, config/frv/frv-modes.def,
config/frv/frv-asm.h, config/frv/frv-protos.h,
config/frv/frv-abi.h, config/frv/frv.c, config/s390/tpf.h,
config/s390/s390.c, config/s390/predicates.md, config/s390/s390.h,
config/s390/linux.h, config/s390/tpf.md, config/s390/tpf.opt,
config/s390/2064.md, config/s390/2084.md, config/s390/s390.md,
config/s390/s390.opt, config/s390/s390-modes.def,
config/s390/fixdfdi.h, config/s390/constraints.md,
config/s390/s390-protos.h, config/s390/s390x.h, config/elfos.h,
config/dbxcoff.h, config/m32c/predicates.md, config/m32c/cond.md,
config/m32c/m32c.c, config/m32c/minmax.md, config/m32c/blkmov.md,
config/m32c/m32c-pragma.c, config/m32c/m32c.h,
config/m32c/prologue.md, config/m32c/m32c.abi,
config/m32c/muldiv.md, config/m32c/bitops.md, config/m32c/mov.md,
config/m32c/addsub.md, config/m32c/m32c.md, config/m32c/m32c.opt,
config/m32c/t-m32c, config/m32c/m32c-modes.def,
config/m32c/jump.md, config/m32c/shift.md,
config/m32c/m32c-protos.h, config/libgloss.h,
config/spu/spu-protos.h, config/spu/predicates.md,
config/spu/spu-builtins.h, config/spu/spu.c,
config/spu/spu-builtins.def, config/spu/spu-builtins.md,
config/spu/spu.h, config/spu/spu-elf.h, config/spu/constraints.md,
config/spu/spu.md, config/spu/spu-c.c, config/spu/spu.opt,
config/spu/spu-modes.def, config/spu/t-spu-elf, config/interix.h,
config/sparc/hypersparc.md, config/sparc/predicates.md,
config/sparc/linux.h, config/sparc/sp64-elf.h,
config/sparc/supersparc.md, config/sparc/cypress.md,
config/sparc/openbsd1-64.h, config/sparc/openbsd64.h,
config/sparc/niagara.md, config/sparc/sparc.md,
config/sparc/long-double-switch.opt, config/sparc/ultra3.md,
config/sparc/sparc.opt, config/sparc/sync.md,
config/sparc/sp-elf.h, config/sparc/sparc-protos.h,
config/sparc/ultra1_2.md, config/sparc/biarch64.h,
config/sparc/sparc.c, config/sparc/little-endian.opt,
config/sparc/sysv4-only.h, config/sparc/sparc.h,
config/sparc/linux64.h, config/sparc/freebsd.h,
config/sparc/sol2.h, config/sparc/rtemself.h,
config/sparc/netbsd-elf.h, config/sparc/vxworks.h,
config/sparc/sparc-modes.def, config/sparc/sparclet.md,
config/sparc/sysv4.h, config/vx-common.h, config/netbsd-aout.h,
config/flat.h, config/m32r/m32r.md, config/m32r/predicates.md,
config/m32r/little.h, config/m32r/m32r.c, config/m32r/m32r.opt,
config/m32r/linux.h, config/m32r/constraints.md,
config/m32r/m32r.h, config/m32r/m32r-protos.h, config/vxworks.opt,
config/darwin-c.c, config/darwin.opt, config/i386/i386.h,
config/i386/cygming.h, config/i386/linux.h, config/i386/cygwin.h,
config/i386/i386.md, config/i386/netware-crt0.c,
config/i386/sco5.h, config/i386/mmx.md, config/i386/vx-common.h,
config/i386/kaos-i386.h, config/i386/winnt-stubs.c,
config/i386/netbsd64.h, config/i386/djgpp.h, config/i386/gas.h,
config/i386/sol2.h, config/i386/constraints.md,
config/i386/netware-libgcc.c, config/i386/sysv5.h,
config/i386/predicates.md, config/i386/geode.md,
config/i386/x86-64.h, config/i386/kfreebsd-gnu.h,
config/i386/freebsd64.h, config/i386/vxworksae.h,
config/i386/pentium.md, config/i386/lynx.h, config/i386/i386elf.h,
config/i386/rtemself.h, config/i386/netbsd-elf.h,
config/i386/ppro.md, config/i386/k6.md, config/i386/netware.c,
config/i386/netware.h, config/i386/i386-modes.def,
config/i386/sysv4-cpp.h, config/i386/i386-interix.h,
config/i386/cygwin1.c, config/i386/djgpp.opt, config/i386/uwin.h,
config/i386/unix.h, config/i386/ptx4-i.h, config/i386/xm-djgpp.h,
config/i386/att.h, config/i386/winnt.c, config/i386/beos-elf.h,
config/i386/sol2-10.h, config/i386/darwin64.h, config/i386/sse.md,
config/i386/i386.opt, config/i386/bsd.h, config/i386/cygming.opt,
config/i386/xm-mingw32.h, config/i386/linux64.h,
config/i386/openbsdelf.h, config/i386/xm-cygwin.h,
config/i386/sco5.opt, config/i386/darwin.h, config/i386/mingw32.h,
config/i386/winnt-cxx.c, config/i386/i386-interix3.h,
config/i386/nwld.c, config/i386/nwld.h, config/i386/host-cygwin.c,
config/i386/cygwin2.c, config/i386/i386-protos.h,
config/i386/sync.md, config/i386/openbsd.h,
config/i386/host-mingw32.c, config/i386/i386-aout.h,
config/i386/nto.h, config/i386/biarch64.h,
config/i386/i386-coff.h, config/i386/freebsd.h,
config/i386/driver-i386.c, config/i386/knetbsd-gnu.h,
config/i386/host-i386-darwin.c, config/i386/vxworks.h,
config/i386/crtdll.h, config/i386/i386.c, config/i386/sysv4.h,
config/darwin-protos.h, config/linux.opt, config/sol2.c,
config/sol2.h, config/sh/symbian.c, config/sh/sh-protos.h,
config/sh/linux.h, config/sh/elf.h, config/sh/superh.h,
config/sh/sh4.md, config/sh/coff.h, config/sh/newlib.h,
config/sh/embed-elf.h, config/sh/symbian-pre.h, config/sh/rtems.h,
config/sh/kaos-sh.h, config/sh/sh4a.md, config/sh/constraints.md,
config/sh/sh64.h, config/sh/sh.opt, config/sh/symbian-post.h,
config/sh/sh-c.c, config/sh/predicates.md, config/sh/sh.c,
config/sh/sh.h, config/sh/shmedia.md, config/sh/sh-modes.def,
config/sh/little.h, config/sh/sh1.md, config/sh/sh4-300.md,
config/sh/superh64.h, config/sh/rtemself.h,
config/sh/netbsd-elf.h, config/sh/sh.md, config/sh/vxworks.h,
config/usegas.h, config/svr3.h, config/pdp11/pdp11-protos.h,
config/pdp11/2bsd.h, config/pdp11/pdp11.md, config/pdp11/pdp11.c,
config/pdp11/pdp11.opt, config/pdp11/pdp11-modes.def,
config/pdp11/pdp11.h, config/avr/rtems.h, config/avr/avr-protos.h,
config/avr/predicates.md, config/avr/constraints.md,
config/avr/avr.md, config/avr/avr.c, config/avr/avr.opt,
config/avr/avr.h, config/sol2-protos.h, config/dbxelf.h,
config/lynx.opt, config/crx/crx.h, config/crx/crx-protos.h,
config/crx/crx.md, config/crx/crx.c, config/crx/crx.opt,
config/c4x/c4x-c.c, config/c4x/c4x.c, config/c4x/c4x.opt,
config/c4x/c4x-modes.def, config/c4x/rtems.h,
config/c4x/predicates.md, config/c4x/c4x.h,
config/c4x/c4x-protos.h, config/c4x/c4x.md, config/kfreebsd-gnu.h,
config/xtensa/predicates.md, config/xtensa/xtensa.c,
config/xtensa/linux.h, config/xtensa/xtensa.h,
config/xtensa/elf.h, config/xtensa/xtensa.md,
config/xtensa/xtensa.opt, config/xtensa/constraints.md,
config/xtensa/xtensa-protos.h, config/dbx.h,
config/stormy16/predicates.md, config/stormy16/stormy16.md,
config/stormy16/stormy16.c, config/stormy16/stormy16.opt,
config/stormy16/stormy16.h, config/stormy16/stormy16-protos.h,
config/host-solaris.c, config/fr30/fr30.h,
config/fr30/predicates.md, config/fr30/fr30-protos.h,
config/fr30/fr30.md, config/fr30/fr30.c, config/fr30/fr30.opt,
config/vxworksae.h, config/sol2-c.c, config/lynx.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/predicates.md,
config/m68hc11/m68hc11.md, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.opt, config/m68hc11/m68hc11.h,
config/m68hc11/m68hc12.h, config/openbsd-oldgas.h,
config/host-linux.c, config/interix3.h, config/cris/cris.c,
config/cris/predicates.md, config/cris/linux.h,
config/cris/cris.h, config/cris/aout.h, config/cris/cris.md,
config/cris/linux.opt, config/cris/cris.opt, config/cris/elf.opt,
config/cris/aout.opt, config/cris/cris-protos.h,
config/vxworks-dummy.h, config/netbsd.h, config/netbsd-elf.h,
config/iq2000/iq2000.h, config/iq2000/predicates.md,
config/iq2000/iq2000-protos.h, config/iq2000/iq2000.md,
config/iq2000/iq2000.c, config/iq2000/iq2000.opt,
config/host-darwin.c, config/mt/mt.md, config/mt/mt.c,
config/mt/mt.opt, config/mt/t-mt, config/mt/mt.h,
config/mt/mt-protos.h, config/svr4.h, config/host-darwin.h,
config/chorus.h, config/mn10300/mn10300.c,
config/mn10300/mn10300.opt, config/mn10300/predicates.md,
config/mn10300/mn10300.h, config/mn10300/linux.h,
config/mn10300/constraints.md, config/mn10300/mn10300-protos.h,
config/mn10300/mn10300.md, config/ia64/predicates.md,
config/ia64/itanium1.md, config/ia64/unwind-ia64.h,
config/ia64/ia64-c.c, config/ia64/sync.md, config/ia64/ia64.c,
config/ia64/itanium2.md, config/ia64/ia64.h, config/ia64/vect.md,
config/ia64/freebsd.h, config/ia64/ia64.md,
config/ia64/ia64-modes.def, config/ia64/constraints.md,
config/ia64/hpux.h, config/ia64/ia64-protos.h, config/windiss.h,
config/gofast.h, config/rtems.h, config/sol2-10.h,
config/m68k/predicates.md, config/m68k/m68k.md,
config/m68k/linux.h, config/m68k/m68k-modes.def,
config/m68k/print-sysroot-suffix.sh, config/m68k/m68k-protos.h,
config/m68k/coff.h, config/m68k/m68k-none.h, config/m68k/ieee.opt,
config/m68k/openbsd.h, config/m68k/m68k-aout.h,
config/m68k/m68k.opt, config/m68k/m68020-elf.h,
config/m68k/m68kelf.h, config/m68k/m68k-devices.def,
config/m68k/uclinux-oldabi.h, config/m68k/m68k.c,
config/m68k/constraints.md, config/m68k/rtemself.h,
config/m68k/netbsd-elf.h, config/m68k/m68k.h,
config/m68k/uclinux.h, config/rs6000/power4.md,
config/rs6000/host-darwin.c, config/rs6000/6xx.md,
config/rs6000/linux.h, config/rs6000/eabi.h,
config/rs6000/aix41.opt, config/rs6000/xcoff.h,
config/rs6000/secureplt.h, config/rs6000/linuxspe.h,
config/rs6000/eabialtivec.h, config/rs6000/8540.md,
config/rs6000/darwin8.h, config/rs6000/kaos-ppc.h,
config/rs6000/windiss.h, config/rs6000/603.md,
config/rs6000/aix41.h, config/rs6000/cell.md,
config/rs6000/mpc.md, config/rs6000/aix43.h, config/rs6000/beos.h,
config/rs6000/gnu.h, config/rs6000/rtems.h, config/rs6000/aix.opt,
config/rs6000/darwin.md, config/rs6000/darwin64.h,
config/rs6000/default64.h, config/rs6000/7xx.md,
config/rs6000/darwin.opt, config/rs6000/spe.md,
config/rs6000/rs6000.opt, config/rs6000/rs6000-c.c,
config/rs6000/rios2.md, config/rs6000/linuxaltivec.h,
config/rs6000/7450.md, config/rs6000/linux64.h,
config/rs6000/constraints.md, config/rs6000/440.md,
config/rs6000/darwin.h, config/rs6000/host-ppc64-darwin.c,
config/rs6000/rs6000.c, config/rs6000/aix52.h,
config/rs6000/rs6000.h, config/rs6000/power6.md,
config/rs6000/predicates.md, config/rs6000/altivec.md,
config/rs6000/aix64.opt, config/rs6000/rios1.md,
config/rs6000/rs6000-modes.def, config/rs6000/rs64.md,
config/rs6000/eabisim.h, config/rs6000/sysv4le.h,
config/rs6000/darwin7.h, config/rs6000/dfp.md,
config/rs6000/linux64.opt, config/rs6000/sync.md,
config/rs6000/vxworksae.h, config/rs6000/power5.md,
config/rs6000/lynx.h, config/rs6000/biarch64.h,
config/rs6000/rs6000.md, config/rs6000/sysv4.opt,
config/rs6000/eabispe.h, config/rs6000/e500.h,
config/rs6000/freebsd.h, config/rs6000/rs6000-protos.h,
config/rs6000/netbsd.h, config/rs6000/e500-double.h,
config/rs6000/aix.h, config/rs6000/vxworks.h,
config/rs6000/40x.md, config/rs6000/aix51.h,
config/rs6000/sysv4.h, config/arc/arc-protos.h, config/arc/arc.md,
config/arc/arc.c, config/arc/arc.opt, config/arc/arc-modes.def,
config/arc/arc.h, config/mcore/mcore-elf.h,
config/mcore/mcore-protos.h, config/mcore/predicates.md,
config/mcore/mcore.md, config/mcore/mcore.c,
config/mcore/mcore.opt, config/mcore/mcore.h,
config/mcore/mcore-pe.h, config/darwin.c, config/freebsd-nthr.h,
config/score/predicates.md, config/score/score-version.h,
config/score/score-protos.h, config/score/misc.md,
config/score/elf.h, config/score/score.c, config/score/mac.md,
config/score/score7.md, config/score/score.h,
config/score/score-conv.h, config/score/score-mdaux.c,
config/score/score.md, config/score/score.opt,
config/score/score-modes.def, config/score/score-mdaux.h,
config/score/mul-div.S, config/arm/uclinux-elf.h,
config/arm/semi.h, config/arm/ecos-elf.h, config/arm/arm1020e.md,
config/arm/symbian.h, config/arm/linux-elf.h,
config/arm/arm1026ejs.md, config/arm/arm1136jfs.md,
config/arm/elf.h, config/arm/aout.h, config/arm/arm.c,
config/arm/thumb2.md, config/arm/vec-common.md, config/arm/coff.h,
config/arm/strongarm-pe.h, config/arm/arm.h,
config/arm/cortex-a8-neon.md, config/arm/semiaof.h,
config/arm/cortex-a8.md, config/arm/uclinux-eabi.h,
config/arm/arm-modes.def, config/arm/linux-eabi.h,
config/arm/rtems-elf.h, config/arm/neon-schedgen.ml,
config/arm/arm-cores.def, config/arm/arm-protos.h,
config/arm/vfp.md, config/arm/aof.h, config/arm/linux-gas.h,
config/arm/wince-pe.h, config/arm/neon.md,
config/arm/constraints.md, config/arm/neon.ml,
config/arm/xscale-elf.h, config/arm/strongarm-coff.h,
config/arm/arm.opt, config/arm/arm926ejs.md,
config/arm/predicates.md, config/arm/iwmmxt.md,
config/arm/arm_neon.h, config/arm/unknown-elf.h,
config/arm/kaos-arm.h, config/arm/bpabi.h, config/arm/pe.opt,
config/arm/neon-testgen.ml, config/arm/arm.md,
config/arm/xscale-coff.h, config/arm/pe.c,
config/arm/arm-generic.md, config/arm/pe.h,
config/arm/kaos-strongarm.h, config/arm/freebsd.h,
config/arm/neon-docgen.ml, config/arm/netbsd.h, config/arm/fpa.md,
config/arm/strongarm-elf.h, config/arm/cirrus.md,
config/arm/netbsd-elf.h, config/arm/vxworks.h,
config/arm/neon-gen.ml, config/kaos.h, config/darwin-driver.c,
config/pa/predicates.md, config/pa/pa64-hpux.h,
config/pa/pa-hpux.opt, config/pa/som.h, config/pa/pa-hpux1010.opt,
config/pa/pa-hpux1111.opt, config/pa/pa-pro-end.h,
config/pa/elf.h, config/pa/fptr.c, config/pa/pa64-linux.h,
config/pa/pa.md, config/pa/pa.opt, config/pa/pa-hpux.h,
config/pa/pa-hpux10.h, config/pa/pa-hpux11.h,
config/pa/pa-hpux1010.h, config/pa/pa-protos.h,
config/pa/pa-osf.h, config/pa/pa-hpux1111.h, config/pa/pa-64.h,
config/pa/milli64.S, config/pa/pa.c, config/pa/pa-linux.h,
config/pa/pa.h, config/pa/pa32-linux.h, config/pa/pa64-hpux.opt,
config/pa/pa64-regs.h, config/pa/pa-modes.def,
config/pa/constraints.md, config/darwin9.h, config/mips/4100.md,
config/mips/linux.h, config/mips/elfoabi.h, config/mips/elf.h,
config/mips/sdb.h, config/mips/windiss.h, config/mips/rtems.h,
config/mips/3000.md, config/mips/iris5.h, config/mips/5000.md,
config/mips/7000.md, config/mips/9000.md, config/mips/4600.md,
config/mips/linux64.h, config/mips/elforion.h,
config/mips/constraints.md, config/mips/generic.md,
config/mips/predicates.md, config/mips/4300.md,
config/mips/mips-ps-3d.md, config/mips/iris.h, config/mips/24k.md,
config/mips/mips.md, config/mips/mips.opt, config/mips/4k.md,
config/mips/5k.md, config/mips/vr4120-div.S,
config/mips/openbsd.h, config/mips/iris6.h, config/mips/4000.md,
config/mips/mips-protos.h, config/mips/6000.md,
config/mips/mips.c, config/mips/mips.h, config/mips/r3900.h,
config/mips/74k.md, config/mips/netbsd.h, config/mips/vxworks.h,
config/mips/mips-modes.def, config/mips/vr.h,
config/soft-fp/t-softfp, config/openbsd.h, config/ptx4.h,
config/freebsd-spec.h, config/vax/vax.c, config/vax/openbsd.h,
config/vax/vax.h, config/vax/elf.h, config/vax/vax.md,
config/vax/bsd.h, config/vax/vax.opt, config/vax/vax-modes.def,
config/vax/openbsd1.h, config/vax/netbsd.h,
config/vax/vax-protos.h, config/vax/netbsd-elf.h,
config/vax/vaxv.h, config/vax/ultrix.h, config/freebsd.h,
config/h8300/rtems.h, config/h8300/predicates.md,
config/h8300/h8300.c, config/h8300/h8300.h, config/h8300/elf.h,
config/h8300/h8300.md, config/h8300/h8300.opt,
config/h8300/coff.h, config/h8300/h8300-protos.h,
config/v850/v850.md, config/v850/predicates.md,
config/v850/v850-c.c, config/v850/v850.c, config/v850/v850.opt,
config/v850/v850.h, config/v850/v850-protos.h, config/vxworks.c,
config/knetbsd-gnu.h, config/sol2-6.h, config/vxworks.h,
config/mmix/mmix.h, config/mmix/predicates.md,
config/mmix/mmix-protos.h, config/mmix/mmix.md,
config/mmix/mmix.c, config/mmix/mmix.opt,
config/mmix/mmix-modes.def, config/bfin/bfin.opt,
config/bfin/rtems.h, config/bfin/bfin-modes.def,
config/bfin/predicates.md, config/bfin/bfin-protos.h,
config/bfin/bfin.c, config/bfin/bfin.h, config/bfin/bfin.md: Likewise.
From-SVN: r127157
2007-08-02 12:49:31 +02:00
|
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
any later version.
|
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
|
GCC is distributed in the hope that it will be useful,
|
1992-01-30 21:58:19 +01:00
|
|
|
|
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
|
host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public License...
* config/host-hpux.c: Change copyright header to refer to version 3 of the GNU
General Public License and to point readers at the COPYING3 file and the FSF's
license web page.
* config/alpha/predicates.md, config/alpha/vms-ld.c,
config/alpha/linux.h, config/alpha/alpha.opt,
config/alpha/linux-elf.h, config/alpha/vms.h, config/alpha/elf.h,
config/alpha/vms-unwind.h, config/alpha/ev4.md,
config/alpha/ev6.md, config/alpha/alpha.c, config/alpha/vms-cc.c,
config/alpha/alpha.h, config/alpha/sync.md,
config/alpha/openbsd.h, config/alpha/alpha.md,
config/alpha/alpha-modes.def, config/alpha/ev5.md,
config/alpha/alpha-protos.h, config/alpha/freebsd.h,
config/alpha/osf5.h, config/alpha/netbsd.h, config/alpha/vms64.h,
config/alpha/constraints.md, config/alpha/osf.h,
config/alpha/xm-vms.h, config/alpha/unicosmk.h, config/linux.h,
config/frv/predicates.md, config/frv/frv.h, config/frv/linux.h,
config/frv/frv.md, config/frv/frv.opt, config/frv/frv-modes.def,
config/frv/frv-asm.h, config/frv/frv-protos.h,
config/frv/frv-abi.h, config/frv/frv.c, config/s390/tpf.h,
config/s390/s390.c, config/s390/predicates.md, config/s390/s390.h,
config/s390/linux.h, config/s390/tpf.md, config/s390/tpf.opt,
config/s390/2064.md, config/s390/2084.md, config/s390/s390.md,
config/s390/s390.opt, config/s390/s390-modes.def,
config/s390/fixdfdi.h, config/s390/constraints.md,
config/s390/s390-protos.h, config/s390/s390x.h, config/elfos.h,
config/dbxcoff.h, config/m32c/predicates.md, config/m32c/cond.md,
config/m32c/m32c.c, config/m32c/minmax.md, config/m32c/blkmov.md,
config/m32c/m32c-pragma.c, config/m32c/m32c.h,
config/m32c/prologue.md, config/m32c/m32c.abi,
config/m32c/muldiv.md, config/m32c/bitops.md, config/m32c/mov.md,
config/m32c/addsub.md, config/m32c/m32c.md, config/m32c/m32c.opt,
config/m32c/t-m32c, config/m32c/m32c-modes.def,
config/m32c/jump.md, config/m32c/shift.md,
config/m32c/m32c-protos.h, config/libgloss.h,
config/spu/spu-protos.h, config/spu/predicates.md,
config/spu/spu-builtins.h, config/spu/spu.c,
config/spu/spu-builtins.def, config/spu/spu-builtins.md,
config/spu/spu.h, config/spu/spu-elf.h, config/spu/constraints.md,
config/spu/spu.md, config/spu/spu-c.c, config/spu/spu.opt,
config/spu/spu-modes.def, config/spu/t-spu-elf, config/interix.h,
config/sparc/hypersparc.md, config/sparc/predicates.md,
config/sparc/linux.h, config/sparc/sp64-elf.h,
config/sparc/supersparc.md, config/sparc/cypress.md,
config/sparc/openbsd1-64.h, config/sparc/openbsd64.h,
config/sparc/niagara.md, config/sparc/sparc.md,
config/sparc/long-double-switch.opt, config/sparc/ultra3.md,
config/sparc/sparc.opt, config/sparc/sync.md,
config/sparc/sp-elf.h, config/sparc/sparc-protos.h,
config/sparc/ultra1_2.md, config/sparc/biarch64.h,
config/sparc/sparc.c, config/sparc/little-endian.opt,
config/sparc/sysv4-only.h, config/sparc/sparc.h,
config/sparc/linux64.h, config/sparc/freebsd.h,
config/sparc/sol2.h, config/sparc/rtemself.h,
config/sparc/netbsd-elf.h, config/sparc/vxworks.h,
config/sparc/sparc-modes.def, config/sparc/sparclet.md,
config/sparc/sysv4.h, config/vx-common.h, config/netbsd-aout.h,
config/flat.h, config/m32r/m32r.md, config/m32r/predicates.md,
config/m32r/little.h, config/m32r/m32r.c, config/m32r/m32r.opt,
config/m32r/linux.h, config/m32r/constraints.md,
config/m32r/m32r.h, config/m32r/m32r-protos.h, config/vxworks.opt,
config/darwin-c.c, config/darwin.opt, config/i386/i386.h,
config/i386/cygming.h, config/i386/linux.h, config/i386/cygwin.h,
config/i386/i386.md, config/i386/netware-crt0.c,
config/i386/sco5.h, config/i386/mmx.md, config/i386/vx-common.h,
config/i386/kaos-i386.h, config/i386/winnt-stubs.c,
config/i386/netbsd64.h, config/i386/djgpp.h, config/i386/gas.h,
config/i386/sol2.h, config/i386/constraints.md,
config/i386/netware-libgcc.c, config/i386/sysv5.h,
config/i386/predicates.md, config/i386/geode.md,
config/i386/x86-64.h, config/i386/kfreebsd-gnu.h,
config/i386/freebsd64.h, config/i386/vxworksae.h,
config/i386/pentium.md, config/i386/lynx.h, config/i386/i386elf.h,
config/i386/rtemself.h, config/i386/netbsd-elf.h,
config/i386/ppro.md, config/i386/k6.md, config/i386/netware.c,
config/i386/netware.h, config/i386/i386-modes.def,
config/i386/sysv4-cpp.h, config/i386/i386-interix.h,
config/i386/cygwin1.c, config/i386/djgpp.opt, config/i386/uwin.h,
config/i386/unix.h, config/i386/ptx4-i.h, config/i386/xm-djgpp.h,
config/i386/att.h, config/i386/winnt.c, config/i386/beos-elf.h,
config/i386/sol2-10.h, config/i386/darwin64.h, config/i386/sse.md,
config/i386/i386.opt, config/i386/bsd.h, config/i386/cygming.opt,
config/i386/xm-mingw32.h, config/i386/linux64.h,
config/i386/openbsdelf.h, config/i386/xm-cygwin.h,
config/i386/sco5.opt, config/i386/darwin.h, config/i386/mingw32.h,
config/i386/winnt-cxx.c, config/i386/i386-interix3.h,
config/i386/nwld.c, config/i386/nwld.h, config/i386/host-cygwin.c,
config/i386/cygwin2.c, config/i386/i386-protos.h,
config/i386/sync.md, config/i386/openbsd.h,
config/i386/host-mingw32.c, config/i386/i386-aout.h,
config/i386/nto.h, config/i386/biarch64.h,
config/i386/i386-coff.h, config/i386/freebsd.h,
config/i386/driver-i386.c, config/i386/knetbsd-gnu.h,
config/i386/host-i386-darwin.c, config/i386/vxworks.h,
config/i386/crtdll.h, config/i386/i386.c, config/i386/sysv4.h,
config/darwin-protos.h, config/linux.opt, config/sol2.c,
config/sol2.h, config/sh/symbian.c, config/sh/sh-protos.h,
config/sh/linux.h, config/sh/elf.h, config/sh/superh.h,
config/sh/sh4.md, config/sh/coff.h, config/sh/newlib.h,
config/sh/embed-elf.h, config/sh/symbian-pre.h, config/sh/rtems.h,
config/sh/kaos-sh.h, config/sh/sh4a.md, config/sh/constraints.md,
config/sh/sh64.h, config/sh/sh.opt, config/sh/symbian-post.h,
config/sh/sh-c.c, config/sh/predicates.md, config/sh/sh.c,
config/sh/sh.h, config/sh/shmedia.md, config/sh/sh-modes.def,
config/sh/little.h, config/sh/sh1.md, config/sh/sh4-300.md,
config/sh/superh64.h, config/sh/rtemself.h,
config/sh/netbsd-elf.h, config/sh/sh.md, config/sh/vxworks.h,
config/usegas.h, config/svr3.h, config/pdp11/pdp11-protos.h,
config/pdp11/2bsd.h, config/pdp11/pdp11.md, config/pdp11/pdp11.c,
config/pdp11/pdp11.opt, config/pdp11/pdp11-modes.def,
config/pdp11/pdp11.h, config/avr/rtems.h, config/avr/avr-protos.h,
config/avr/predicates.md, config/avr/constraints.md,
config/avr/avr.md, config/avr/avr.c, config/avr/avr.opt,
config/avr/avr.h, config/sol2-protos.h, config/dbxelf.h,
config/lynx.opt, config/crx/crx.h, config/crx/crx-protos.h,
config/crx/crx.md, config/crx/crx.c, config/crx/crx.opt,
config/c4x/c4x-c.c, config/c4x/c4x.c, config/c4x/c4x.opt,
config/c4x/c4x-modes.def, config/c4x/rtems.h,
config/c4x/predicates.md, config/c4x/c4x.h,
config/c4x/c4x-protos.h, config/c4x/c4x.md, config/kfreebsd-gnu.h,
config/xtensa/predicates.md, config/xtensa/xtensa.c,
config/xtensa/linux.h, config/xtensa/xtensa.h,
config/xtensa/elf.h, config/xtensa/xtensa.md,
config/xtensa/xtensa.opt, config/xtensa/constraints.md,
config/xtensa/xtensa-protos.h, config/dbx.h,
config/stormy16/predicates.md, config/stormy16/stormy16.md,
config/stormy16/stormy16.c, config/stormy16/stormy16.opt,
config/stormy16/stormy16.h, config/stormy16/stormy16-protos.h,
config/host-solaris.c, config/fr30/fr30.h,
config/fr30/predicates.md, config/fr30/fr30-protos.h,
config/fr30/fr30.md, config/fr30/fr30.c, config/fr30/fr30.opt,
config/vxworksae.h, config/sol2-c.c, config/lynx.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/predicates.md,
config/m68hc11/m68hc11.md, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.opt, config/m68hc11/m68hc11.h,
config/m68hc11/m68hc12.h, config/openbsd-oldgas.h,
config/host-linux.c, config/interix3.h, config/cris/cris.c,
config/cris/predicates.md, config/cris/linux.h,
config/cris/cris.h, config/cris/aout.h, config/cris/cris.md,
config/cris/linux.opt, config/cris/cris.opt, config/cris/elf.opt,
config/cris/aout.opt, config/cris/cris-protos.h,
config/vxworks-dummy.h, config/netbsd.h, config/netbsd-elf.h,
config/iq2000/iq2000.h, config/iq2000/predicates.md,
config/iq2000/iq2000-protos.h, config/iq2000/iq2000.md,
config/iq2000/iq2000.c, config/iq2000/iq2000.opt,
config/host-darwin.c, config/mt/mt.md, config/mt/mt.c,
config/mt/mt.opt, config/mt/t-mt, config/mt/mt.h,
config/mt/mt-protos.h, config/svr4.h, config/host-darwin.h,
config/chorus.h, config/mn10300/mn10300.c,
config/mn10300/mn10300.opt, config/mn10300/predicates.md,
config/mn10300/mn10300.h, config/mn10300/linux.h,
config/mn10300/constraints.md, config/mn10300/mn10300-protos.h,
config/mn10300/mn10300.md, config/ia64/predicates.md,
config/ia64/itanium1.md, config/ia64/unwind-ia64.h,
config/ia64/ia64-c.c, config/ia64/sync.md, config/ia64/ia64.c,
config/ia64/itanium2.md, config/ia64/ia64.h, config/ia64/vect.md,
config/ia64/freebsd.h, config/ia64/ia64.md,
config/ia64/ia64-modes.def, config/ia64/constraints.md,
config/ia64/hpux.h, config/ia64/ia64-protos.h, config/windiss.h,
config/gofast.h, config/rtems.h, config/sol2-10.h,
config/m68k/predicates.md, config/m68k/m68k.md,
config/m68k/linux.h, config/m68k/m68k-modes.def,
config/m68k/print-sysroot-suffix.sh, config/m68k/m68k-protos.h,
config/m68k/coff.h, config/m68k/m68k-none.h, config/m68k/ieee.opt,
config/m68k/openbsd.h, config/m68k/m68k-aout.h,
config/m68k/m68k.opt, config/m68k/m68020-elf.h,
config/m68k/m68kelf.h, config/m68k/m68k-devices.def,
config/m68k/uclinux-oldabi.h, config/m68k/m68k.c,
config/m68k/constraints.md, config/m68k/rtemself.h,
config/m68k/netbsd-elf.h, config/m68k/m68k.h,
config/m68k/uclinux.h, config/rs6000/power4.md,
config/rs6000/host-darwin.c, config/rs6000/6xx.md,
config/rs6000/linux.h, config/rs6000/eabi.h,
config/rs6000/aix41.opt, config/rs6000/xcoff.h,
config/rs6000/secureplt.h, config/rs6000/linuxspe.h,
config/rs6000/eabialtivec.h, config/rs6000/8540.md,
config/rs6000/darwin8.h, config/rs6000/kaos-ppc.h,
config/rs6000/windiss.h, config/rs6000/603.md,
config/rs6000/aix41.h, config/rs6000/cell.md,
config/rs6000/mpc.md, config/rs6000/aix43.h, config/rs6000/beos.h,
config/rs6000/gnu.h, config/rs6000/rtems.h, config/rs6000/aix.opt,
config/rs6000/darwin.md, config/rs6000/darwin64.h,
config/rs6000/default64.h, config/rs6000/7xx.md,
config/rs6000/darwin.opt, config/rs6000/spe.md,
config/rs6000/rs6000.opt, config/rs6000/rs6000-c.c,
config/rs6000/rios2.md, config/rs6000/linuxaltivec.h,
config/rs6000/7450.md, config/rs6000/linux64.h,
config/rs6000/constraints.md, config/rs6000/440.md,
config/rs6000/darwin.h, config/rs6000/host-ppc64-darwin.c,
config/rs6000/rs6000.c, config/rs6000/aix52.h,
config/rs6000/rs6000.h, config/rs6000/power6.md,
config/rs6000/predicates.md, config/rs6000/altivec.md,
config/rs6000/aix64.opt, config/rs6000/rios1.md,
config/rs6000/rs6000-modes.def, config/rs6000/rs64.md,
config/rs6000/eabisim.h, config/rs6000/sysv4le.h,
config/rs6000/darwin7.h, config/rs6000/dfp.md,
config/rs6000/linux64.opt, config/rs6000/sync.md,
config/rs6000/vxworksae.h, config/rs6000/power5.md,
config/rs6000/lynx.h, config/rs6000/biarch64.h,
config/rs6000/rs6000.md, config/rs6000/sysv4.opt,
config/rs6000/eabispe.h, config/rs6000/e500.h,
config/rs6000/freebsd.h, config/rs6000/rs6000-protos.h,
config/rs6000/netbsd.h, config/rs6000/e500-double.h,
config/rs6000/aix.h, config/rs6000/vxworks.h,
config/rs6000/40x.md, config/rs6000/aix51.h,
config/rs6000/sysv4.h, config/arc/arc-protos.h, config/arc/arc.md,
config/arc/arc.c, config/arc/arc.opt, config/arc/arc-modes.def,
config/arc/arc.h, config/mcore/mcore-elf.h,
config/mcore/mcore-protos.h, config/mcore/predicates.md,
config/mcore/mcore.md, config/mcore/mcore.c,
config/mcore/mcore.opt, config/mcore/mcore.h,
config/mcore/mcore-pe.h, config/darwin.c, config/freebsd-nthr.h,
config/score/predicates.md, config/score/score-version.h,
config/score/score-protos.h, config/score/misc.md,
config/score/elf.h, config/score/score.c, config/score/mac.md,
config/score/score7.md, config/score/score.h,
config/score/score-conv.h, config/score/score-mdaux.c,
config/score/score.md, config/score/score.opt,
config/score/score-modes.def, config/score/score-mdaux.h,
config/score/mul-div.S, config/arm/uclinux-elf.h,
config/arm/semi.h, config/arm/ecos-elf.h, config/arm/arm1020e.md,
config/arm/symbian.h, config/arm/linux-elf.h,
config/arm/arm1026ejs.md, config/arm/arm1136jfs.md,
config/arm/elf.h, config/arm/aout.h, config/arm/arm.c,
config/arm/thumb2.md, config/arm/vec-common.md, config/arm/coff.h,
config/arm/strongarm-pe.h, config/arm/arm.h,
config/arm/cortex-a8-neon.md, config/arm/semiaof.h,
config/arm/cortex-a8.md, config/arm/uclinux-eabi.h,
config/arm/arm-modes.def, config/arm/linux-eabi.h,
config/arm/rtems-elf.h, config/arm/neon-schedgen.ml,
config/arm/arm-cores.def, config/arm/arm-protos.h,
config/arm/vfp.md, config/arm/aof.h, config/arm/linux-gas.h,
config/arm/wince-pe.h, config/arm/neon.md,
config/arm/constraints.md, config/arm/neon.ml,
config/arm/xscale-elf.h, config/arm/strongarm-coff.h,
config/arm/arm.opt, config/arm/arm926ejs.md,
config/arm/predicates.md, config/arm/iwmmxt.md,
config/arm/arm_neon.h, config/arm/unknown-elf.h,
config/arm/kaos-arm.h, config/arm/bpabi.h, config/arm/pe.opt,
config/arm/neon-testgen.ml, config/arm/arm.md,
config/arm/xscale-coff.h, config/arm/pe.c,
config/arm/arm-generic.md, config/arm/pe.h,
config/arm/kaos-strongarm.h, config/arm/freebsd.h,
config/arm/neon-docgen.ml, config/arm/netbsd.h, config/arm/fpa.md,
config/arm/strongarm-elf.h, config/arm/cirrus.md,
config/arm/netbsd-elf.h, config/arm/vxworks.h,
config/arm/neon-gen.ml, config/kaos.h, config/darwin-driver.c,
config/pa/predicates.md, config/pa/pa64-hpux.h,
config/pa/pa-hpux.opt, config/pa/som.h, config/pa/pa-hpux1010.opt,
config/pa/pa-hpux1111.opt, config/pa/pa-pro-end.h,
config/pa/elf.h, config/pa/fptr.c, config/pa/pa64-linux.h,
config/pa/pa.md, config/pa/pa.opt, config/pa/pa-hpux.h,
config/pa/pa-hpux10.h, config/pa/pa-hpux11.h,
config/pa/pa-hpux1010.h, config/pa/pa-protos.h,
config/pa/pa-osf.h, config/pa/pa-hpux1111.h, config/pa/pa-64.h,
config/pa/milli64.S, config/pa/pa.c, config/pa/pa-linux.h,
config/pa/pa.h, config/pa/pa32-linux.h, config/pa/pa64-hpux.opt,
config/pa/pa64-regs.h, config/pa/pa-modes.def,
config/pa/constraints.md, config/darwin9.h, config/mips/4100.md,
config/mips/linux.h, config/mips/elfoabi.h, config/mips/elf.h,
config/mips/sdb.h, config/mips/windiss.h, config/mips/rtems.h,
config/mips/3000.md, config/mips/iris5.h, config/mips/5000.md,
config/mips/7000.md, config/mips/9000.md, config/mips/4600.md,
config/mips/linux64.h, config/mips/elforion.h,
config/mips/constraints.md, config/mips/generic.md,
config/mips/predicates.md, config/mips/4300.md,
config/mips/mips-ps-3d.md, config/mips/iris.h, config/mips/24k.md,
config/mips/mips.md, config/mips/mips.opt, config/mips/4k.md,
config/mips/5k.md, config/mips/vr4120-div.S,
config/mips/openbsd.h, config/mips/iris6.h, config/mips/4000.md,
config/mips/mips-protos.h, config/mips/6000.md,
config/mips/mips.c, config/mips/mips.h, config/mips/r3900.h,
config/mips/74k.md, config/mips/netbsd.h, config/mips/vxworks.h,
config/mips/mips-modes.def, config/mips/vr.h,
config/soft-fp/t-softfp, config/openbsd.h, config/ptx4.h,
config/freebsd-spec.h, config/vax/vax.c, config/vax/openbsd.h,
config/vax/vax.h, config/vax/elf.h, config/vax/vax.md,
config/vax/bsd.h, config/vax/vax.opt, config/vax/vax-modes.def,
config/vax/openbsd1.h, config/vax/netbsd.h,
config/vax/vax-protos.h, config/vax/netbsd-elf.h,
config/vax/vaxv.h, config/vax/ultrix.h, config/freebsd.h,
config/h8300/rtems.h, config/h8300/predicates.md,
config/h8300/h8300.c, config/h8300/h8300.h, config/h8300/elf.h,
config/h8300/h8300.md, config/h8300/h8300.opt,
config/h8300/coff.h, config/h8300/h8300-protos.h,
config/v850/v850.md, config/v850/predicates.md,
config/v850/v850-c.c, config/v850/v850.c, config/v850/v850.opt,
config/v850/v850.h, config/v850/v850-protos.h, config/vxworks.c,
config/knetbsd-gnu.h, config/sol2-6.h, config/vxworks.h,
config/mmix/mmix.h, config/mmix/predicates.md,
config/mmix/mmix-protos.h, config/mmix/mmix.md,
config/mmix/mmix.c, config/mmix/mmix.opt,
config/mmix/mmix-modes.def, config/bfin/bfin.opt,
config/bfin/rtems.h, config/bfin/bfin-modes.def,
config/bfin/predicates.md, config/bfin/bfin-protos.h,
config/bfin/bfin.c, config/bfin/bfin.h, config/bfin/bfin.md: Likewise.
From-SVN: r127157
2007-08-02 12:49:31 +02:00
|
|
|
|
along with GCC; see the file COPYING3. If not see
|
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2007-05-10 13:15:07 +02:00
|
|
|
|
#include "config/vxworks-dummy.h"
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Note that some other tm.h files include this one and then override
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
whatever definitions are necessary. */
|
|
|
|
|
|
2011-09-26 21:04:35 +02:00
|
|
|
|
#define TARGET_CPU_CPP_BUILTINS() sparc_target_macros ()
|
config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
* config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
* sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h,
sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h,
sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h,
sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h,
sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h,
sparc/sysv4.h,
* sparc/sysv4-only.h: New.
From-SVN: r66902
2003-05-17 09:19:56 +02:00
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
/* Specify this in a cover file to provide bi-architecture (32/64) support. */
|
|
|
|
|
/* #define SPARC_BI_ARCH */
|
|
|
|
|
|
|
|
|
|
/* Macro used later in this file to determine default architecture. */
|
|
|
|
|
#define DEFAULT_ARCH32_P ((TARGET_DEFAULT & MASK_64BIT) == 0)
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
/* TARGET_ARCH{32,64} are the main macros to decide which of the two
|
|
|
|
|
architectures to compile for. We allow targets to choose compile time or
|
|
|
|
|
runtime selection. */
|
1998-10-07 04:17:57 +02:00
|
|
|
|
#ifdef IN_LIBGCC2
|
1999-12-14 13:53:39 +01:00
|
|
|
|
#if defined(__sparcv9) || defined(__arch64__)
|
1998-10-07 04:17:57 +02:00
|
|
|
|
#define TARGET_ARCH32 0
|
|
|
|
|
#else
|
|
|
|
|
#define TARGET_ARCH32 1
|
1999-12-14 13:53:39 +01:00
|
|
|
|
#endif /* sparc64 */
|
1998-10-07 04:17:57 +02:00
|
|
|
|
#else
|
1999-12-17 16:49:32 +01:00
|
|
|
|
#ifdef SPARC_BI_ARCH
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define TARGET_ARCH32 (! TARGET_64BIT)
|
|
|
|
|
#else
|
|
|
|
|
#define TARGET_ARCH32 (DEFAULT_ARCH32_P)
|
1998-10-07 04:17:57 +02:00
|
|
|
|
#endif /* SPARC_BI_ARCH */
|
1999-12-17 16:49:32 +01:00
|
|
|
|
#endif /* IN_LIBGCC2 */
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define TARGET_ARCH64 (! TARGET_ARCH32)
|
|
|
|
|
|
2004-03-15 22:06:45 +01:00
|
|
|
|
/* Code model selection in 64-bit environment.
|
|
|
|
|
|
|
|
|
|
The machine mode used for addresses is 32-bit wide:
|
|
|
|
|
|
|
|
|
|
TARGET_CM_32: 32-bit address space.
|
|
|
|
|
It is the code model used when generating 32-bit code.
|
|
|
|
|
|
|
|
|
|
The machine mode used for addresses is 64-bit wide:
|
|
|
|
|
|
|
|
|
|
TARGET_CM_MEDLOW: 32-bit address space.
|
|
|
|
|
The executable must be in the low 32 bits of memory.
|
|
|
|
|
This avoids generating %uhi and %ulo terms. Programs
|
|
|
|
|
can be statically or dynamically linked.
|
|
|
|
|
|
|
|
|
|
TARGET_CM_MEDMID: 44-bit address space.
|
|
|
|
|
The executable must be in the low 44 bits of memory,
|
|
|
|
|
and the %[hml]44 terms are used. The text and data
|
|
|
|
|
segments have a maximum size of 2GB (31-bit span).
|
|
|
|
|
The maximum offset from any instruction to the label
|
|
|
|
|
_GLOBAL_OFFSET_TABLE_ is 2GB (31-bit span).
|
|
|
|
|
|
|
|
|
|
TARGET_CM_MEDANY: 64-bit address space.
|
|
|
|
|
The text and data segments have a maximum size of 2GB
|
|
|
|
|
(31-bit span) and may be located anywhere in memory.
|
|
|
|
|
The maximum offset from any instruction to the label
|
|
|
|
|
_GLOBAL_OFFSET_TABLE_ is 2GB (31-bit span).
|
|
|
|
|
|
|
|
|
|
TARGET_CM_EMBMEDANY: 64-bit address space.
|
|
|
|
|
The text and data segments have a maximum size of 2GB
|
|
|
|
|
(31-bit span) and may be located anywhere in memory.
|
|
|
|
|
The global register %g4 contains the start address of
|
|
|
|
|
the data segment. Programs are statically linked and
|
|
|
|
|
PIC is not supported.
|
|
|
|
|
|
|
|
|
|
Different code models are not supported in 32-bit environment. */
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
|
|
|
|
|
enum cmodel {
|
|
|
|
|
CM_32,
|
|
|
|
|
CM_MEDLOW,
|
|
|
|
|
CM_MEDMID,
|
|
|
|
|
CM_MEDANY,
|
|
|
|
|
CM_EMBMEDANY
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* One of CM_FOO. */
|
|
|
|
|
extern enum cmodel sparc_cmodel;
|
|
|
|
|
|
|
|
|
|
/* V9 code model selection. */
|
|
|
|
|
#define TARGET_CM_MEDLOW (sparc_cmodel == CM_MEDLOW)
|
|
|
|
|
#define TARGET_CM_MEDMID (sparc_cmodel == CM_MEDMID)
|
|
|
|
|
#define TARGET_CM_MEDANY (sparc_cmodel == CM_MEDANY)
|
|
|
|
|
#define TARGET_CM_EMBMEDANY (sparc_cmodel == CM_EMBMEDANY)
|
|
|
|
|
|
1999-12-14 13:47:01 +01:00
|
|
|
|
#define SPARC_DEFAULT_CMODEL CM_32
|
1996-01-25 15:16:13 +01:00
|
|
|
|
|
2005-01-03 09:23:58 +01:00
|
|
|
|
/* The SPARC-V9 architecture defines a relaxed memory ordering model (RMO)
|
|
|
|
|
which requires the following macro to be true if enabled. Prior to V9,
|
|
|
|
|
there are no instructions to even talk about memory synchronization.
|
|
|
|
|
Note that the UltraSPARC III processors don't implement RMO, unlike the
|
2011-09-05 18:00:53 +02:00
|
|
|
|
UltraSPARC II processors. Niagara, Niagara-2, and Niagara-3 do not
|
|
|
|
|
implement RMO either.
|
2005-01-03 09:23:58 +01:00
|
|
|
|
|
|
|
|
|
Default to false; for example, Solaris never enables RMO, only ever uses
|
|
|
|
|
total memory ordering (TMO). */
|
|
|
|
|
#define SPARC_RELAXED_ORDERING false
|
|
|
|
|
|
2005-04-04 17:29:10 +02:00
|
|
|
|
/* Do not use the .note.GNU-stack convention by default. */
|
|
|
|
|
#define NEED_INDICATE_EXEC_STACK 0
|
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
/* This is call-clobbered in the normal ABI, but is reserved in the
|
|
|
|
|
home grown (aka upward compatible) embedded ABI. */
|
|
|
|
|
#define EMBMEDANY_BASE_REG "%g4"
|
|
|
|
|
|
|
|
|
|
/* Values of TARGET_CPU_DEFAULT, set via -D in the Makefile,
|
|
|
|
|
and specified by the user via --with-cpu=foo.
|
|
|
|
|
This specifies the cpu implementation, not the architecture size. */
|
2002-10-22 23:51:54 +02:00
|
|
|
|
/* Note that TARGET_CPU_v9 is assumed to start the list of 64-bit
|
1999-01-07 04:18:28 +01:00
|
|
|
|
capable cpu's. */
|
1996-10-26 18:20:31 +02:00
|
|
|
|
#define TARGET_CPU_sparc 0
|
2010-12-16 23:28:45 +01:00
|
|
|
|
#define TARGET_CPU_v7 0 /* alias */
|
|
|
|
|
#define TARGET_CPU_cypress 0 /* alias */
|
|
|
|
|
#define TARGET_CPU_v8 1 /* generic v8 implementation */
|
|
|
|
|
#define TARGET_CPU_supersparc 2
|
|
|
|
|
#define TARGET_CPU_hypersparc 3
|
|
|
|
|
#define TARGET_CPU_leon 4
|
|
|
|
|
#define TARGET_CPU_sparclite 5
|
|
|
|
|
#define TARGET_CPU_f930 5 /* alias */
|
|
|
|
|
#define TARGET_CPU_f934 5 /* alias */
|
1999-01-07 04:18:28 +01:00
|
|
|
|
#define TARGET_CPU_sparclite86x 6
|
2010-12-16 23:28:45 +01:00
|
|
|
|
#define TARGET_CPU_sparclet 7
|
|
|
|
|
#define TARGET_CPU_tsc701 7 /* alias */
|
|
|
|
|
#define TARGET_CPU_v9 8 /* generic v9 implementation */
|
|
|
|
|
#define TARGET_CPU_sparcv9 8 /* alias */
|
|
|
|
|
#define TARGET_CPU_sparc64 8 /* alias */
|
|
|
|
|
#define TARGET_CPU_ultrasparc 9
|
|
|
|
|
#define TARGET_CPU_ultrasparc3 10
|
|
|
|
|
#define TARGET_CPU_niagara 11
|
|
|
|
|
#define TARGET_CPU_niagara2 12
|
2011-09-05 18:00:53 +02:00
|
|
|
|
#define TARGET_CPU_niagara3 13
|
|
|
|
|
#define TARGET_CPU_niagara4 14
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
|
1999-01-07 04:18:28 +01:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
|
2002-04-30 00:34:36 +02:00
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
|
2006-03-02 23:47:02 +01:00
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3 \
|
2007-10-19 06:29:38 +02:00
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_niagara \
|
2011-09-05 18:00:53 +02:00
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_niagara2 \
|
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_niagara3 \
|
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_niagara4
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC ""
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC ""
|
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
/* ??? What does Sun's CC pass? */
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
/* ??? It's not clear how other assemblers will handle this, so by default
|
|
|
|
|
use GAS. Sun's Solaris assembler recognizes -xarch=v8plus, but this case
|
|
|
|
|
is handled in sol2.h. */
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9"
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
#endif
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9a"
|
|
|
|
|
#endif
|
2002-04-30 00:34:36 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
|
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9b"
|
|
|
|
|
#endif
|
2006-03-02 23:47:02 +01:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara
|
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9b"
|
|
|
|
|
#endif
|
2007-10-19 06:29:38 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara2
|
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9b"
|
|
|
|
|
#endif
|
2011-09-05 18:00:53 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara3
|
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
2011-09-25 23:28:51 +02:00
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9" AS_NIAGARA3_FLAG
|
2011-09-05 18:00:53 +02:00
|
|
|
|
#endif
|
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara4
|
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
|
2011-09-25 23:28:51 +02:00
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC "-Av9" AS_NIAGARA3_FLAG
|
2011-09-05 18:00:53 +02:00
|
|
|
|
#endif
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
#define CPP_CPU64_DEFAULT_SPEC ""
|
|
|
|
|
#define ASM_CPU64_DEFAULT_SPEC ""
|
|
|
|
|
|
1999-01-07 04:18:28 +01:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_sparc \
|
|
|
|
|
|| TARGET_CPU_DEFAULT == TARGET_CPU_v8
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC ""
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC ""
|
|
|
|
|
#endif
|
1999-01-07 04:18:28 +01:00
|
|
|
|
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_sparclet
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC "-D__sparclet__"
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC "-Asparclet"
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
#endif
|
1999-01-07 04:18:28 +01:00
|
|
|
|
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_sparclite
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC "-D__sparclite__"
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC "-Asparclite"
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-12-16 23:28:45 +01:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_sparclite86x
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC "-D__sparclite86x__"
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC "-Asparclite"
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-01-07 04:18:28 +01:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_supersparc
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC "-D__supersparc__ -D__sparc_v8__"
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC ""
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_hypersparc
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC "-D__hypersparc__ -D__sparc_v8__"
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC ""
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-12-16 23:28:45 +01:00
|
|
|
|
#if TARGET_CPU_DEFAULT == TARGET_CPU_leon
|
|
|
|
|
#define CPP_CPU32_DEFAULT_SPEC "-D__leon__ -D__sparc_v8__"
|
|
|
|
|
#define ASM_CPU32_DEFAULT_SPEC ""
|
1999-01-07 04:18:28 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
|
2002-10-22 23:51:54 +02:00
|
|
|
|
#error Unrecognized value in TARGET_CPU_DEFAULT.
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
#ifdef SPARC_BI_ARCH
|
|
|
|
|
|
|
|
|
|
#define CPP_CPU_DEFAULT_SPEC \
|
|
|
|
|
(DEFAULT_ARCH32_P ? "\
|
|
|
|
|
%{m64:" CPP_CPU64_DEFAULT_SPEC "} \
|
|
|
|
|
%{!m64:" CPP_CPU32_DEFAULT_SPEC "} \
|
|
|
|
|
" : "\
|
|
|
|
|
%{m32:" CPP_CPU32_DEFAULT_SPEC "} \
|
|
|
|
|
%{!m32:" CPP_CPU64_DEFAULT_SPEC "} \
|
|
|
|
|
")
|
|
|
|
|
#define ASM_CPU_DEFAULT_SPEC \
|
|
|
|
|
(DEFAULT_ARCH32_P ? "\
|
|
|
|
|
%{m64:" ASM_CPU64_DEFAULT_SPEC "} \
|
|
|
|
|
%{!m64:" ASM_CPU32_DEFAULT_SPEC "} \
|
|
|
|
|
" : "\
|
|
|
|
|
%{m32:" ASM_CPU32_DEFAULT_SPEC "} \
|
|
|
|
|
%{!m32:" ASM_CPU64_DEFAULT_SPEC "} \
|
|
|
|
|
")
|
|
|
|
|
|
|
|
|
|
#else /* !SPARC_BI_ARCH */
|
|
|
|
|
|
|
|
|
|
#define CPP_CPU_DEFAULT_SPEC (DEFAULT_ARCH32_P ? CPP_CPU32_DEFAULT_SPEC : CPP_CPU64_DEFAULT_SPEC)
|
|
|
|
|
#define ASM_CPU_DEFAULT_SPEC (DEFAULT_ARCH32_P ? ASM_CPU32_DEFAULT_SPEC : ASM_CPU64_DEFAULT_SPEC)
|
|
|
|
|
|
|
|
|
|
#endif /* !SPARC_BI_ARCH */
|
|
|
|
|
|
1992-06-03 22:22:12 +02:00
|
|
|
|
/* Define macros to distinguish architectures. */
|
1994-06-29 21:43:25 +02:00
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
/* Common CPP definitions used by CPP_SPEC amongst the various targets
|
|
|
|
|
for handling -mcpu=xxx switches. */
|
|
|
|
|
#define CPP_CPU_SPEC "\
|
1996-04-11 00:37:50 +02:00
|
|
|
|
%{mcpu=sparclet:-D__sparclet__} %{mcpu=tsc701:-D__sparclet__} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
%{mcpu=sparclite:-D__sparclite__} \
|
|
|
|
|
%{mcpu=f930:-D__sparclite__} %{mcpu=f934:-D__sparclite__} \
|
2010-12-16 23:28:45 +01:00
|
|
|
|
%{mcpu=sparclite86x:-D__sparclite86x__} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
%{mcpu=v8:-D__sparc_v8__} \
|
|
|
|
|
%{mcpu=supersparc:-D__supersparc__ -D__sparc_v8__} \
|
1999-01-07 04:18:28 +01:00
|
|
|
|
%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
|
2010-12-16 23:28:45 +01:00
|
|
|
|
%{mcpu=leon:-D__leon__ -D__sparc_v8__} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
%{mcpu=v9:-D__sparc_v9__} \
|
|
|
|
|
%{mcpu=ultrasparc:-D__sparc_v9__} \
|
2002-04-30 00:34:36 +02:00
|
|
|
|
%{mcpu=ultrasparc3:-D__sparc_v9__} \
|
2006-03-02 23:47:02 +01:00
|
|
|
|
%{mcpu=niagara:-D__sparc_v9__} \
|
2007-10-19 06:29:38 +02:00
|
|
|
|
%{mcpu=niagara2:-D__sparc_v9__} \
|
2011-09-05 18:00:53 +02:00
|
|
|
|
%{mcpu=niagara3:-D__sparc_v9__} \
|
|
|
|
|
%{mcpu=niagara4:-D__sparc_v9__} \
|
2011-01-14 22:01:18 +01:00
|
|
|
|
%{!mcpu*:%(cpp_cpu_default)} \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
"
|
config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
* config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
* sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h,
sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h,
sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h,
sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h,
sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h,
sparc/sysv4.h,
* sparc/sysv4-only.h: New.
From-SVN: r66902
2003-05-17 09:19:56 +02:00
|
|
|
|
#define CPP_ARCH32_SPEC ""
|
|
|
|
|
#define CPP_ARCH64_SPEC "-D__arch64__"
|
[multiple changes]
Thu Sep 24 01:35:34 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define.
* config/sparc/sparc.c (sparc64_initialize_trampoline): If that is
defined, emit libcall to __enable_execute_stack. Also fix opcodes
and offsets in actual stack trampoline code so they match the
commentary and actually work.
Thu Sep 24 01:19:02 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
* configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for
tmake_file.
(sparc64-*-linux): Use t-linux and sparc/t-linux64 for
tmake_file. Set extra_parts to needed crt objects.
* configure: Rebuilt.
* config/sparc/linux64.h (SPARC_BI_ARCH): Define.
(TARGET_DEFAULT): Set if default is v9 or ultra.
(STARTFILE_SPEC32, STARTFILE_SPEC64): New macros.
(STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH.
(ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise.
(SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_SPEC, LINK_ARCH_SPEC): Likewise.
(TARGET_VERSION): Define.
(MULTILIB_DEFAULT): Define.
* config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that
mixed 32/64 bit compilers based upon SPARC_BI_ARCH work.
(CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define
appropriately.
(TARGET_SWITCHES): Allow ptr32/ptr64 options once more.
* config/sparc/sparc.c (sparc_override_options): If arch and
pointer size disagree, emit diagnostic and fix it up. If
SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off
V8PLUS in 64-bit mode.
* config/sparc/t-linux64: New file.
* config/sparc/t-sol2-64: New file.
* config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS.
* config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC,
CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define.
(ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those.
(STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC):
Define.
(STARTFILE_SPEC): Set approriately based upon those.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon
disposition of DEFAULT_ARCH32_P.
(LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define.
(LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those.
(CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P.
(MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH.
* config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on
arch64/v9.
* config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise.
From-SVN: r22565
1998-09-24 04:44:55 +02:00
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define CPP_ARCH_DEFAULT_SPEC \
|
|
|
|
|
(DEFAULT_ARCH32_P ? CPP_ARCH32_SPEC : CPP_ARCH64_SPEC)
|
|
|
|
|
|
|
|
|
|
#define CPP_ARCH_SPEC "\
|
|
|
|
|
%{m32:%(cpp_arch32)} \
|
|
|
|
|
%{m64:%(cpp_arch64)} \
|
|
|
|
|
%{!m32:%{!m64:%(cpp_arch_default)}} \
|
|
|
|
|
"
|
|
|
|
|
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
/* Macros to distinguish the endianness, window model and FP support. */
|
|
|
|
|
#define CPP_OTHER_SPEC "\
|
|
|
|
|
%{mflat:-D_FLAT} \
|
|
|
|
|
%{msoft-float:-D_SOFT_FLOAT} \
|
|
|
|
|
"
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
|
|
|
|
|
/* Macros to distinguish the particular subtarget. */
|
|
|
|
|
#define CPP_SUBTARGET_SPEC ""
|
|
|
|
|
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define CPP_SPEC \
|
|
|
|
|
"%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_other) %(cpp_subtarget)"
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
|
1992-03-22 19:57:22 +01:00
|
|
|
|
/* This used to translate -dalign to -malign, but that is no good
|
|
|
|
|
because it can't turn off the usual meaning of making debugging dumps. */
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
|
2011-01-14 22:02:06 +01:00
|
|
|
|
#define CC1_SPEC ""
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
|
|
|
|
|
/* Override in target specific files. */
|
|
|
|
|
#define ASM_CPU_SPEC "\
|
1996-04-11 00:37:50 +02:00
|
|
|
|
%{mcpu=sparclet:-Asparclet} %{mcpu=tsc701:-Asparclet} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
%{mcpu=sparclite:-Asparclite} \
|
1999-07-31 00:44:08 +02:00
|
|
|
|
%{mcpu=sparclite86x:-Asparclite} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
%{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
|
2011-11-04 18:37:03 +01:00
|
|
|
|
%{mcpu=v8:-Av8} \
|
1998-04-18 03:24:59 +02:00
|
|
|
|
%{mv8plus:-Av8plus} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
%{mcpu=v9:-Av9} \
|
1998-04-18 03:24:59 +02:00
|
|
|
|
%{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
|
2002-04-30 00:34:36 +02:00
|
|
|
|
%{mcpu=ultrasparc3:%{!mv8plus:-Av9b}} \
|
2006-03-02 23:47:02 +01:00
|
|
|
|
%{mcpu=niagara:%{!mv8plus:-Av9b}} \
|
2007-10-19 06:29:38 +02:00
|
|
|
|
%{mcpu=niagara2:%{!mv8plus:-Av9b}} \
|
2011-09-25 23:28:51 +02:00
|
|
|
|
%{mcpu=niagara3:%{!mv8plus:-Av9" AS_NIAGARA3_FLAG "}} \
|
|
|
|
|
%{mcpu=niagara4:%{!mv8plus:-Av9" AS_NIAGARA3_FLAG "}} \
|
2011-01-14 22:01:18 +01:00
|
|
|
|
%{!mcpu*:%(asm_cpu_default)} \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
"
|
|
|
|
|
|
1997-10-24 21:36:54 +02:00
|
|
|
|
/* Word size selection, among other things.
|
|
|
|
|
This is what GAS uses. Add %(asm_arch) to ASM_SPEC to enable. */
|
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define ASM_ARCH32_SPEC "-32"
|
2000-03-06 19:14:48 +01:00
|
|
|
|
#ifdef HAVE_AS_REGISTER_PSEUDO_OP
|
|
|
|
|
#define ASM_ARCH64_SPEC "-64 -no-undeclared-regs"
|
|
|
|
|
#else
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define ASM_ARCH64_SPEC "-64"
|
2000-03-06 19:14:48 +01:00
|
|
|
|
#endif
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define ASM_ARCH_DEFAULT_SPEC \
|
1997-10-24 21:36:54 +02:00
|
|
|
|
(DEFAULT_ARCH32_P ? ASM_ARCH32_SPEC : ASM_ARCH64_SPEC)
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
|
|
|
|
|
#define ASM_ARCH_SPEC "\
|
|
|
|
|
%{m32:%(asm_arch32)} \
|
|
|
|
|
%{m64:%(asm_arch64)} \
|
|
|
|
|
%{!m32:%{!m64:%(asm_arch_default)}} \
|
|
|
|
|
"
|
|
|
|
|
|
2000-06-09 16:31:54 +02:00
|
|
|
|
#ifdef HAVE_AS_RELAX_OPTION
|
|
|
|
|
#define ASM_RELAX_SPEC "%{!mno-relax:-relax}"
|
|
|
|
|
#else
|
|
|
|
|
#define ASM_RELAX_SPEC ""
|
|
|
|
|
#endif
|
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
/* Special flags to the Sun-4 assembler when using pipe for input. */
|
|
|
|
|
|
|
|
|
|
#define ASM_SPEC "\
|
common.opt (R, [...]): New.
* common.opt (R, T, Tbss, Tdata, Ttext, h, z): New.
* defaults.h (DEFAULT_SWITCH_TAKES_ARG, SWITCH_TAKES_ARG): Remove.
(DEFAULT_WORD_SWITCH_TAKES_ARG): Define to 0.
* doc/tm.texi.in (SWITCH_TAKES_ARG): Remove.
(WORD_SWITCH_TAKES_ARG): Don't refer to SWITCH_TAKES_ARG.
Document that options in .opt files do not need to be included.
* doc/tm.texi: Regenerate.
* gcc.c (LINK_COMMAND_SPEC): Don't include %{x}.
* opts-common.c: Update comment on tm.h include.
(decode_cmdline_option): Don't use SWITCH_TAKES_ARG.
* system.h (SWITCH_TAKES_ARG): Poison.
* config/alpha/alpha.h (SWITCH_TAKES_ARG): Remove.
* config/darwin.h (WORD_SWITCH_TAKES_ARG): Remove options included
in darwin.opt.
(LINK_COMMAND_SPEC_A): Don't include %{x}.
* config/fr30/fr30.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
* config/freebsd-spec.h (FBSD_SWITCH_TAKES_ARG): Remove.
* config/freebsd.h (SWITCH_TAKES_ARG): Remove.
* config/frv/frv.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
* config/i386/djgpp.h (LINK_COMMAND_SPEC): Don't include %{x}.
* config/ia64/ia64.h (SWITCH_TAKES_ARG): Remove.
* config/interix.h (WORD_SWITCH_TAKES_ARG): Don't handle -T
options.
* config/lm32/lm32.h (SWITCH_TAKES_ARG): Remove.
* config/m32r/m32r.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
* config/microblaze/microblaze.h (SWITCH_TAKES_ARG): Remove.
* config/mips/mips.h (SWITCH_TAKES_ARG): Remove.
* config/mips/netbsd.h (SWITCH_TAKES_ARG): Remove.
* config/mips/vxworks.h (SWITCH_TAKES_ARG): Remove.
* config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove.
* config/netbsd-elf.h (SWITCH_TAKES_ARG): Remove.
* config/openbsd.h (SWITCH_TAKES_ARG): Remove.
* config/rs6000/sysv4.h (SWITCH_TAKES_ARG): Remove.
* config/score/score.h (SWITCH_TAKES_ARG): Remove.
* config/sol2.h (SWITCH_TAKES_ARG): Remove.
* config/sparc/sp-elf.h (SWITCH_TAKES_ARG): Remove.
* config/sparc/sp64-elf.h (SWITCH_TAKES_ARG): Remove.
* config/sparc/sparc.h (ASM_SPEC): Don't include %{R}.
* config/svr4.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
From-SVN: r166155
2010-11-02 00:40:53 +01:00
|
|
|
|
%{!pg:%{!p:%{fpic|fPIC|fpie|fPIE:-k}}} %{keep-local-as-symbols:-L} \
|
2000-06-09 16:31:54 +02:00
|
|
|
|
%(asm_cpu) %(asm_relax)"
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
/* This macro defines names of additional specifications to put in the specs
|
|
|
|
|
that can be used in various specifications like CC1_SPEC. Its definition
|
|
|
|
|
is an initializer with a subgrouping for each command option.
|
|
|
|
|
|
|
|
|
|
Each subgrouping contains a string constant, that defines the
|
2003-09-27 06:48:30 +02:00
|
|
|
|
specification name, and a string constant that used by the GCC driver
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
program.
|
|
|
|
|
|
|
|
|
|
Do not define this macro if it does not need to do anything. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define EXTRA_SPECS \
|
1998-10-28 19:00:53 +01:00
|
|
|
|
{ "cpp_cpu", CPP_CPU_SPEC }, \
|
|
|
|
|
{ "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
|
|
|
|
|
{ "cpp_arch32", CPP_ARCH32_SPEC }, \
|
|
|
|
|
{ "cpp_arch64", CPP_ARCH64_SPEC }, \
|
|
|
|
|
{ "cpp_arch_default", CPP_ARCH_DEFAULT_SPEC },\
|
|
|
|
|
{ "cpp_arch", CPP_ARCH_SPEC }, \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
{ "cpp_other", CPP_OTHER_SPEC }, \
|
1998-10-28 19:00:53 +01:00
|
|
|
|
{ "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
|
|
|
|
|
{ "asm_cpu", ASM_CPU_SPEC }, \
|
|
|
|
|
{ "asm_cpu_default", ASM_CPU_DEFAULT_SPEC }, \
|
|
|
|
|
{ "asm_arch32", ASM_ARCH32_SPEC }, \
|
|
|
|
|
{ "asm_arch64", ASM_ARCH64_SPEC }, \
|
2000-06-09 16:31:54 +02:00
|
|
|
|
{ "asm_relax", ASM_RELAX_SPEC }, \
|
1998-10-28 19:00:53 +01:00
|
|
|
|
{ "asm_arch_default", ASM_ARCH_DEFAULT_SPEC },\
|
|
|
|
|
{ "asm_arch", ASM_ARCH_SPEC }, \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
SUBTARGET_EXTRA_SPECS
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
#define SUBTARGET_EXTRA_SPECS
|
2002-04-04 03:15:40 +02:00
|
|
|
|
|
|
|
|
|
/* Because libgcc can generate references back to libc (via .umul etc.) we have
|
|
|
|
|
to list libc again after the second libgcc. */
|
|
|
|
|
#define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G %L"
|
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
|
1998-05-03 16:19:46 +02:00
|
|
|
|
#define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int")
|
|
|
|
|
#define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int")
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
|
|
|
|
/* ??? This should be 32 bits for v9 but what can we do? */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define WCHAR_TYPE "short unsigned int"
|
|
|
|
|
#define WCHAR_TYPE_SIZE 16
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
/* Mask of all CPU selection flags. */
|
|
|
|
|
#define MASK_ISA \
|
|
|
|
|
(MASK_V8 + MASK_SPARCLITE + MASK_SPARCLET + MASK_V9 + MASK_DEPRECATED_V8_INSNS)
|
1996-01-25 15:16:13 +01:00
|
|
|
|
|
1998-04-18 03:24:59 +02:00
|
|
|
|
/* TARGET_HARD_MUL: Use hardware multiply instructions but not %y.
|
|
|
|
|
TARGET_HARD_MUL32: Use hardware multiply instructions with rd %y
|
|
|
|
|
to get high 32 bits. False in V8+ or V9 because multiply stores
|
c4x.md, [...]: Follow spelling conventions.
* config/c4x/c4x.md, config/cris/cris.c, config/crx/crx.c,
config/fr30/fr30.md, config/i386/i386.h,
config/iq2000/iq2000.h, config/iq2000/predicates.md,
config/pa/milli64.S, config/pa/pa.c, config/pa/pa.h,
config/pa/pa.md, config/pa/pa32-regs.h, config/pa/pa64-regs.h,
config/pdp11/pdp11.c, config/pdp11/pdp11.h,
config/rs6000/altivec.md, config/rs6000/rs6000.c,
config/s390/s390-modes.def, config/sparc/netbsd-elf.h,
config/sparc/sparc.c, config/sparc/sparc.h,
config/sparc/sparc.md, config/spu/constraints.md,
config/spu/spu.c, config/stormy16/stormy16.md: Follow spelling
conventions.
From-SVN: r122151
2007-02-20 03:26:06 +01:00
|
|
|
|
a 64-bit result in a register. */
|
1998-04-18 03:24:59 +02:00
|
|
|
|
|
sparc.c (sparc_override_options): Make v8plus and ultrasparc set MASK_V8PLUS.
Fri Jan 30 22:30:39 1998 John Carr <jfc@mit.edu>
* sparc.c (sparc_override_options): Make v8plus and ultrasparc set
MASK_V8PLUS.
(output_function_epilogue): Omit epilogue if nothing drops through.
(output_move_double): Supress int ldd usage on ultrasparc and v9.
(registers_ok_for_ldd_peep): Likewise.
(print_operand): Supress b,a on ultrasparc. Let Y accept a constant.
(ultrasparc_adjust_cost): New function.
(sparc_issue_rate): New function.
* sparc.h (MASK_VIS, TARGET_VIS): New
(MASK_V8PLUS, TARGET_V8PLUS): New.
(TARGET_HARD_MUL32, TARGET_HARD_MUL): New.
(TARGET_SWITCHES): Add vis and v8plus.
(REG_CLASS_FROM_LETTER): Accept d and b for VIS.
(REGISTER_MOVE_COST): FP<->INT move cost 12 for ultrasparc.
(RTX_COSTS): Use TARGET_HARD_MUL
(ADJUST_COST): Call ultrasparc_adjust_cost.
(ISSUE_RATE): New.
* sparc.md (attr type): Add sload, fpmove, fpcmove. Adjust users
of load & fp appropritely.
(supersparc function units): Adjust for Haifa.
(ultrasparc function units): Likewise.
(get_pc_via_rdpc): All v9, not just arch64.
(movdi_v8plus, movdi_v8plus+1): New.
(adddi3_sp32+1): New.
(subdi3_sp32+1): New.
(movsi_insn, movsf_const_insn, movdf_const_insn): Know VIS.
(addsi3, subsi3, anddi3_sp32, andsi3, and_not_di_sp32): Likewise.
(and_not_si, iordi3_sp32, iorsi3, or_not_di_sp32, or_not_si): Likewise.
(xorsi3_sp32, xorsi3, xor_not_di_sp32, xor_not_si): Likewise.
(one_cmpldi2_sp32, one_cmplsi2): Likewise.
(ldd peepholes): Suppress for v9.
(return_adddi): Kill redundant test. Arg1 may be arith_operand.
(return_subsi): Revmove.
From-SVN: r17560
1998-01-31 00:34:15 +01:00
|
|
|
|
#define TARGET_HARD_MUL32 \
|
|
|
|
|
((TARGET_V8 || TARGET_SPARCLITE \
|
|
|
|
|
|| TARGET_SPARCLET || TARGET_DEPRECATED_V8_INSNS) \
|
Jakub Jelinek <jj@ultra.linux.cz>
* config/sparc/linux64.h (CC1_SPEC): Preserve CPU specified by
the user if using the non-default arch size in BI_ARCH configuration.
* config/sparc/sol2-sld-64.h (CC1_SPEC): Ditto.
* config/sparc/sparc.md (cmp_mul_set, cmp_udiv_cc_set):
Fix patterns so that they actually match.
(cmp_sdiv_cc_set): Ditto, also don't require g0 to be zero.
(mulsidi3_sp64, const_mulsidi3_sp64): New patterns.
(const_mulsidi3_sp32): Renamed from const_mulsidi3, only on
TARGET_HARD_MUL32.
(mulsidi3): Reflect this in the expand.
(smulsi3_highpart): Only on TARGET_ARCH32.
(umulsidi3_sp64, const_umulsidi3_sp64): New patterns.
(const_umulsidi3_sp32): Renamed from const_umulsidi3.
(umulsidi3): Reflect this in the expand.
(umulsi3_highpart): Only on TARGET_ARCH32.
(divsi3_sp32): Renamed from divsi3, only on TARGET_ARCH32,
don't require g0 to be zero.
(udivsi3_sp32): Renamed from udivsi3, only on TARGET_ARCH32.
({,u}divsi3): New expands.
({,u}divsi3_sp64): New patterns.
(after lshrdi3_v8plus): Four new patterns to help combiner
optimizing nested mixed mode shifts.
* config/sparc/sparc.c (sparc_override_options): Use deprecated
v8 instructions if optimizing for UltraSPARC I, II, IIi, as it
speed things up. Don't use them by default on plain v9 in 64bit
mode, according to what SPAMv9 sais.
* config/sparc/sparc.h: Fix comments, e.g. Linux already preserves
top 32 bits of %[og][0-7] in signal handlers.
Also, TARGET_HARD_MUL32 now is only true for TARGET_ARCH32.
From-SVN: r28346
1999-07-30 23:55:06 +02:00
|
|
|
|
&& ! TARGET_V8PLUS && TARGET_ARCH32)
|
sparc.c (sparc_override_options): Make v8plus and ultrasparc set MASK_V8PLUS.
Fri Jan 30 22:30:39 1998 John Carr <jfc@mit.edu>
* sparc.c (sparc_override_options): Make v8plus and ultrasparc set
MASK_V8PLUS.
(output_function_epilogue): Omit epilogue if nothing drops through.
(output_move_double): Supress int ldd usage on ultrasparc and v9.
(registers_ok_for_ldd_peep): Likewise.
(print_operand): Supress b,a on ultrasparc. Let Y accept a constant.
(ultrasparc_adjust_cost): New function.
(sparc_issue_rate): New function.
* sparc.h (MASK_VIS, TARGET_VIS): New
(MASK_V8PLUS, TARGET_V8PLUS): New.
(TARGET_HARD_MUL32, TARGET_HARD_MUL): New.
(TARGET_SWITCHES): Add vis and v8plus.
(REG_CLASS_FROM_LETTER): Accept d and b for VIS.
(REGISTER_MOVE_COST): FP<->INT move cost 12 for ultrasparc.
(RTX_COSTS): Use TARGET_HARD_MUL
(ADJUST_COST): Call ultrasparc_adjust_cost.
(ISSUE_RATE): New.
* sparc.md (attr type): Add sload, fpmove, fpcmove. Adjust users
of load & fp appropritely.
(supersparc function units): Adjust for Haifa.
(ultrasparc function units): Likewise.
(get_pc_via_rdpc): All v9, not just arch64.
(movdi_v8plus, movdi_v8plus+1): New.
(adddi3_sp32+1): New.
(subdi3_sp32+1): New.
(movsi_insn, movsf_const_insn, movdf_const_insn): Know VIS.
(addsi3, subsi3, anddi3_sp32, andsi3, and_not_di_sp32): Likewise.
(and_not_si, iordi3_sp32, iorsi3, or_not_di_sp32, or_not_si): Likewise.
(xorsi3_sp32, xorsi3, xor_not_di_sp32, xor_not_si): Likewise.
(one_cmpldi2_sp32, one_cmplsi2): Likewise.
(ldd peepholes): Suppress for v9.
(return_adddi): Kill redundant test. Arg1 may be arith_operand.
(return_subsi): Revmove.
From-SVN: r17560
1998-01-31 00:34:15 +01:00
|
|
|
|
|
|
|
|
|
#define TARGET_HARD_MUL \
|
|
|
|
|
(TARGET_V8 || TARGET_SPARCLITE || TARGET_SPARCLET \
|
2002-10-22 23:51:54 +02:00
|
|
|
|
|| TARGET_DEPRECATED_V8_INSNS || TARGET_V8PLUS)
|
sparc.c (sparc_override_options): Make v8plus and ultrasparc set MASK_V8PLUS.
Fri Jan 30 22:30:39 1998 John Carr <jfc@mit.edu>
* sparc.c (sparc_override_options): Make v8plus and ultrasparc set
MASK_V8PLUS.
(output_function_epilogue): Omit epilogue if nothing drops through.
(output_move_double): Supress int ldd usage on ultrasparc and v9.
(registers_ok_for_ldd_peep): Likewise.
(print_operand): Supress b,a on ultrasparc. Let Y accept a constant.
(ultrasparc_adjust_cost): New function.
(sparc_issue_rate): New function.
* sparc.h (MASK_VIS, TARGET_VIS): New
(MASK_V8PLUS, TARGET_V8PLUS): New.
(TARGET_HARD_MUL32, TARGET_HARD_MUL): New.
(TARGET_SWITCHES): Add vis and v8plus.
(REG_CLASS_FROM_LETTER): Accept d and b for VIS.
(REGISTER_MOVE_COST): FP<->INT move cost 12 for ultrasparc.
(RTX_COSTS): Use TARGET_HARD_MUL
(ADJUST_COST): Call ultrasparc_adjust_cost.
(ISSUE_RATE): New.
* sparc.md (attr type): Add sload, fpmove, fpcmove. Adjust users
of load & fp appropritely.
(supersparc function units): Adjust for Haifa.
(ultrasparc function units): Likewise.
(get_pc_via_rdpc): All v9, not just arch64.
(movdi_v8plus, movdi_v8plus+1): New.
(adddi3_sp32+1): New.
(subdi3_sp32+1): New.
(movsi_insn, movsf_const_insn, movdf_const_insn): Know VIS.
(addsi3, subsi3, anddi3_sp32, andsi3, and_not_di_sp32): Likewise.
(and_not_si, iordi3_sp32, iorsi3, or_not_di_sp32, or_not_si): Likewise.
(xorsi3_sp32, xorsi3, xor_not_di_sp32, xor_not_si): Likewise.
(one_cmpldi2_sp32, one_cmplsi2): Likewise.
(ldd peepholes): Suppress for v9.
(return_adddi): Kill redundant test. Arg1 may be arith_operand.
(return_subsi): Revmove.
From-SVN: r17560
1998-01-31 00:34:15 +01:00
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
/* MASK_APP_REGS must always be the default because that's what
|
|
|
|
|
FIXED_REGISTERS is set to and -ffixed- is processed before
|
2010-11-22 02:57:50 +01:00
|
|
|
|
TARGET_CONDITIONAL_REGISTER_USAGE is called (where we process
|
|
|
|
|
-mno-app-regs). */
|
sparc.c: Remove all references to TARGET_EPILOGUE.
* config/sparc/sparc.c: Remove all references to TARGET_EPILOGUE.
(sparc_emitting_epilogue): New.
(leaf_label, output_return, sparc_return_peephole_ok): Remove.
* config/sparc/sparc-protos.h: Update.
* config/sparc/sparc.h (MASK_EPILOGUE, TARGET_EPILOGUE): Remove.
(TARGET_SWITCHES): Update.
* config/sparc/sparc.md (return): Remove.
(return_*): Use sparc_emitting_epilogue, not !TARGET_EPILOGUE.
* config/sparc/freebsd.h, config/sparc/linux64.h, config/sparc/lite.h,
config/sparc/liteelf.h, config/sparc/netbsd-elf.h,
config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
config/sparc/sp64-aout.h, config/sparc/sp64-elf.h,
config/sparc/sp86x-aout.h, config/sparc/sp86x-elf.h,
config/sparc/splet.h, config/sparc/vxsparc64.h (TARGET_DEFAULT):
Remove MASK_EPILOGUE.
* doc/invoke.texi: Update.
From-SVN: r51626
2002-03-31 05:11:20 +02:00
|
|
|
|
#define TARGET_DEFAULT (MASK_APP_REGS + MASK_FPU)
|
1993-07-21 23:18:45 +02:00
|
|
|
|
|
1996-02-22 03:47:54 +01:00
|
|
|
|
/* Recast the cpu class to be the cpu attribute.
|
|
|
|
|
Every file includes us, but not every file includes insn-attr.h. */
|
|
|
|
|
#define sparc_cpu_attr ((enum attr_cpu) sparc_cpu)
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
|
config.gcc: Reorganize --with-cpu logic.
* config.gcc: Reorganize --with-cpu logic. Set
configure_default_options according to the default CPU, --with-cpu,
--with-arch, --with-tune, --with-schedule, --with-abi, and
--with-float. Check for legal values of various options.
* configure.in: Define configure_default_options in configargs.h.
* configure: Regenerated.
* config/mips/mips.h (TARGET_DEFAULT_ARCH_P)
(TARGET_DEFAULT_FLOAT_P): New macros.
* gcc.c (do_option_spec): New function.
(struct default_spec, option_default_specs): New.
(main): Call do_option_spec.
* config/alpha/alpha.h, config/arm/arm.h, config/i386/i386.h,
config/mips/mips.h, config/pa/pa.h, config/rs6000/rs6000.h,
config/sparc/sparc.h (OPTION_DEFAULT_SPECS): Define.
* doc/install.texi: Update --with-cpu documentation. Mention
--with-arch, --with-schedule, --with-tune, --with-abi, and
--with-float.
* doc/tm.texi (Driver): Document OPTION_DEFAULT_SPECS.
From-SVN: r67457
2003-06-04 19:50:44 +02:00
|
|
|
|
/* Support for a compile-time default CPU, et cetera. The rules are:
|
|
|
|
|
--with-cpu is ignored if -mcpu is specified.
|
|
|
|
|
--with-tune is ignored if -mtune is specified.
|
|
|
|
|
--with-float is ignored if -mhard-float, -msoft-float, -mfpu, or -mno-fpu
|
|
|
|
|
are specified. */
|
|
|
|
|
#define OPTION_DEFAULT_SPECS \
|
|
|
|
|
{"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }, \
|
|
|
|
|
{"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
|
2011-02-17 14:57:21 +01:00
|
|
|
|
{"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
|
|
|
|
/* target machine storage layout */
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Define this if most significant bit is lowest numbered
|
|
|
|
|
in instructions that operate on numbered bit-fields. */
|
|
|
|
|
#define BITS_BIG_ENDIAN 1
|
|
|
|
|
|
|
|
|
|
/* Define this if most significant byte of a word is the lowest numbered. */
|
|
|
|
|
#define BYTES_BIG_ENDIAN 1
|
|
|
|
|
|
|
|
|
|
/* Define this if most significant word of a multiword number is the lowest
|
|
|
|
|
numbered. */
|
|
|
|
|
#define WORDS_BIG_ENDIAN 1
|
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define MAX_BITS_PER_WORD 64
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Width of a word, in units (bytes). */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define UNITS_PER_WORD (TARGET_ARCH64 ? 8 : 4)
|
2002-04-04 14:27:27 +02:00
|
|
|
|
#ifdef IN_LIBGCC2
|
|
|
|
|
#define MIN_UNITS_PER_WORD UNITS_PER_WORD
|
|
|
|
|
#else
|
1995-02-11 01:06:12 +01:00
|
|
|
|
#define MIN_UNITS_PER_WORD 4
|
2002-04-04 14:27:27 +02:00
|
|
|
|
#endif
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
|
|
|
|
/* Now define the sizes of the C data types. */
|
|
|
|
|
|
|
|
|
|
#define SHORT_TYPE_SIZE 16
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
#define INT_TYPE_SIZE 32
|
|
|
|
|
#define LONG_TYPE_SIZE (TARGET_ARCH64 ? 64 : 32)
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define LONG_LONG_TYPE_SIZE 64
|
|
|
|
|
#define FLOAT_TYPE_SIZE 32
|
|
|
|
|
#define DOUBLE_TYPE_SIZE 64
|
2008-09-18 16:25:39 +02:00
|
|
|
|
|
2004-03-26 12:13:48 +01:00
|
|
|
|
/* LONG_DOUBLE_TYPE_SIZE is defined per OS even though the
|
|
|
|
|
SPARC ABI says that it is 128-bit wide. */
|
|
|
|
|
/* #define LONG_DOUBLE_TYPE_SIZE 128 */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2008-09-18 16:25:39 +02:00
|
|
|
|
/* The widest floating-point format really supported by the hardware. */
|
|
|
|
|
#define WIDEST_HARDWARE_FP_SIZE 64
|
|
|
|
|
|
2009-04-22 10:59:26 +02:00
|
|
|
|
/* Width in bits of a pointer. This is the size of ptr_mode. */
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define POINTER_SIZE (TARGET_PTR64 ? 64 : 32)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2009-04-22 10:59:26 +02:00
|
|
|
|
/* This is the machine mode used for addresses. */
|
|
|
|
|
#define Pmode (TARGET_ARCH64 ? DImode : SImode)
|
|
|
|
|
|
2001-01-02 03:45:03 +01:00
|
|
|
|
/* If we have to extend pointers (only when TARGET_ARCH64 and not
|
|
|
|
|
TARGET_PTR64), we want to do it unsigned. This macro does nothing
|
|
|
|
|
if ptr_mode and Pmode are the same. */
|
|
|
|
|
#define POINTERS_EXTEND_UNSIGNED 1
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define PARM_BOUNDARY (TARGET_ARCH64 ? 64 : 32)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Boundary (in *bits*) on which stack pointer should be aligned. */
|
2003-10-07 21:48:23 +02:00
|
|
|
|
/* FIXME, this is wrong when TARGET_ARCH64 and TARGET_STACK_BIAS, because
|
2005-10-20 14:14:30 +02:00
|
|
|
|
then %sp+2047 is 128-bit aligned so %sp is really only byte-aligned. */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define STACK_BOUNDARY (TARGET_ARCH64 ? 128 : 64)
|
2005-10-20 14:14:30 +02:00
|
|
|
|
/* Temporary hack until the FIXME above is fixed. */
|
2003-10-07 21:48:23 +02:00
|
|
|
|
#define SPARC_STACK_BOUNDARY_HACK (TARGET_ARCH64 && TARGET_STACK_BIAS)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1992-06-29 19:34:10 +02:00
|
|
|
|
/* ALIGN FRAMES on double word boundaries */
|
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define SPARC_STACK_ALIGN(LOC) \
|
1996-01-25 15:16:13 +01:00
|
|
|
|
(TARGET_ARCH64 ? (((LOC)+15) & ~15) : (((LOC)+7) & ~7))
|
1992-06-29 19:34:10 +02:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Allocation boundary (in *bits*) for the code of a function. */
|
flags.h: New variables align_loops...
* flags.h: New variables align_loops, align_loops_log,
align_jumps, align_jumps_log, align_labels, align_labels_log,
align_functions, align_functions_log.
* toplev.c: Define them.
(f_options): Handle -falign-* when they have no argument.
(main): Add logic to set variables for -falign-functions,
-falign-jumps, -falign-labels, -falign-loops.
Make it -fsched-verbose=<n> and -finline-limit=<n>.
(display_help): Change help to match options.
* final.c (LABEL_ALIGN): Default to align_labels_log.
(LABEL_ALIGN_MAX_SKIP): Default to align_labels-1.
(LOOP_ALIGN): Default to align_loops_log.
(LOOP_ALIGN_MAX_SKIP): Default to align_loops-1.
(LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1.
* varasm.c (assemble_start_function): Handle align_functions.
* config/sparc/sparc.h: Don't declare sparc_align_*.
Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN.
(DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into
sparc.c.
(FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request,
it's a promise.
* config/sparc/sparc.c: Delete sparc_align_loops,
sparc_align_jumps, sparc_align_funcs and the corresponding string
variables.
(sparc_override_options): Default align_functions on ultrasparc.
Delete -malign-* handling.
* config/mips/mips.c (override_options): On 64-bit targets,
try to align code to 64-bit boundaries.
(print_operand): New substitution, %~,
which aligns labels to align_labels_log.
* config/mips/mips.md (div_trap_normal): Use %~.
(div_trap_mips16): Likewise.
(abssi): Likewise.
(absdi2): Likewise.
(ffssi2): Likewise.
(ffsdi2): Likewise.
(ashldi3_internal): Likewise.
(ashrdi3_internal): Likewise.
(lshrdi3_internal): Likewise.
(casesi_internal): Likewise.
Plus corresponding documentation changes.
From-SVN: r29045
1999-09-02 07:42:06 +02:00
|
|
|
|
#define FUNCTION_BOUNDARY 32
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Alignment of field after `int : 0' in a structure. */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define EMPTY_FIELD_BOUNDARY (TARGET_ARCH64 ? 64 : 32)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Every structure's size must be a multiple of this. */
|
|
|
|
|
#define STRUCTURE_SIZE_BOUNDARY 8
|
|
|
|
|
|
2002-09-24 14:49:05 +02:00
|
|
|
|
/* A bit-field declared as `int' forces `int' alignment for the struct. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define PCC_BITFIELD_TYPE_MATTERS 1
|
|
|
|
|
|
|
|
|
|
/* No data type wants to be aligned rounder than this. */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define BIGGEST_ALIGNMENT (TARGET_ARCH64 ? 128 : 64)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1992-06-03 22:40:18 +02:00
|
|
|
|
/* The best alignment to use in cases where we have a choice. */
|
|
|
|
|
#define FASTEST_ALIGNMENT 64
|
|
|
|
|
|
1999-11-30 13:02:09 +01:00
|
|
|
|
/* Define this macro as an expression for the alignment of a structure
|
|
|
|
|
(given by STRUCT as a tree node) if the alignment computed in the
|
|
|
|
|
usual way is COMPUTED and the alignment explicitly specified was
|
|
|
|
|
SPECIFIED.
|
|
|
|
|
|
|
|
|
|
The default is to use SPECIFIED if it is larger; otherwise, use
|
|
|
|
|
the smaller of COMPUTED and `BIGGEST_ALIGNMENT' */
|
|
|
|
|
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
|
|
|
|
|
(TARGET_FASTER_STRUCTS ? \
|
|
|
|
|
((TREE_CODE (STRUCT) == RECORD_TYPE \
|
|
|
|
|
|| TREE_CODE (STRUCT) == UNION_TYPE \
|
|
|
|
|
|| TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
|
|
|
|
|
&& TYPE_FIELDS (STRUCT) != 0 \
|
|
|
|
|
? MAX (MAX ((COMPUTED), (SPECIFIED)), BIGGEST_ALIGNMENT) \
|
|
|
|
|
: MAX ((COMPUTED), (SPECIFIED))) \
|
|
|
|
|
: MAX ((COMPUTED), (SPECIFIED)))
|
|
|
|
|
|
2011-07-09 12:13:56 +02:00
|
|
|
|
/* We need 2 words, so we can save the stack pointer and the return register
|
|
|
|
|
of the function containing a non-local goto target. */
|
|
|
|
|
#define STACK_SAVEAREA_MODE(LEVEL) \
|
|
|
|
|
((LEVEL) == SAVE_NONLOCAL ? (TARGET_ARCH64 ? TImode : DImode) : Pmode)
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Make strings word-aligned so strcpy from constants will be faster. */
|
|
|
|
|
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
|
1992-07-20 05:43:59 +02:00
|
|
|
|
((TREE_CODE (EXP) == STRING_CST \
|
|
|
|
|
&& (ALIGN) < FASTEST_ALIGNMENT) \
|
|
|
|
|
? FASTEST_ALIGNMENT : (ALIGN))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Make arrays of chars word-aligned for the same reasons. */
|
|
|
|
|
#define DATA_ALIGNMENT(TYPE, ALIGN) \
|
|
|
|
|
(TREE_CODE (TYPE) == ARRAY_TYPE \
|
|
|
|
|
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
|
1992-06-03 22:40:18 +02:00
|
|
|
|
&& (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2007-10-16 22:43:02 +02:00
|
|
|
|
/* Make local arrays of chars word-aligned for the same reasons. */
|
|
|
|
|
#define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN)
|
|
|
|
|
|
1992-03-14 06:17:01 +01:00
|
|
|
|
/* Set this nonzero if move instructions will actually fail to work
|
1992-01-30 21:58:19 +01:00
|
|
|
|
when given unaligned data. */
|
1992-03-14 06:17:01 +01:00
|
|
|
|
#define STRICT_ALIGNMENT 1
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Things that must be doubleword aligned cannot go in the text section,
|
|
|
|
|
because the linker fails to align the text section enough!
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
Put them in the data section. This macro is only used in this file. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define MAX_TEXT_ALIGN 32
|
|
|
|
|
|
|
|
|
|
/* Standard register usage. */
|
|
|
|
|
|
|
|
|
|
/* Number of actual hardware registers.
|
|
|
|
|
The hardware registers are assigned numbers for the compiler
|
|
|
|
|
from 0 to just below FIRST_PSEUDO_REGISTER.
|
|
|
|
|
All registers that the compiler knows about must be given numbers,
|
|
|
|
|
even those that are not normally considered general registers.
|
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
SPARC has 32 integer registers and 32 floating point registers.
|
c4x.md, [...]: Follow spelling conventions.
* config/c4x/c4x.md, config/cris/cris.c, config/crx/crx.c,
config/fr30/fr30.md, config/i386/i386.h,
config/iq2000/iq2000.h, config/iq2000/predicates.md,
config/pa/milli64.S, config/pa/pa.c, config/pa/pa.h,
config/pa/pa.md, config/pa/pa32-regs.h, config/pa/pa64-regs.h,
config/pdp11/pdp11.c, config/pdp11/pdp11.h,
config/rs6000/altivec.md, config/rs6000/rs6000.c,
config/s390/s390-modes.def, config/sparc/netbsd-elf.h,
config/sparc/sparc.c, config/sparc/sparc.h,
config/sparc/sparc.md, config/spu/constraints.md,
config/spu/spu.c, config/stormy16/stormy16.md: Follow spelling
conventions.
From-SVN: r122151
2007-02-20 03:26:06 +01:00
|
|
|
|
64-bit SPARC has 32 additional fp regs, but the odd numbered ones are not
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
accessible. We still account for them to simplify register computations
|
darwin-c.c, [...]: Fix comment typos.
* config/darwin-c.c, config/arc/arc.c, config/arc/arc.md,
config/arm/README-interworking, config/arm/arm-cores.def,
config/arm/arm.c, config/arm/arm.h, config/arm/pe.c,
config/arm/vfp.md, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris.c, config/cris/cris.h, config/fr30/fr30.c,
config/fr30/fr30.h, config/fr30/fr30.md, config/frv/frv.c,
config/frv/frv.md, config/i386/winnt.c,
config/ia64/unwind-ia64.c, config/iq2000/iq2000.c,
config/iq2000/iq2000.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.md, config/m68k/m68k.c,
config/mcore/mcore.c, config/mips/mips.h,
config/mn10300/mn10300.md, config/pa/pa.c,
config/pa/pa64-regs.h, config/pdp11/pdp11.c,
config/rs6000/rs6000.c, config/sh/symbian.c,
config/sparc/sparc.h: Fix comment typos. Follow spelling
conventions.
From-SVN: r87706
2004-09-18 21:19:40 +02:00
|
|
|
|
(e.g.: in CLASS_MAX_NREGS). There are also 4 fp condition code registers, so
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
32+32+32+4 == 100.
|
2002-02-04 19:16:07 +01:00
|
|
|
|
Register 100 is used as the integer condition code register.
|
|
|
|
|
Register 101 is used as the soft frame pointer register. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
#define FIRST_PSEUDO_REGISTER 103
|
1996-02-22 03:47:54 +01:00
|
|
|
|
|
2011-10-23 23:50:56 +02:00
|
|
|
|
#define SPARC_FIRST_INT_REG 0
|
|
|
|
|
#define SPARC_LAST_INT_REG 31
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
#define SPARC_FIRST_FP_REG 32
|
1996-02-22 03:47:54 +01:00
|
|
|
|
/* Additional V9 fp regs. */
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
#define SPARC_FIRST_V9_FP_REG 64
|
|
|
|
|
#define SPARC_LAST_V9_FP_REG 95
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
/* V9 %fcc[0123]. V8 uses (figuratively) %fcc0. */
|
|
|
|
|
#define SPARC_FIRST_V9_FCC_REG 96
|
|
|
|
|
#define SPARC_LAST_V9_FCC_REG 99
|
|
|
|
|
/* V8 fcc reg. */
|
|
|
|
|
#define SPARC_FCC_REG 96
|
|
|
|
|
/* Integer CC reg. We don't distinguish %icc from %xcc. */
|
|
|
|
|
#define SPARC_ICC_REG 100
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
#define SPARC_GSR_REG 102
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
/* Nonzero if REGNO is an fp reg. */
|
|
|
|
|
#define SPARC_FP_REG_P(REGNO) \
|
|
|
|
|
((REGNO) >= SPARC_FIRST_FP_REG && (REGNO) <= SPARC_LAST_V9_FP_REG)
|
|
|
|
|
|
2011-10-23 23:50:56 +02:00
|
|
|
|
/* Nonzero if REGNO is an int reg. */
|
|
|
|
|
#define SPARC_INT_REG_P(REGNO) \
|
|
|
|
|
(((unsigned) (REGNO)) <= SPARC_LAST_INT_REG)
|
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
/* Argument passing regs. */
|
|
|
|
|
#define SPARC_OUTGOING_INT_ARG_FIRST 8
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define SPARC_INCOMING_INT_ARG_FIRST (TARGET_FLAT ? 8 : 24)
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
#define SPARC_FP_ARG_FIRST 32
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* 1 for registers that have pervasive standard uses
|
|
|
|
|
and are not available for the register allocator.
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
On non-v9 systems:
|
1994-01-31 21:34:58 +01:00
|
|
|
|
g1 is free to use as temporary.
|
|
|
|
|
g2-g4 are reserved for applications. Gcc normally uses them as
|
|
|
|
|
temporaries, but this can be disabled via the -mno-app-regs option.
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
g5 through g7 are reserved for the operating system.
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
On v9 systems:
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
g1,g5 are free to use as temporaries, and are free to use between calls
|
|
|
|
|
if the call is to an external function via the PLT.
|
|
|
|
|
g4 is free to use as a temporary in the non-embedded case.
|
|
|
|
|
g4 is reserved in the embedded case.
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
g2-g3 are reserved for applications. Gcc normally uses them as
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
temporaries, but this can be disabled via the -mno-app-regs option.
|
sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
(DEFAULT_ARCH32_P): New macro.
(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
(enum cmodel): Declare.
(sparc_cmodel_string,sparc_cmodel): Declare.
(SPARC_DEFAULT_CMODEL): Provide default.
(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
(TARGET_FULLANY): Deleted.
(TARGET_CM_MEDMID): New macro.
(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
(CPP_SPEC): Rewrite.
(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
(ASM_SPEC): Add %(asm_arch).
(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
Rename asm_default to asm_cpu_default.
Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
(MASK_INT64,MASK_LONG64): Delete.
(MASK_ARCH64): Renamed to MASK_64BIT.
(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
(TARGET_SWITCHES): Always provide 64 bit options.
(ARCH64_SWITCHES): Delete.
(TARGET_OPTIONS): New option -mcmodel=.
(INT_TYPE_SIZE): Always 32.
(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
* sparc/linux.h: Likewise.
* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(LONG_DOUBLE_TYPE_SIZE): Define.
(ASM_SPEC): Add %(asm_arch).
* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(TARGET_CPU_DEFAULT): Add ultrasparc case.
* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
(SPARC_DEFAULT_CMODEL): Define.
* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete
MASK_LONG64, MASK_MEDANY.
(SPARC_DEFAULT_CMODEL): Define.
(CPP_PREDEFINES): Delete.
(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
(ASM_SPEC): Add %(asm_arch).
(LONG_DOUBLE_TYPE_SIZE): Define.
(DWARF2_DEBUGGING_INFO): Define.
* sparc/splet.h (CPP_SPEC): Delete.
* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
(BLOCK_PROFILER): Likewise.
* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
(sparc_override_options): Handle code model selection.
(sparc_init_expanders): Renamed from sparc64_init_expanders.
* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
(sethi_di_fullany): Delete.
From-SVN: r16108
1997-10-20 22:49:22 +02:00
|
|
|
|
g6-g7 are reserved for the operating system (or application in
|
|
|
|
|
embedded case).
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
??? Register 1 is used as a temporary by the 64 bit sethi pattern, so must
|
|
|
|
|
currently be a fixed register until this pattern is rewritten.
|
|
|
|
|
Register 1 is also used when restoring call-preserved registers in large
|
1996-02-22 03:47:54 +01:00
|
|
|
|
stack frames.
|
|
|
|
|
|
|
|
|
|
Registers fixed in arch32 and not arch64 (or vice-versa) are marked in
|
2010-11-22 02:57:50 +01:00
|
|
|
|
TARGET_CONDITIONAL_REGISTER_USAGE in order to properly handle -ffixed-.
|
1996-02-22 03:47:54 +01:00
|
|
|
|
*/
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
|
|
|
|
#define FIXED_REGISTERS \
|
1999-11-30 23:18:21 +01:00
|
|
|
|
{1, 0, 2, 2, 2, 2, 1, 1, \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
0, 0, 0, 0, 0, 0, 1, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 1, \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
\
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
\
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
|
|
|
|
\
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
0, 0, 0, 0, 0, 1, 1}
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* 1 for registers not available across function calls.
|
|
|
|
|
These must include the FIXED_REGISTERS and also any
|
|
|
|
|
registers that can be used without being saved.
|
|
|
|
|
The latter must include the registers where values are returned
|
|
|
|
|
and the register where structure-value addresses are passed.
|
|
|
|
|
Aside from that, you can include as many other registers as you like. */
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
#define CALL_USED_REGISTERS \
|
|
|
|
|
{1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 1, \
|
sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
* sparc/sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text.
(MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define.
(LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used.
* sparc/sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define.
({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo.
(SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__.
(CPP_SPEC): Add %(cpp_cpu).
(CPP_CPU_SPEC): Define.
(CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>.
(ASM_SPEC): Add %(asm_cpu).
(ASM_CPU_SPEC): Define.
(EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define.
(OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after
sparc_override_options.
({MASK,TARGET}_SUPERSPARC): Delete.
({MASK,TARGET}_SPARCLET): Define.
(MASK_ISA): Renamed from MASK_CPUS.
({MASK,TARGET}_FRW): Delete.
(TARGET_SWITCHES): Delete no-{v8,sparclite}.
(sparc_cpu,sparc_cpu_string): Declare.
({SUB,}TARGET_OPTIONS): Define.
(FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode.
(CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64.
Don't set call_used_regs[48..80] for sparc64 in 32 bit mode.
Don't clobber fixed_regs[234] if -ffixed- was passed.
(FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET,
BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO,
FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW
renamed to TARGET_FLAT.
(ADJUST_COST): Change test for supersparc.
From-SVN: r11320
1996-02-20 01:17:04 +01:00
|
|
|
|
\
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
\
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, \
|
|
|
|
|
\
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
1, 1, 1, 1, 1, 1, 1}
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Return number of consecutive hard regs needed starting at reg REGNO
|
|
|
|
|
to hold something of mode MODE.
|
|
|
|
|
This is ordinarily the length in words of a value of mode MODE
|
|
|
|
|
but can be less for certain modes in special long registers.
|
|
|
|
|
|
|
|
|
|
On SPARC, ordinary registers hold 32 bits worth;
|
|
|
|
|
this means both integer and floating point registers.
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
On v9, integer regs hold 64 bits worth; floating point regs hold
|
|
|
|
|
32 bits worth (this includes the new fp regs as even the odd ones are
|
|
|
|
|
included in the hard register count). */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define HARD_REGNO_NREGS(REGNO, MODE) \
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
((REGNO) == SPARC_GSR_REG ? 1 : \
|
|
|
|
|
(TARGET_ARCH64 \
|
2011-10-23 23:50:56 +02:00
|
|
|
|
? (SPARC_INT_REG_P (REGNO) || (REGNO) == FRAME_POINTER_REGNUM \
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
? (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD \
|
|
|
|
|
: (GET_MODE_SIZE (MODE) + 3) / 4) \
|
|
|
|
|
: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2003-07-03 18:25:52 +02:00
|
|
|
|
/* Due to the ARCH64 discrepancy above we must override this next
|
2001-11-27 16:32:18 +01:00
|
|
|
|
macro too. */
|
2011-11-21 22:50:58 +01:00
|
|
|
|
#define REGMODE_NATURAL_SIZE(MODE) sparc_regmode_natural_size (MODE)
|
1998-04-18 03:24:59 +02:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
|
1994-02-20 21:47:44 +01:00
|
|
|
|
See sparc.c for how we initialize this. */
|
arc.c (arc_hard_regno_mode_ok): Const-ify.
* arc.c (arc_hard_regno_mode_ok): Const-ify.
* arc.h (arc_hard_regno_mode_ok): Likewise.
* i386.c (x86_64_reg_class_name): Make static.
* m68k.c (regno_reg_class): Const-ify.
* m68k.h (regno_reg_class): Likewise.
* mcore.c (reg_class_from_letter): Likewise.
* mcore.h (reg_class_from_letter): Likewise.
* sh.c (reg_class_from_letter, ashiftrt_insns, shift_insns,
ext_shift_insns, ext_shift_amounts): Likewise.
* sh.h (reg_class_from_letter): Likewise.
* sparc.c (hard_regno_mode_classes, hard_32bit_mode_classes,
hard_64bit_mode_classes): Likewise.
* sparc.h (hard_regno_mode_classes): Likewise.
* gcc.c (modify_target): Make static.
* gengenrtl.c (defs, formats): Likewise.
* reload1.c (elim_table_1, init_elim_table): Const-ify.
* tradcpp.c (directive, directive_table, handle_directive,
skip_if_group, run_directive): Likewise.
cp:
* decl2.c (lang_f_options): Const-ify.
f:
* com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_,
ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify.
java:
* Make-lang.in (keyword.h): Pass -C to gperf to const-ify
the static arrays that are output.
* jvspec.c (jvgenmain_spec): Make static.
* keyword.gperf (struct java_keyword, java_keyword): Const-ify.
* keyword.h: Regenerate.
* lang.c (string_option, process_option_with_no, lang_f_options,
lang_W_options): Const-ify.
* lex.c (java_lex): Likewise.
From-SVN: r48290
2001-12-23 17:07:16 +01:00
|
|
|
|
extern const int *hard_regno_mode_classes;
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
extern int sparc_mode_class[];
|
Use byte offsets in SUBREGs instead of words.
2001-04-03 Jakub Jelinek <jakub@redhat.com>
David S. Miller <davem@pierdol.cobaltmicro.com>
Andrew MacLeod <amacleod@redhat.com>
Use byte offsets in SUBREGs instead of words.
* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
to pass new argument.
(add_stored_regs): Use subreg_regno_offset function.
* calls.c (expand_call): For non-paradoxical SUBREG take endianess
into account.
(precompute_arguments): Use gen_lowpart_SUBREG.
* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
(combine_simplify_rtx): Rework to use SUBREG_BYTE.
(simplify_set): Rework to use SUBREG_BYTE.
(expand_field_assignment): Use SUBREG_BYTE.
(make_extraction): Use SUBREG_BYTE.
(if_then_else_cond): Use SUBREG_BYTE.
(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
(gen_lowpart_for_combine): Compute full byte offset.
* cse.c (mention_regs): Use SUBREG_BYTE.
(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
(canon_hash): Use SUBREG_BYTE.
(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
(gen_lowpart_if_possible): Formatting.
* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
correctly.
* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
certain invariants about SUBREGs the compiler creates.
(gen_lowpart_SUBREG): New function.
(subreg_hard_regno): New function to get the final register number.
(gen_lowpart_common): Use SUBREG_BYTE.
(gen_imagpart): Spacing nits.
(subreg_realpart_p): Use SUBREG_BYTE.
(gen_highpart): Use SUBREG_BYTE.
(subreg_lowpart_p): Always compute endian corrected goal offset,
even at the byte level, then compare against that.
(constant_subword): New function, pulled out all constant cases
from operand_subword and changed second argument name to offset.
(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
and call constant_subword to do the work. Return const0_rtx if
looking for a word outside of OP.
(operand_subword_force): Change second arg name to offset.
* expmed.c (store_bit_field): Use SUBREG_BYTE.
(store_split_bit_field): Use SUBREG_BYTE.
(extract_bit_field): Use SUBREG_BYTE.
(extract_split_bit_field): Use SUBREG_BYTE.
(expand_shift): Use SUBREG_BYTE.
* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
* flow.c (set_noop_p): Use SUBREG_BYTE.
(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
correction code.
(optimize_bit_field): Use SUBREG_BYTE.
(purge_addressof_1): Use SUBREG_BYTE.
(purge_single_hard_subreg_set): Use subreg_regno_offset function.
(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
* gengenrtl.c (special_rtx): Add SUBREG.
* global.c (mark_reg_store): Use SUBREG_BYTE.
(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
final byte offset is congruent to subreg's mode size.
(subst_constants): Use SUBREG_BYTE.
(mark_stores): Use subreg_regno_offset function.
* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
function and SUBREG_BYTE.
* local-alloc.c (combine_regs): Use subreg_regno_offset function.
(reg_is_born): Use subreg_hard_regno.
* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
endian correction code. Don't combine subregs unless resulting
offset aligns with type. Fix subreg constant extraction for DImode.
Simplify SUBREG of VOIDmode CONST_DOUBLE.
(general_operand): Remove dead mode_altering_drug code.
(indirect_operand): Use SUBREG_BYTE.
(constrain_operands): Use subreg_regno_offset function.
* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
* regmove.c (regmove_optimize): Use SUBREG_BYTE.
(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
* regs.h (REG_SIZE): Allow target to override.
(REGMODE_NATURAL_SIZE): New macro which target can override.
* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
on the entire subreg rtx.
(push_reload): Use SUBREG_BYTE in comments and code.
(find_dummy_reload): Use subreg_regno_offset. Only adjust offsets
for hard registers inside subregs.
(operands_match_p): Use subreg_regno_offset.
(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
containing hard regs.
(find_reload_toplev): Use SUBREG_BYTE. Remove byte endian
corrections when fixing up MEM subregs.
(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
subreg_regno_offset where appropriate.
(find_reloads_subreg_address): Use SUBREG_BYTE. Remove
byte endian corrections when fixing up MEM subregs.
(subst_reloads): When combining two subregs, make sure final
offset is congruent to subreg's mode size.
(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
(refers_to_regno_for_reload_p): Use subreg_regno.
(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
correction code for memory subreg fixups.
(forget_old_reload_1): Use subreg_regno_offset.
(choose_reload_regs): Use subreg_regno.
(emit_input_reload_insns): Use SUBREG_BYTE.
(reload_combine_note_store): Use subreg_regno_offset.
(move2add_note_store): Use subreg_regno_offset.
* resource.c (update_live_status, mark_referenced_resources): Use
subreg_regno function.
(mark_set_resources): Use subreg_regno function.
* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
(subreg_regno_offset, subreg_regno): Define prototypes.
(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
(gen_lowpart_SUBREG): Add prototype.
* rtl.texi (subreg): Update to reflect new byte offset representation.
Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
* rtlanal.c (refers_to_regno_p): Use subreg_regno.
(reg_overlap_mentioned_p): Use subreg_regno.
(replace_regs); Make sure final offset of combined subreg is
congruent to size of subreg's mode.
(subreg_regno_offset): New function.
(subreg_regno): New function.
* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
(a29k_get_reloaded_address): Use SUBREG_BYTE.
(print_operand): Use SUBREG_BYTE.
* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
(arm_reload_out_hi): Use SUBREG_BYTE.
* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
instead of SUBREG_WORD.
(d30v_print_operand_memory_reference): Use subreg_regno_offset.
* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
SUBREG creation to use byte offset.
* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
inverted load insns): Fix explicit rtl subregs to use byte
offsets.
* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
udivsi3, umodsi3): Generate SUBREGs with byte offsets.
* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
to use byte offsets.
(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
offsets, also make sure it is congruent to SUBREG's mode size.
(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
unnamed ldob insn): Generate SUBREGs with byte offset.
(zero_extendqihi2): SUBREG's are byte offsets.
* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
(m68hc11_gen_highpart): Use SUBREG_BYTE.
* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
zero-extendqisi2): Generate SUBREGs with byte offset.
(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
subregs in rtl to use byte offsets.
* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
(mips_move_2words): Use subreg_regno_offset.
(mips_secondary_reload_class): Use subreg_regno_offset.
* config/mips/mips.md (DImode plus, minus, move, and logical op
splits): Fixup explicit subregs in rtl to use byte offsets.
* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
rtl to use byte offsets.
* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
subregs to use byte offsets.
* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
Fixup explicit subregs in rtl to use byte offsets.
* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
and remove byte endian correction code.
* config/sh/sh.c (output_movedouble): Use subreg_regno.
(gen_ashift_hi): Use SUBREG_BYTE.
(regs_used): Use subreg_regno_offset.
(machine_dependent_reorg): Use subreg_regno_offset.
* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
(movdf_i4): Subregs are byte offsets now.
* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
(REGMODE_NATURAL_SIZE): Override.
(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
with byte offsets.
(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
extendqidi2): Generate SUBREGs with byte offsets, also make sure
it is congruent to SUBREG's mode size.
(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
offsets.
(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
SUBREG_BYTE offset for non-paradoxical subregs in patterns.
* config/v850/v850.c (print_operand, output_move_double): Use
subreg_regno function.
Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>
From-SVN: r41058
2001-04-03 17:06:12 +02:00
|
|
|
|
|
|
|
|
|
/* ??? Because of the funny way we pass parameters we should allow certain
|
|
|
|
|
??? types of float/complex values to be in integer registers during
|
|
|
|
|
??? RTL generation. This only matters on arch32. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
((hard_regno_mode_classes[REGNO] & sparc_mode_class[MODE]) != 0)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2006-01-10 19:50:07 +01:00
|
|
|
|
/* Value is 1 if it is OK to rename a hard register FROM to another hard
|
|
|
|
|
register TO. We cannot rename %g1 as it may be used before the save
|
|
|
|
|
register window instruction in the prologue. */
|
|
|
|
|
#define HARD_REGNO_RENAME_OK(FROM, TO) ((FROM) != 1)
|
|
|
|
|
|
2011-11-21 22:50:58 +01:00
|
|
|
|
#define MODES_TIEABLE_P(MODE1, MODE2) sparc_modes_tieable_p (MODE1, MODE2)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Specify the registers used for certain standard purposes.
|
|
|
|
|
The values of these macros are register numbers. */
|
|
|
|
|
|
|
|
|
|
/* Register to use for pushing function arguments. */
|
|
|
|
|
#define STACK_POINTER_REGNUM 14
|
|
|
|
|
|
2002-02-04 19:16:07 +01:00
|
|
|
|
/* The stack bias (amount by which the hardware register is offset by). */
|
|
|
|
|
#define SPARC_STACK_BIAS ((TARGET_ARCH64 && TARGET_STACK_BIAS) ? 2047 : 0)
|
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
/* Actual top-of-stack address is 92/176 greater than the contents of the
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
stack pointer register for !v9/v9. That is:
|
|
|
|
|
- !v9: 64 bytes for the in and local registers, 4 bytes for structure return
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
address, and 6*4 bytes for the 6 register parameters.
|
|
|
|
|
- v9: 128 bytes for the in and local registers + 6*8 bytes for the integer
|
|
|
|
|
parameter regs. */
|
2002-02-04 19:16:07 +01:00
|
|
|
|
#define STACK_POINTER_OFFSET (FIRST_PARM_OFFSET(0) + SPARC_STACK_BIAS)
|
sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
* sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
(TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=,
-malign-functions=.
(sparc_align_{loops,jumps,funcs}_string): Declare.
(sparc_align_{loops,jumps,funcs}): Declare.
(DEFAULT_SPARC_ALIGN_FUNCS): New macro.
(FUNCTION_BOUNDARY): Use sparc_align_funcs.
(STACK_BIAS): Define.
(SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform
test.
(SPARC_SETHI_P): New macro.
(CONST_OK_FOR_LETTER_P): Use it.
(ASM_OUTPUT_ALIGN_CODE): Define.
(ASM_OUTPUT_LOOP_ALIGN): Define.
* sparc.h (ASM_COMMENT_START): Define.
* sparc/sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print
ascii form as well.
From-SVN: r15708
1997-09-25 03:14:03 +02:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Base register for access to local variables of the function. */
|
2002-02-04 19:16:07 +01:00
|
|
|
|
#define HARD_FRAME_POINTER_REGNUM 30
|
|
|
|
|
|
|
|
|
|
/* The soft frame pointer does not have the stack bias applied. */
|
|
|
|
|
#define FRAME_POINTER_REGNUM 101
|
|
|
|
|
|
|
|
|
|
/* Given the stack bias, the stack pointer isn't actually aligned. */
|
|
|
|
|
#define INIT_EXPANDERS \
|
|
|
|
|
do { \
|
function.h (rtl): Rename to x_rtl.
* function.h (rtl): Rename to x_rtl.
(crtl): New define.
(return_label, naked_return_label, stack_slot_list, parm_birth_insn,
frame_offset, stack_check_probe_note, arg_pointer_save_area,
used_temp_slots avail_temp_slots, temp_slot_level,
nonlocal_goto_handler_labels): Update accesstors.
(rtl): New global variable.
(struct function): Move some fileds to rtl_data.
(get_arg_pointer_save_area): Update prototype.
* builtins.c (expand_builtin_setjmp_receiver): Update call of
get_arg_pointer_save_area.
* expr.c (init_expr): Update
* function.c (get_frame_size): Update
(assign_stack_local): Update
(expand_function_end): Update.
(get_art_pointer_save_area): Update
* function.h
* emit-rtl.c (rtl): Declare.
(regno_reg_rtx): Declare.
(first_insn, last_insn, cur_insn_uid, last_location, first_label_num):
Update.
(gen_reg_rtx): Update.
* varasm.c (n_deferred_constatns): Update accestor.
(init_varasm_status): Do not allocate varasm_status.
(force_const_mem, get_pool_size, output_constant_pool): Update.
* stmt.c (force_label_rtx): Do not use x_ prefixes.
(expand_nl_goto_receiver): Update get_arg_pointer_save_area.
* m32c/m32.c (m32c_leaf_function_p, m32c_function_needs_enter): Update.
* sparc/sparc.h (INIT_EXPANDERS): Update.
* ia64/ia64.h (INIT_EXPANDERS): Update.
From-SVN: r133994
2008-04-08 01:52:32 +02:00
|
|
|
|
if (crtl->emit.regno_pointer_align && SPARC_STACK_BIAS) \
|
2002-02-04 19:16:07 +01:00
|
|
|
|
{ \
|
|
|
|
|
REGNO_POINTER_ALIGN (STACK_POINTER_REGNUM) = BITS_PER_UNIT; \
|
|
|
|
|
REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = BITS_PER_UNIT; \
|
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Base register for access to arguments of the function. */
|
1994-05-07 02:31:51 +02:00
|
|
|
|
#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1993-12-01 01:29:55 +01:00
|
|
|
|
/* Register in which static-chain is passed to a function. This must
|
1995-09-13 00:33:32 +02:00
|
|
|
|
not be a register used by the prologue. */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define STATIC_CHAIN_REGNUM (TARGET_ARCH64 ? 5 : 2)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2010-12-19 13:19:12 +01:00
|
|
|
|
/* Register which holds the global offset table, if any. */
|
|
|
|
|
|
|
|
|
|
#define GLOBAL_OFFSET_TABLE_REGNUM 23
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Register which holds offset table for position-independent
|
|
|
|
|
data references. */
|
|
|
|
|
|
2010-12-19 13:19:12 +01:00
|
|
|
|
#define PIC_OFFSET_TABLE_REGNUM \
|
|
|
|
|
(flag_pic ? GLOBAL_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1998-05-03 16:19:46 +02:00
|
|
|
|
/* Pick a default value we can notice from override_options:
|
|
|
|
|
!v9: Default is on.
|
2008-07-25 17:59:12 +02:00
|
|
|
|
v9: Default is off.
|
|
|
|
|
Originally it was -1, but later on the container of options changed to
|
|
|
|
|
unsigned byte, so we decided to pick 127 as default value, which does
|
|
|
|
|
reflect an undefined default value in case of 0/1. */
|
1998-05-03 16:19:46 +02:00
|
|
|
|
|
2008-07-25 17:59:12 +02:00
|
|
|
|
#define DEFAULT_PCC_STRUCT_RETURN 127
|
1998-05-03 16:19:46 +02:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Functions which return large structures get the address
|
|
|
|
|
to place the wanted value at offset 64 from the frame.
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
Must reserve 64 bytes for the in and local registers.
|
|
|
|
|
v9: Functions which return large structures get the address to place the
|
|
|
|
|
wanted value from an invisible first argument. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define STRUCT_VALUE_OFFSET 64
|
|
|
|
|
|
|
|
|
|
/* Define the classes of registers for register constraints in the
|
|
|
|
|
machine description. Also define ranges of constants.
|
|
|
|
|
|
|
|
|
|
One of the classes must always be named ALL_REGS and include all hard regs.
|
|
|
|
|
If there is more than one class, another class must be named NO_REGS
|
|
|
|
|
and contain no registers.
|
|
|
|
|
|
|
|
|
|
The name GENERAL_REGS must be the name of a class (or an alias for
|
|
|
|
|
another name such as ALL_REGS). This is the class of registers
|
|
|
|
|
that is allowed by "g" or "r" in a register constraint.
|
|
|
|
|
Also, registers outside this class are allocated only when
|
|
|
|
|
instructions express preferences for them.
|
|
|
|
|
|
|
|
|
|
The classes must be numbered in nondecreasing order; that is,
|
|
|
|
|
a larger-numbered class must never be contained completely
|
|
|
|
|
in a smaller-numbered class.
|
|
|
|
|
|
|
|
|
|
For any two classes, it is very desirable that there be another
|
|
|
|
|
class that represents their union. */
|
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
/* The SPARC has various kinds of registers: general, floating point,
|
|
|
|
|
and condition codes [well, it has others as well, but none that we
|
|
|
|
|
care directly about].
|
1994-08-02 20:41:16 +02:00
|
|
|
|
|
|
|
|
|
For v9 we must distinguish between the upper and lower floating point
|
|
|
|
|
registers because the upper ones can't hold SFmode values.
|
|
|
|
|
HARD_REGNO_MODE_OK won't help here because reload assumes that register(s)
|
|
|
|
|
satisfying a group need for a class will also satisfy a single need for
|
|
|
|
|
that class. EXTRA_FP_REGS is a bit of a misnomer as it covers all 64 fp
|
|
|
|
|
regs.
|
|
|
|
|
|
|
|
|
|
It is important that one class contains all the general and all the standard
|
|
|
|
|
fp regs. Otherwise find_reg() won't properly allocate int regs for moves,
|
|
|
|
|
because reg_class_record() will bias the selection in favor of fp regs,
|
|
|
|
|
because reg_class_subunion[GENERAL_REGS][FP_REGS] will yield FP_REGS,
|
|
|
|
|
because FP_REGS > GENERAL_REGS.
|
|
|
|
|
|
2005-04-26 19:55:32 +02:00
|
|
|
|
It is also important that one class contain all the general and all
|
|
|
|
|
the fp regs. Otherwise when spilling a DFmode reg, it may be from
|
|
|
|
|
EXTRA_FP_REGS but find_reloads() may use class
|
|
|
|
|
GENERAL_OR_FP_REGS. This will cause allocate_reload_reg() to die
|
|
|
|
|
because the compiler thinks it doesn't have a spill reg when in
|
|
|
|
|
fact it does.
|
1994-08-02 20:41:16 +02:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
v9 also has 4 floating point condition code registers. Since we don't
|
|
|
|
|
have a class that is the union of FPCC_REGS with either of the others,
|
|
|
|
|
it is important that it appear first. Otherwise the compiler will die
|
|
|
|
|
trying to compile _fixunsdfsi because fix_truncdfsi2 won't match its
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
constraints.
|
|
|
|
|
|
|
|
|
|
It is important that SPARC_ICC_REG have class NO_REGS. Otherwise combine
|
|
|
|
|
may try to use it to hold an SImode value. See register_operand.
|
1997-12-07 01:31:01 +01:00
|
|
|
|
??? Should %fcc[0123] be handled similarly?
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
*/
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
1998-04-18 03:24:59 +02:00
|
|
|
|
enum reg_class { NO_REGS, FPCC_REGS, I64_REGS, GENERAL_REGS, FP_REGS,
|
|
|
|
|
EXTRA_FP_REGS, GENERAL_OR_FP_REGS, GENERAL_OR_EXTRA_FP_REGS,
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
ALL_REGS, LIM_REG_CLASSES };
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
#define N_REG_CLASSES (int) LIM_REG_CLASSES
|
|
|
|
|
|
2001-11-03 17:38:52 +01:00
|
|
|
|
/* Give names of register classes as strings for dump file. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
#define REG_CLASS_NAMES \
|
1998-04-18 03:24:59 +02:00
|
|
|
|
{ "NO_REGS", "FPCC_REGS", "I64_REGS", "GENERAL_REGS", "FP_REGS", \
|
|
|
|
|
"EXTRA_FP_REGS", "GENERAL_OR_FP_REGS", "GENERAL_OR_EXTRA_FP_REGS", \
|
|
|
|
|
"ALL_REGS" }
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Define which registers fit in which classes.
|
|
|
|
|
This is an initializer for a vector of HARD_REG_SET
|
|
|
|
|
of length N_REG_CLASSES. */
|
|
|
|
|
|
2002-02-04 19:16:07 +01:00
|
|
|
|
#define REG_CLASS_CONTENTS \
|
|
|
|
|
{{0, 0, 0, 0}, /* NO_REGS */ \
|
|
|
|
|
{0, 0, 0, 0xf}, /* FPCC_REGS */ \
|
|
|
|
|
{0xffff, 0, 0, 0}, /* I64_REGS */ \
|
|
|
|
|
{-1, 0, 0, 0x20}, /* GENERAL_REGS */ \
|
|
|
|
|
{0, -1, 0, 0}, /* FP_REGS */ \
|
|
|
|
|
{0, -1, -1, 0}, /* EXTRA_FP_REGS */ \
|
|
|
|
|
{-1, -1, 0, 0x20}, /* GENERAL_OR_FP_REGS */ \
|
|
|
|
|
{-1, -1, -1, 0x20}, /* GENERAL_OR_EXTRA_FP_REGS */ \
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
{-1, -1, -1, 0x7f}} /* ALL_REGS */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2009-11-30 09:31:40 +01:00
|
|
|
|
/* The same information, inverted:
|
|
|
|
|
Return the class number of the smallest class containing
|
|
|
|
|
reg number REGNO. This could be a conditional expression
|
|
|
|
|
or could index an array. */
|
|
|
|
|
|
|
|
|
|
extern enum reg_class sparc_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
|
|
|
|
|
|
|
|
|
#define REGNO_REG_CLASS(REGNO) sparc_regno_reg_class[(REGNO)]
|
|
|
|
|
|
2004-01-27 14:29:26 +01:00
|
|
|
|
/* Defines invalid mode changes. Borrowed from pa64-regs.h.
|
|
|
|
|
|
|
|
|
|
SImode loads to floating-point registers are not zero-extended.
|
|
|
|
|
The definition for LOAD_EXTEND_OP specifies that integer loads
|
|
|
|
|
narrower than BITS_PER_WORD will be zero-extended. As a result,
|
|
|
|
|
we inhibit changes from SImode unless they are to a mode that is
|
|
|
|
|
identical in size. */
|
|
|
|
|
|
|
|
|
|
#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
|
|
|
|
|
(TARGET_ARCH64 \
|
|
|
|
|
&& (FROM) == SImode \
|
|
|
|
|
&& GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
|
|
|
|
|
? reg_classes_intersect_p (CLASS, FP_REGS) : 0)
|
|
|
|
|
|
2002-10-22 23:51:54 +02:00
|
|
|
|
/* This is the order in which to allocate registers normally.
|
|
|
|
|
|
2002-05-04 06:21:46 +02:00
|
|
|
|
We put %f0-%f7 last among the float registers, so as to make it more
|
1993-09-09 00:24:29 +02:00
|
|
|
|
likely that a pseudo-register which dies in the float return register
|
2002-05-04 06:21:46 +02:00
|
|
|
|
area will get allocated to the float return register, thus saving a move
|
|
|
|
|
instruction at the end of the function.
|
|
|
|
|
|
|
|
|
|
Similarly for integer return value registers.
|
|
|
|
|
|
|
|
|
|
We know in this case that we will not end up with a leaf function.
|
|
|
|
|
|
2003-07-03 18:25:52 +02:00
|
|
|
|
The register allocator is given the global and out registers first
|
2002-05-04 06:21:46 +02:00
|
|
|
|
because these registers are call clobbered and thus less useful to
|
|
|
|
|
global register allocation.
|
|
|
|
|
|
|
|
|
|
Next we list the local and in registers. They are not call clobbered
|
|
|
|
|
and thus very useful for global register allocation. We list the input
|
|
|
|
|
registers before the locals so that it is more likely the incoming
|
|
|
|
|
arguments received in those registers can just stay there and not be
|
|
|
|
|
reloaded. */
|
1996-02-22 03:47:54 +01:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define REG_ALLOC_ORDER \
|
2002-05-04 06:21:46 +02:00
|
|
|
|
{ 1, 2, 3, 4, 5, 6, 7, /* %g1-%g7 */ \
|
|
|
|
|
13, 12, 11, 10, 9, 8, /* %o5-%o0 */ \
|
|
|
|
|
15, /* %o7 */ \
|
|
|
|
|
16, 17, 18, 19, 20, 21, 22, 23, /* %l0-%l7 */ \
|
|
|
|
|
29, 28, 27, 26, 25, 24, 31, /* %i5-%i0,%i7 */\
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
40, 41, 42, 43, 44, 45, 46, 47, /* %f8-%f15 */ \
|
|
|
|
|
48, 49, 50, 51, 52, 53, 54, 55, /* %f16-%f23 */ \
|
|
|
|
|
56, 57, 58, 59, 60, 61, 62, 63, /* %f24-%f31 */ \
|
|
|
|
|
64, 65, 66, 67, 68, 69, 70, 71, /* %f32-%f39 */ \
|
|
|
|
|
72, 73, 74, 75, 76, 77, 78, 79, /* %f40-%f47 */ \
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
80, 81, 82, 83, 84, 85, 86, 87, /* %f48-%f55 */ \
|
|
|
|
|
88, 89, 90, 91, 92, 93, 94, 95, /* %f56-%f63 */ \
|
2002-05-04 06:21:46 +02:00
|
|
|
|
39, 38, 37, 36, 35, 34, 33, 32, /* %f7-%f0 */ \
|
|
|
|
|
96, 97, 98, 99, /* %fcc0-3 */ \
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
100, 0, 14, 30, 101, 102 } /* %icc, %g0, %o6, %i6, %sfp, %gsr */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* This is the order in which to allocate registers for
|
2002-05-04 06:21:46 +02:00
|
|
|
|
leaf functions. If all registers can fit in the global and
|
|
|
|
|
output registers, then we have the possibility of having a leaf
|
|
|
|
|
function.
|
|
|
|
|
|
|
|
|
|
The macro actually mentioned the input registers first,
|
|
|
|
|
because they get renumbered into the output registers once
|
|
|
|
|
we know really do have a leaf function.
|
|
|
|
|
|
|
|
|
|
To be more precise, this register allocation order is used
|
|
|
|
|
when %o7 is found to not be clobbered right before register
|
|
|
|
|
allocation. Normally, the reason %o7 would be clobbered is
|
|
|
|
|
due to a call which could not be transformed into a sibling
|
|
|
|
|
call.
|
|
|
|
|
|
|
|
|
|
As a consequence, it is possible to use the leaf register
|
|
|
|
|
allocation order and not end up with a leaf function. We will
|
|
|
|
|
not get suboptimal register allocation in that case because by
|
|
|
|
|
definition of being potentially leaf, there were no function
|
|
|
|
|
calls. Therefore, allocation order within the local register
|
|
|
|
|
window is not critical like it is when we do have function calls. */
|
1996-02-22 03:47:54 +01:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define REG_LEAF_ALLOC_ORDER \
|
2002-05-04 06:21:46 +02:00
|
|
|
|
{ 1, 2, 3, 4, 5, 6, 7, /* %g1-%g7 */ \
|
|
|
|
|
29, 28, 27, 26, 25, 24, /* %i5-%i0 */ \
|
|
|
|
|
15, /* %o7 */ \
|
|
|
|
|
13, 12, 11, 10, 9, 8, /* %o5-%o0 */ \
|
|
|
|
|
16, 17, 18, 19, 20, 21, 22, 23, /* %l0-%l7 */ \
|
|
|
|
|
40, 41, 42, 43, 44, 45, 46, 47, /* %f8-%f15 */ \
|
|
|
|
|
48, 49, 50, 51, 52, 53, 54, 55, /* %f16-%f23 */ \
|
|
|
|
|
56, 57, 58, 59, 60, 61, 62, 63, /* %f24-%f31 */ \
|
|
|
|
|
64, 65, 66, 67, 68, 69, 70, 71, /* %f32-%f39 */ \
|
|
|
|
|
72, 73, 74, 75, 76, 77, 78, 79, /* %f40-%f47 */ \
|
|
|
|
|
80, 81, 82, 83, 84, 85, 86, 87, /* %f48-%f55 */ \
|
|
|
|
|
88, 89, 90, 91, 92, 93, 94, 95, /* %f56-%f63 */ \
|
|
|
|
|
39, 38, 37, 36, 35, 34, 33, 32, /* %f7-%f0 */ \
|
|
|
|
|
96, 97, 98, 99, /* %fcc0-3 */ \
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
100, 0, 14, 30, 31, 101, 102 } /* %icc, %g0, %o6, %i6, %i7, %sfp, %gsr */
|
2002-10-22 23:51:54 +02:00
|
|
|
|
|
2010-04-29 23:37:01 +02:00
|
|
|
|
#define ADJUST_REG_ALLOC_ORDER order_regs_for_local_alloc ()
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for comparison if regno's are equal.
* sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for
comparison if regno's are equal.
* calls.c (initialize_argument_informat): Add ecf_flags argument.
Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL.
(expand_call): Update caller.
Avoid making a sibling call if argument size of the callee is larger
than argument size of the caller.
Call hard_function_value with outgoing set if in sibcall pass.
Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL.
* final.c (permitted_reg_in_leaf_functions, only_leaf_regs_used):
Change LEAF_REGISTERS from an array initializer to actual array
identifier. Move static global variable into the function.
(leaf_function_p): Allow SIBLING_CALL_P calls even outside of
sequences for leaf functions.
* global.c (global_alloc): Likewise.
* tm.texi (LEAF_REGISTERS): Update documentation.
* config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Remove the ugly
TARGET_FLAT leaf disabling hack.
(LEAF_REGISTERS): Changed from an array initializer to actual array
identifier to avoid duplication and remove the above hack.
(FUNCTION_OK_FOR_SIBCALL): Define.
* config/sparc/sparc.md (sibcall): New attr type. Use it almost
always like call attribute.
(eligible_for_sibcall_delay): New attribute.
(sibcall): New delay type.
(sibcall, sibcall_value, sibcall_epilogue): New expands.
(sibcall_symbolic_sp32, sibcall_symbolic_sp64,
sibcall_value_symbolic_sp32, sibcall_value_symbolic_sp64): New insns.
* config/sparc/sparc.c (sparc_leaf_regs): New array.
(eligible_for_sibcall_delay, output_restore_regs, output_sibcall):
New functions.
(output_function_epilogue): Move part of the code into
output_restore_regs.
(ultra_code_from_mask, ultrasparc_sched_reorder): Handle
TYPE_SIBCALL.
* sparc-protos.h (output_sibcall, eligible_for_sibcall_delay): New
prototypes.
From-SVN: r32730
2000-03-24 22:48:01 +01:00
|
|
|
|
extern char sparc_leaf_regs[];
|
|
|
|
|
#define LEAF_REGISTERS sparc_leaf_regs
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2002-05-03 16:20:04 +02:00
|
|
|
|
extern char leaf_reg_remap[];
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define LEAF_REG_REMAP(REGNO) (leaf_reg_remap[REGNO])
|
|
|
|
|
|
|
|
|
|
/* The class value for index registers, and the one for base regs. */
|
|
|
|
|
#define INDEX_REG_CLASS GENERAL_REGS
|
|
|
|
|
#define BASE_REG_CLASS GENERAL_REGS
|
|
|
|
|
|
1994-08-02 20:41:16 +02:00
|
|
|
|
/* Local macro to handle the two v9 classes of FP regs. */
|
|
|
|
|
#define FP_REG_CLASS_P(CLASS) ((CLASS) == FP_REGS || (CLASS) == EXTRA_FP_REGS)
|
|
|
|
|
|
sparc.c (reg_or_0_operand, [...]): Delete.
* config/sparc/sparc.c (reg_or_0_operand, const1_operand,
fp_zero_operand, fp_register_operand, intreg_operand,
fcc_reg_operand, fcc0_reg_operand, icc_or_fcc_reg_operand,
call_operand, call_operand_address, tgd_symbolic_operand,
tld_symbolic_operand, tie_symbolic_operand, tle_symbolic_operand,
symbolic_operand, symbolic_memory_operand, label_ref_operand,
sp64_medium_pic_operand, data_segment_operand,
text_segment_operand, splittable_symbolic_memory_operand,
reg_or_nonsymb_mem_operand, splittable_immediate_memory_operand,
eq_or_neq, normal_comp_operator, noov_compare_op,
noov_compare64_op, v9_regcmp_op, extend_op, cc_arithop,
cc_arithopn, arith_operand, arith_4096_operand, arith_add_operand,
const64_operand, const64_high_operand, arith11_operand,
arith10_operand, arith_double_operand, arith_double_4096_operand,
arith_double_add_operand, arith11_double_operand,
arith10_double_operand, small_int, small_int_or_double,
uns_small_int, uns_arith_operand, clobbered_register,
input_operand, compare_operand): Delete.
(sparc_emit_set_const32): Use predicates in assertion. Remove special
code for TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64.
(sparc_emit_set_const64): Call gcc_unreachable if H_B_P_W_I == 32.
(GEN_HIGHINT64, GEN_INT64): Delete.
(sparc_emit_set_safe_HIGH64, gen_safe_SET64, gen_safe_OR64,
gen_safe_XOR64): Adjust for above deletion.
(sparc_emit_set_const64): Support only H_B_P_W_I == 64 and CONST_INTs.
Use 'unsigned HOST_WIDE_INT' instead of 'long' for bitmask.
(legitimate_constant_p): Use const_zero_operand instead.
(sparc_extra_constraint_check): Likewise.
* config/sparc/sparc.h (CONST_DOUBLE_OK_FOR_LETTER_P): Remove 'O'.
(PREFERRED_RELOAD_CLASS): Use const_zero_operand.
(PREDICATE_CODES): Delete.
* config/sparc/sparc.md: Include predicates.md.
(All patterns): Adjust for new predicate names.
(cmpdi, cmpdi_sp64): Use arith_operand predicate.
(movhi_const64_special, movsi_const64_special): Add 'K' constraint.
(movdi): Use general_operand predicate.
(movdi_sp64_dbl): Delete.
(movdi_const64_special): Add 'N' constraint.
(movdicc): Use arith10_operand predicate.
(movdi_cc_sp64, movdi_cc_sp64_trunc): Use arith11_operand predicate.
(movdi_cc_reg_sp64): Use arith10_operand predicate.
(movdi_cc_reg_sp64_trunc): Delete.
(cmp_zero_extract, cmp_zero_extract_sp64): Use small_int_operand.
(adddi3_insn_sp32, addx, cmp_cc_plus, cmp_ccx_plus, cmp_cc_plus_set,
cmp_ccx_plus_set): Use register_operand predicate.
(adddi3_sp64, cmp_ccx_plus_set): Use arith_operand predicate.
(subdi3_sp32): Delete.
(subdi3_insn_sp32): Change to define_insn_and_split.
(subdi3_sp64, cmp_minus_ccx, cmp_minus_ccx_set): Use arith_operand.
(muldi3, muldi3_sp64, muldi3_v8plus): Likewise.
(smulsi3_highpart_v8plus, const_smulsi3_highpart_v8plus,
umulsi3_highpart_v8plus, const_umulsi3_highpart_v8plus): Use
small_int_operand predicate.
(divdi3, udivdi3): Use arith_operand predicate.
(udivsi3, udivsi3_sp32, udivsi3_sp64): Use nonimmediate_operand.
(and<V64I>3_sp64, ior<V64I>3_sp64, xor<V64I:mode>3_sp64,
xor_not_<V64I:mode>_sp64) : Use arith_operand predicate.
(xordi3_sp64_dbl): Delete.
(cmp_ccx_arith_op, cmp_ccx_arith_op_set, cmp_ccx_xor_not,
cmp_ccx_xor_not_set, cmp_ccx_arith_op_not, cmp_ccx_arith_op_not_set,
cmp_ccx_neg, cmp_ccx_set_neg, one_cmpl<V64I>2_sp64, cmp_ccx_not,
cmp_ccx_set_not): Use arith_operand predicate.
(ashrsi3_extend2, lshrsi3_extend2 et al.): Use small_int_operand.
* config/sparc/predicates.md: New file.
From-SVN: r98494
2005-04-21 08:37:52 +02:00
|
|
|
|
/* Predicates for 10-bit, 11-bit and 13-bit signed constants. */
|
sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
* sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
(TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=,
-malign-functions=.
(sparc_align_{loops,jumps,funcs}_string): Declare.
(sparc_align_{loops,jumps,funcs}): Declare.
(DEFAULT_SPARC_ALIGN_FUNCS): New macro.
(FUNCTION_BOUNDARY): Use sparc_align_funcs.
(STACK_BIAS): Define.
(SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform
test.
(SPARC_SETHI_P): New macro.
(CONST_OK_FOR_LETTER_P): Use it.
(ASM_OUTPUT_ALIGN_CODE): Define.
(ASM_OUTPUT_LOOP_ALIGN): Define.
* sparc.h (ASM_COMMENT_START): Define.
* sparc/sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print
ascii form as well.
From-SVN: r15708
1997-09-25 03:14:03 +02:00
|
|
|
|
#define SPARC_SIMM10_P(X) ((unsigned HOST_WIDE_INT) (X) + 0x200 < 0x400)
|
|
|
|
|
#define SPARC_SIMM11_P(X) ((unsigned HOST_WIDE_INT) (X) + 0x400 < 0x800)
|
|
|
|
|
#define SPARC_SIMM13_P(X) ((unsigned HOST_WIDE_INT) (X) + 0x1000 < 0x2000)
|
sparc.c (reg_or_0_operand, [...]): Delete.
* config/sparc/sparc.c (reg_or_0_operand, const1_operand,
fp_zero_operand, fp_register_operand, intreg_operand,
fcc_reg_operand, fcc0_reg_operand, icc_or_fcc_reg_operand,
call_operand, call_operand_address, tgd_symbolic_operand,
tld_symbolic_operand, tie_symbolic_operand, tle_symbolic_operand,
symbolic_operand, symbolic_memory_operand, label_ref_operand,
sp64_medium_pic_operand, data_segment_operand,
text_segment_operand, splittable_symbolic_memory_operand,
reg_or_nonsymb_mem_operand, splittable_immediate_memory_operand,
eq_or_neq, normal_comp_operator, noov_compare_op,
noov_compare64_op, v9_regcmp_op, extend_op, cc_arithop,
cc_arithopn, arith_operand, arith_4096_operand, arith_add_operand,
const64_operand, const64_high_operand, arith11_operand,
arith10_operand, arith_double_operand, arith_double_4096_operand,
arith_double_add_operand, arith11_double_operand,
arith10_double_operand, small_int, small_int_or_double,
uns_small_int, uns_arith_operand, clobbered_register,
input_operand, compare_operand): Delete.
(sparc_emit_set_const32): Use predicates in assertion. Remove special
code for TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64.
(sparc_emit_set_const64): Call gcc_unreachable if H_B_P_W_I == 32.
(GEN_HIGHINT64, GEN_INT64): Delete.
(sparc_emit_set_safe_HIGH64, gen_safe_SET64, gen_safe_OR64,
gen_safe_XOR64): Adjust for above deletion.
(sparc_emit_set_const64): Support only H_B_P_W_I == 64 and CONST_INTs.
Use 'unsigned HOST_WIDE_INT' instead of 'long' for bitmask.
(legitimate_constant_p): Use const_zero_operand instead.
(sparc_extra_constraint_check): Likewise.
* config/sparc/sparc.h (CONST_DOUBLE_OK_FOR_LETTER_P): Remove 'O'.
(PREFERRED_RELOAD_CLASS): Use const_zero_operand.
(PREDICATE_CODES): Delete.
* config/sparc/sparc.md: Include predicates.md.
(All patterns): Adjust for new predicate names.
(cmpdi, cmpdi_sp64): Use arith_operand predicate.
(movhi_const64_special, movsi_const64_special): Add 'K' constraint.
(movdi): Use general_operand predicate.
(movdi_sp64_dbl): Delete.
(movdi_const64_special): Add 'N' constraint.
(movdicc): Use arith10_operand predicate.
(movdi_cc_sp64, movdi_cc_sp64_trunc): Use arith11_operand predicate.
(movdi_cc_reg_sp64): Use arith10_operand predicate.
(movdi_cc_reg_sp64_trunc): Delete.
(cmp_zero_extract, cmp_zero_extract_sp64): Use small_int_operand.
(adddi3_insn_sp32, addx, cmp_cc_plus, cmp_ccx_plus, cmp_cc_plus_set,
cmp_ccx_plus_set): Use register_operand predicate.
(adddi3_sp64, cmp_ccx_plus_set): Use arith_operand predicate.
(subdi3_sp32): Delete.
(subdi3_insn_sp32): Change to define_insn_and_split.
(subdi3_sp64, cmp_minus_ccx, cmp_minus_ccx_set): Use arith_operand.
(muldi3, muldi3_sp64, muldi3_v8plus): Likewise.
(smulsi3_highpart_v8plus, const_smulsi3_highpart_v8plus,
umulsi3_highpart_v8plus, const_umulsi3_highpart_v8plus): Use
small_int_operand predicate.
(divdi3, udivdi3): Use arith_operand predicate.
(udivsi3, udivsi3_sp32, udivsi3_sp64): Use nonimmediate_operand.
(and<V64I>3_sp64, ior<V64I>3_sp64, xor<V64I:mode>3_sp64,
xor_not_<V64I:mode>_sp64) : Use arith_operand predicate.
(xordi3_sp64_dbl): Delete.
(cmp_ccx_arith_op, cmp_ccx_arith_op_set, cmp_ccx_xor_not,
cmp_ccx_xor_not_set, cmp_ccx_arith_op_not, cmp_ccx_arith_op_not_set,
cmp_ccx_neg, cmp_ccx_set_neg, one_cmpl<V64I>2_sp64, cmp_ccx_not,
cmp_ccx_set_not): Use arith_operand predicate.
(ashrsi3_extend2, lshrsi3_extend2 et al.): Use small_int_operand.
* config/sparc/predicates.md: New file.
From-SVN: r98494
2005-04-21 08:37:52 +02:00
|
|
|
|
|
|
|
|
|
/* 10- and 11-bit immediates are only used for a few specific insns.
|
1996-03-23 21:54:21 +01:00
|
|
|
|
SMALL_INT is used throughout the port so we continue to use it. */
|
|
|
|
|
#define SMALL_INT(X) (SPARC_SIMM13_P (INTVAL (X)))
|
sparc.c (reg_or_0_operand, [...]): Delete.
* config/sparc/sparc.c (reg_or_0_operand, const1_operand,
fp_zero_operand, fp_register_operand, intreg_operand,
fcc_reg_operand, fcc0_reg_operand, icc_or_fcc_reg_operand,
call_operand, call_operand_address, tgd_symbolic_operand,
tld_symbolic_operand, tie_symbolic_operand, tle_symbolic_operand,
symbolic_operand, symbolic_memory_operand, label_ref_operand,
sp64_medium_pic_operand, data_segment_operand,
text_segment_operand, splittable_symbolic_memory_operand,
reg_or_nonsymb_mem_operand, splittable_immediate_memory_operand,
eq_or_neq, normal_comp_operator, noov_compare_op,
noov_compare64_op, v9_regcmp_op, extend_op, cc_arithop,
cc_arithopn, arith_operand, arith_4096_operand, arith_add_operand,
const64_operand, const64_high_operand, arith11_operand,
arith10_operand, arith_double_operand, arith_double_4096_operand,
arith_double_add_operand, arith11_double_operand,
arith10_double_operand, small_int, small_int_or_double,
uns_small_int, uns_arith_operand, clobbered_register,
input_operand, compare_operand): Delete.
(sparc_emit_set_const32): Use predicates in assertion. Remove special
code for TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64.
(sparc_emit_set_const64): Call gcc_unreachable if H_B_P_W_I == 32.
(GEN_HIGHINT64, GEN_INT64): Delete.
(sparc_emit_set_safe_HIGH64, gen_safe_SET64, gen_safe_OR64,
gen_safe_XOR64): Adjust for above deletion.
(sparc_emit_set_const64): Support only H_B_P_W_I == 64 and CONST_INTs.
Use 'unsigned HOST_WIDE_INT' instead of 'long' for bitmask.
(legitimate_constant_p): Use const_zero_operand instead.
(sparc_extra_constraint_check): Likewise.
* config/sparc/sparc.h (CONST_DOUBLE_OK_FOR_LETTER_P): Remove 'O'.
(PREFERRED_RELOAD_CLASS): Use const_zero_operand.
(PREDICATE_CODES): Delete.
* config/sparc/sparc.md: Include predicates.md.
(All patterns): Adjust for new predicate names.
(cmpdi, cmpdi_sp64): Use arith_operand predicate.
(movhi_const64_special, movsi_const64_special): Add 'K' constraint.
(movdi): Use general_operand predicate.
(movdi_sp64_dbl): Delete.
(movdi_const64_special): Add 'N' constraint.
(movdicc): Use arith10_operand predicate.
(movdi_cc_sp64, movdi_cc_sp64_trunc): Use arith11_operand predicate.
(movdi_cc_reg_sp64): Use arith10_operand predicate.
(movdi_cc_reg_sp64_trunc): Delete.
(cmp_zero_extract, cmp_zero_extract_sp64): Use small_int_operand.
(adddi3_insn_sp32, addx, cmp_cc_plus, cmp_ccx_plus, cmp_cc_plus_set,
cmp_ccx_plus_set): Use register_operand predicate.
(adddi3_sp64, cmp_ccx_plus_set): Use arith_operand predicate.
(subdi3_sp32): Delete.
(subdi3_insn_sp32): Change to define_insn_and_split.
(subdi3_sp64, cmp_minus_ccx, cmp_minus_ccx_set): Use arith_operand.
(muldi3, muldi3_sp64, muldi3_v8plus): Likewise.
(smulsi3_highpart_v8plus, const_smulsi3_highpart_v8plus,
umulsi3_highpart_v8plus, const_umulsi3_highpart_v8plus): Use
small_int_operand predicate.
(divdi3, udivdi3): Use arith_operand predicate.
(udivsi3, udivsi3_sp32, udivsi3_sp64): Use nonimmediate_operand.
(and<V64I>3_sp64, ior<V64I>3_sp64, xor<V64I:mode>3_sp64,
xor_not_<V64I:mode>_sp64) : Use arith_operand predicate.
(xordi3_sp64_dbl): Delete.
(cmp_ccx_arith_op, cmp_ccx_arith_op_set, cmp_ccx_xor_not,
cmp_ccx_xor_not_set, cmp_ccx_arith_op_not, cmp_ccx_arith_op_not_set,
cmp_ccx_neg, cmp_ccx_set_neg, one_cmpl<V64I>2_sp64, cmp_ccx_not,
cmp_ccx_set_not): Use arith_operand predicate.
(ashrsi3_extend2, lshrsi3_extend2 et al.): Use small_int_operand.
* config/sparc/predicates.md: New file.
From-SVN: r98494
2005-04-21 08:37:52 +02:00
|
|
|
|
|
|
|
|
|
/* Predicate for constants that can be loaded with a sethi instruction.
|
|
|
|
|
This is the general, 64-bit aware, bitwise version that ensures that
|
|
|
|
|
only constants whose representation fits in the mask
|
|
|
|
|
|
|
|
|
|
0x00000000fffffc00
|
|
|
|
|
|
|
|
|
|
are accepted. It will reject, for example, negative SImode constants
|
|
|
|
|
on 64-bit hosts, so correct handling is to mask the value beforehand
|
|
|
|
|
according to the mode of the instruction. */
|
sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
* sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
(TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=,
-malign-functions=.
(sparc_align_{loops,jumps,funcs}_string): Declare.
(sparc_align_{loops,jumps,funcs}): Declare.
(DEFAULT_SPARC_ALIGN_FUNCS): New macro.
(FUNCTION_BOUNDARY): Use sparc_align_funcs.
(STACK_BIAS): Define.
(SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform
test.
(SPARC_SETHI_P): New macro.
(CONST_OK_FOR_LETTER_P): Use it.
(ASM_OUTPUT_ALIGN_CODE): Define.
(ASM_OUTPUT_LOOP_ALIGN): Define.
* sparc.h (ASM_COMMENT_START): Define.
* sparc/sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print
ascii form as well.
From-SVN: r15708
1997-09-25 03:14:03 +02:00
|
|
|
|
#define SPARC_SETHI_P(X) \
|
2002-02-25 05:14:45 +01:00
|
|
|
|
(((unsigned HOST_WIDE_INT) (X) \
|
|
|
|
|
& ((unsigned HOST_WIDE_INT) 0x3ff - GET_MODE_MASK (SImode) - 1)) == 0)
|
sparc.c (reg_or_0_operand, [...]): Delete.
* config/sparc/sparc.c (reg_or_0_operand, const1_operand,
fp_zero_operand, fp_register_operand, intreg_operand,
fcc_reg_operand, fcc0_reg_operand, icc_or_fcc_reg_operand,
call_operand, call_operand_address, tgd_symbolic_operand,
tld_symbolic_operand, tie_symbolic_operand, tle_symbolic_operand,
symbolic_operand, symbolic_memory_operand, label_ref_operand,
sp64_medium_pic_operand, data_segment_operand,
text_segment_operand, splittable_symbolic_memory_operand,
reg_or_nonsymb_mem_operand, splittable_immediate_memory_operand,
eq_or_neq, normal_comp_operator, noov_compare_op,
noov_compare64_op, v9_regcmp_op, extend_op, cc_arithop,
cc_arithopn, arith_operand, arith_4096_operand, arith_add_operand,
const64_operand, const64_high_operand, arith11_operand,
arith10_operand, arith_double_operand, arith_double_4096_operand,
arith_double_add_operand, arith11_double_operand,
arith10_double_operand, small_int, small_int_or_double,
uns_small_int, uns_arith_operand, clobbered_register,
input_operand, compare_operand): Delete.
(sparc_emit_set_const32): Use predicates in assertion. Remove special
code for TARGET_ARCH64 && HOST_BITS_PER_WIDE_INT != 64.
(sparc_emit_set_const64): Call gcc_unreachable if H_B_P_W_I == 32.
(GEN_HIGHINT64, GEN_INT64): Delete.
(sparc_emit_set_safe_HIGH64, gen_safe_SET64, gen_safe_OR64,
gen_safe_XOR64): Adjust for above deletion.
(sparc_emit_set_const64): Support only H_B_P_W_I == 64 and CONST_INTs.
Use 'unsigned HOST_WIDE_INT' instead of 'long' for bitmask.
(legitimate_constant_p): Use const_zero_operand instead.
(sparc_extra_constraint_check): Likewise.
* config/sparc/sparc.h (CONST_DOUBLE_OK_FOR_LETTER_P): Remove 'O'.
(PREFERRED_RELOAD_CLASS): Use const_zero_operand.
(PREDICATE_CODES): Delete.
* config/sparc/sparc.md: Include predicates.md.
(All patterns): Adjust for new predicate names.
(cmpdi, cmpdi_sp64): Use arith_operand predicate.
(movhi_const64_special, movsi_const64_special): Add 'K' constraint.
(movdi): Use general_operand predicate.
(movdi_sp64_dbl): Delete.
(movdi_const64_special): Add 'N' constraint.
(movdicc): Use arith10_operand predicate.
(movdi_cc_sp64, movdi_cc_sp64_trunc): Use arith11_operand predicate.
(movdi_cc_reg_sp64): Use arith10_operand predicate.
(movdi_cc_reg_sp64_trunc): Delete.
(cmp_zero_extract, cmp_zero_extract_sp64): Use small_int_operand.
(adddi3_insn_sp32, addx, cmp_cc_plus, cmp_ccx_plus, cmp_cc_plus_set,
cmp_ccx_plus_set): Use register_operand predicate.
(adddi3_sp64, cmp_ccx_plus_set): Use arith_operand predicate.
(subdi3_sp32): Delete.
(subdi3_insn_sp32): Change to define_insn_and_split.
(subdi3_sp64, cmp_minus_ccx, cmp_minus_ccx_set): Use arith_operand.
(muldi3, muldi3_sp64, muldi3_v8plus): Likewise.
(smulsi3_highpart_v8plus, const_smulsi3_highpart_v8plus,
umulsi3_highpart_v8plus, const_umulsi3_highpart_v8plus): Use
small_int_operand predicate.
(divdi3, udivdi3): Use arith_operand predicate.
(udivsi3, udivsi3_sp32, udivsi3_sp64): Use nonimmediate_operand.
(and<V64I>3_sp64, ior<V64I>3_sp64, xor<V64I:mode>3_sp64,
xor_not_<V64I:mode>_sp64) : Use arith_operand predicate.
(xordi3_sp64_dbl): Delete.
(cmp_ccx_arith_op, cmp_ccx_arith_op_set, cmp_ccx_xor_not,
cmp_ccx_xor_not_set, cmp_ccx_arith_op_not, cmp_ccx_arith_op_not_set,
cmp_ccx_neg, cmp_ccx_set_neg, one_cmpl<V64I>2_sp64, cmp_ccx_not,
cmp_ccx_set_not): Use arith_operand predicate.
(ashrsi3_extend2, lshrsi3_extend2 et al.): Use small_int_operand.
* config/sparc/predicates.md: New file.
From-SVN: r98494
2005-04-21 08:37:52 +02:00
|
|
|
|
|
|
|
|
|
/* Version of the above predicate for SImode constants and below. */
|
2002-02-25 05:14:45 +01:00
|
|
|
|
#define SPARC_SETHI32_P(X) \
|
|
|
|
|
(SPARC_SETHI_P ((unsigned HOST_WIDE_INT) (X) & GET_MODE_MASK (SImode)))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2011-10-24 05:51:47 +02:00
|
|
|
|
/* On SPARC when not VIS3 it is not possible to directly move data
|
|
|
|
|
between GENERAL_REGS and FP_REGS. */
|
1994-08-02 20:41:16 +02:00
|
|
|
|
#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \
|
2011-10-24 05:51:47 +02:00
|
|
|
|
((FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2)) \
|
|
|
|
|
&& (! TARGET_VIS3 \
|
|
|
|
|
|| GET_MODE_SIZE (MODE) > 8 \
|
|
|
|
|
|| GET_MODE_SIZE (MODE) < 4))
|
1992-07-21 21:34:37 +02:00
|
|
|
|
|
1998-06-29 23:40:49 +02:00
|
|
|
|
/* Get_secondary_mem widens its argument to BITS_PER_WORD which loses on v9
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
because the movsi and movsf patterns don't handle r/f moves.
|
|
|
|
|
For v8 we copy the default definition. */
|
|
|
|
|
#define SECONDARY_MEMORY_NEEDED_MODE(MODE) \
|
1996-01-25 15:16:13 +01:00
|
|
|
|
(TARGET_ARCH64 \
|
1994-11-23 20:09:15 +01:00
|
|
|
|
? (GET_MODE_BITSIZE (MODE) < 32 \
|
|
|
|
|
? mode_for_size (32, GET_MODE_CLASS (MODE), 0) \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
: MODE) \
|
1994-11-23 20:09:15 +01:00
|
|
|
|
: (GET_MODE_BITSIZE (MODE) < BITS_PER_WORD \
|
|
|
|
|
? mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (MODE), 0) \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
: MODE))
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Return the maximum number of consecutive registers
|
|
|
|
|
needed to represent mode MODE in a register of class CLASS. */
|
|
|
|
|
/* On SPARC, this is the size of MODE in words. */
|
|
|
|
|
#define CLASS_MAX_NREGS(CLASS, MODE) \
|
1994-08-02 20:41:16 +02:00
|
|
|
|
(FP_REG_CLASS_P (CLASS) ? (GET_MODE_SIZE (MODE) + 3) / 4 \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
: (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Stack layout; function entry, exit and calling. */
|
|
|
|
|
|
|
|
|
|
/* Define this if pushing a word on the stack
|
|
|
|
|
makes the stack pointer a smaller address. */
|
|
|
|
|
#define STACK_GROWS_DOWNWARD
|
|
|
|
|
|
Makefile.in, [...]: Fix comment/doc typos.
* Makefile.in, cfgexpand.c, cfgloop.h, cfgloopmanip.c,
config.gcc, ipa-cp.c, ipa-prop.c, ipa-prop.h, reg-stack.c,
tree-ssa-structalias.c, tree-vrp.c, value-prof.c, vec.h,
config/linux.h, config/alpha/alpha.h, config/alpha/linux.h,
config/alpha/predicates.md, config/arc/arc.h,
config/arm/arm.h, config/arm/ieee754-df.S,
config/arm/ieee754-sf.S, config/bfin/bfin.c,
config/bfin/bfin.h, config/c4x/c4x.h, config/crx/crx.c,
config/fr30/fr30.h, config/frv/frv.h, config/h8300/h8300.h,
config/i386/i386.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m68hc11/m68hc11.h, config/mips/mips.c,
config/mips/mips.h, config/mips/openbsd.h,
config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h,
config/pdp11/pdp11.h, config/rs6000/linux-unwind.h,
config/rs6000/rs6000.c, config/rs6000/rs6000.h,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sparc/linux.h, config/sparc/linux64.h,
config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h,
doc/extend.texi, doc/gcov.texi, doc/install.texi,
doc/invoke.texi, doc/rtl.texi, doc/tm.texi: Fix comment/doc
typos. Follow spelling conventions.
From-SVN: r102809
2005-08-06 15:26:35 +02:00
|
|
|
|
/* Define this to nonzero if the nominal address of the stack frame
|
1992-01-30 21:58:19 +01:00
|
|
|
|
is at the high-address end of the local variables;
|
|
|
|
|
that is, each additional local variable allocated
|
|
|
|
|
goes at a more negative offset in the frame. */
|
2005-06-26 07:18:53 +02:00
|
|
|
|
#define FRAME_GROWS_DOWNWARD 1
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Offset within stack frame to start allocating local variables at.
|
|
|
|
|
If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
|
|
|
|
|
first local allocated. Otherwise, it is the offset to the BEGINNING
|
|
|
|
|
of the first local allocated. */
|
2009-01-05 07:09:07 +01:00
|
|
|
|
#define STARTING_FRAME_OFFSET 0
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Offset of first parameter from the argument pointer register value.
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
!v9: This is 64 for the ins and locals, plus 4 for the struct-return reg
|
|
|
|
|
even if this function isn't going to use it.
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
v9: This is 128 for the ins and locals. */
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define FIRST_PARM_OFFSET(FNDECL) \
|
2002-02-04 19:16:07 +01:00
|
|
|
|
(TARGET_ARCH64 ? 16 * UNITS_PER_WORD : STRUCT_VALUE_OFFSET + UNITS_PER_WORD)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2000-03-23 01:29:55 +01:00
|
|
|
|
/* Offset from the argument pointer register value to the CFA.
|
|
|
|
|
This is different from FIRST_PARM_OFFSET because the register window
|
|
|
|
|
comes between the CFA and the arguments. */
|
2002-02-06 07:58:31 +01:00
|
|
|
|
#define ARG_POINTER_CFA_OFFSET(FNDECL) 0
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* When a parameter is passed in a register, stack space is still
|
1998-05-03 16:19:46 +02:00
|
|
|
|
allocated for it.
|
|
|
|
|
!v9: All 6 possible integer registers have backing store allocated.
|
2001-11-03 17:38:52 +01:00
|
|
|
|
v9: Only space for the arguments passed is allocated. */
|
1998-05-03 16:19:46 +02:00
|
|
|
|
/* ??? Ideally, we'd use zero here (as the minimum), but zero has special
|
|
|
|
|
meaning to the backend. Further, we need to be able to detect if a
|
|
|
|
|
varargs/unprototyped function is called, as they may want to spill more
|
|
|
|
|
registers than we've provided space. Ugly, ugly. So for now we retain
|
|
|
|
|
all 6 slots even for v9. */
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
#define REG_PARM_STACK_SPACE(DECL) (6 * UNITS_PER_WORD)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2002-02-04 19:16:07 +01:00
|
|
|
|
/* Definitions for register elimination. */
|
2002-10-22 23:51:54 +02:00
|
|
|
|
|
2002-02-04 19:16:07 +01:00
|
|
|
|
#define ELIMINABLE_REGS \
|
2002-03-13 08:56:19 +01:00
|
|
|
|
{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
|
|
|
|
|
{ FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} }
|
2002-02-04 19:16:07 +01:00
|
|
|
|
|
2004-06-30 12:31:30 +02:00
|
|
|
|
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
|
|
|
|
do { \
|
|
|
|
|
if ((TO) == STACK_POINTER_REGNUM) \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
(OFFSET) = sparc_compute_frame_size (get_frame_size (), \
|
|
|
|
|
current_function_is_leaf); \
|
2004-09-28 08:26:08 +02:00
|
|
|
|
else \
|
|
|
|
|
(OFFSET) = 0; \
|
2004-06-30 12:31:30 +02:00
|
|
|
|
(OFFSET) += SPARC_STACK_BIAS; \
|
2002-03-13 08:56:19 +01:00
|
|
|
|
} while (0)
|
2002-02-04 19:16:07 +01:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Keep the stack pointer constant throughout the function.
|
1992-03-14 06:17:01 +01:00
|
|
|
|
This is both an optimization and a necessity: longjmp
|
1992-01-30 21:58:19 +01:00
|
|
|
|
doesn't behave itself when the stack pointer moves within
|
|
|
|
|
the function! */
|
Convert ACCUMULATE_OUTGOING_ARGS to an expression.
* calls.c (PUSH_ARGS_REVERSED) Change to expression.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value.
(struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS.
(save_fixed_argument_area, restore_fixed_argument_area):
conditionize by #ifdef REG_PARM_STACK_SPACE only.
(emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS
to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS.
(precompute_register_parameters): Avoid #ifdefs on
ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED.
(stire_one_args): Likewise.
(expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS.
(emit_library_call_value_1): Likewise.
(compute_argument_block_size): Align to STACK_BOUNDARY only for
ACCUMULATE_OUTGOING_ARGS.
* combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default
value.
(nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH.
(use_crosses_set_p): Likewise.
* all targets (ACCUMULATE_OUTGOING_ARGS define): Change to
#define ACCUMULATE_OUTGOING_ARGS 1.
* i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS
frames.
* i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New
constants.
(TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros.
(TARGET_SWITCHES): Add push-args, no-push-args,
accumulate-outgoing-args and no-accumulate-outgoing-args.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro.
* expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default.
(push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS
and PUSH_ROUNDING.
(emit_push_insn): Likewise.
* final.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS.
* function.c (ACCUMULATE_OUTGOING_ARGS): Provide default.
(STACK_DYNAMIC_OFFSET): Define correctly for both
ACCUMULATE_OUTGOING_ARGS and normal mode.
* invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document.
* tm.texi (PUSH_ARGS): Document.
(ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation.
From-SVN: r32803
2000-03-29 15:10:44 +02:00
|
|
|
|
#define ACCUMULATE_OUTGOING_ARGS 1
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1993-03-23 13:46:53 +01:00
|
|
|
|
/* Define this macro if the target machine has "register windows". This
|
|
|
|
|
C expression returns the register number as seen by the called function
|
|
|
|
|
corresponding to register number OUT as seen by the calling function.
|
|
|
|
|
Return OUT if register number OUT is not an outbound register. */
|
|
|
|
|
|
|
|
|
|
#define INCOMING_REGNO(OUT) \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
((TARGET_FLAT || (OUT) < 8 || (OUT) > 15) ? (OUT) : (OUT) + 16)
|
1993-03-23 13:46:53 +01:00
|
|
|
|
|
|
|
|
|
/* Define this macro if the target machine has "register windows". This
|
|
|
|
|
C expression returns the register number as seen by the calling function
|
|
|
|
|
corresponding to register number IN as seen by the called function.
|
|
|
|
|
Return IN if register number IN is not an inbound register. */
|
|
|
|
|
|
|
|
|
|
#define OUTGOING_REGNO(IN) \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
((TARGET_FLAT || (IN) < 24 || (IN) > 31) ? (IN) : (IN) - 16)
|
1993-03-23 13:46:53 +01:00
|
|
|
|
|
2000-08-08 10:28:00 +02:00
|
|
|
|
/* Define this macro if the target machine has register windows. This
|
|
|
|
|
C expression returns true if the register is call-saved but is in the
|
|
|
|
|
register window. */
|
|
|
|
|
|
|
|
|
|
#define LOCAL_REGNO(REGNO) \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
(!TARGET_FLAT && (REGNO) >= 16 && (REGNO) <= 31)
|
2000-08-08 10:28:00 +02:00
|
|
|
|
|
1993-12-09 00:04:10 +01:00
|
|
|
|
/* Define the size of space to allocate for the return value of an
|
|
|
|
|
untyped_call. */
|
|
|
|
|
|
2005-04-12 23:07:47 +02:00
|
|
|
|
#define APPLY_RESULT_SIZE (TARGET_ARCH64 ? 24 : 16)
|
1993-12-09 00:04:10 +01:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* 1 if N is a possible register number for function argument passing.
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
On SPARC, these are the "output" registers. v9 also uses %f0-%f31. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define FUNCTION_ARG_REGNO_P(N) \
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
(TARGET_ARCH64 \
|
|
|
|
|
? (((N) >= 8 && (N) <= 13) || ((N) >= 32 && (N) <= 63)) \
|
|
|
|
|
: ((N) >= 8 && (N) <= 13))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* 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.
|
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
On SPARC (!v9), this is a single integer, which is a number of words
|
1992-01-30 21:58:19 +01:00
|
|
|
|
of arguments scanned so far (including the invisible argument,
|
|
|
|
|
if any, which holds the structure-value-address).
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
Thus 7 or more means all following args should go on the stack.
|
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
For v9, we also need to know whether a prototype is present. */
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
|
|
|
|
|
struct sparc_args {
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
int words; /* number of words passed so far */
|
2002-09-18 13:43:45 +02:00
|
|
|
|
int prototype_p; /* nonzero if a prototype is present */
|
|
|
|
|
int libcall_p; /* nonzero if a library call */
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
};
|
|
|
|
|
#define CUMULATIVE_ARGS struct sparc_args
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Initialize a variable CUM of type CUMULATIVE_ARGS
|
|
|
|
|
for a call to a function whose data type is FNTYPE.
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
For a library call, FNTYPE is 0. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* doc/tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* calls.c (expand_call): Pass n_named_args to INIT_CUMULATIVE_ARGS.
(emit_library_call_value_1): Likewise pass nargs.
* expr.c (block_move_libcall_safe_for_call_parm): Pass 3 here.
* function.c (assign_parms): Pass -1 to INIT_CUMULATIVE_ARGS.
* config/rs6000/rs6000.c (init_cumulative_args): Use n_named_args
parameter instead of scanning TYPE_ARGS_TYPES to count args.
* config/rs6000/rs6000-protos.h (init_cumulative_args): Update
prototype.
* config/rs6000/rs6000.h (INIT_CUMULATIVE_ARGS): Pass extra arg.
(INIT_CUMULATIVE_INCOMING_ARGS): Set extra arg to 1000.
(INIT_CUMULATIVE_LIBCALL_ARGS): Set extra arg to 0.
* config/sh/sh.c (sh_output_mi_thunk): Pass 1 as n_named_args to
INIT_CUMULATIVE_ARGS.
* config/alpha/alpha.h (INIT_CUMULATIVE_ARGS): Update.
* config/alpha/unicosmk.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.h,
config/h8300/h8300.h, config/i386/i386.h, config/i860/i860.h,
config/ia64/ia64.h, config/ip2k/ip2k.h, config/iq2000/iq2000.h,
config/iq2000/iq2000.c, config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/mcore/mcore.h, config/mips/mips.h,
config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/pdp11/pdp11.h config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.h,
config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Likewise.
From-SVN: r77380
2004-02-06 07:18:36 +01:00
|
|
|
|
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
|
2003-02-19 19:03:11 +01:00
|
|
|
|
init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (FNDECL));
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
/* If defined, a C expression which determines whether, and in which direction,
|
|
|
|
|
to pad out an argument with extra space. The value should be of type
|
|
|
|
|
`enum direction': either `upward' to pad above the argument,
|
|
|
|
|
`downward' to pad below, or `none' to inhibit padding. */
|
1998-04-18 03:24:59 +02:00
|
|
|
|
|
sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
(SPARC_FP_ARG_FIRST): New macro.
(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
(NPARM_REGS): There are 32 fp argument registers now.
(FUNCTION_ARG_REGNO_P): Likewise.
(FIRST_PARM_OFFSET): Update to new v9 abi.
(REG_PARM_STACK_SPACE): Define for arch64.
(enum sparc_arg_class): Delete.
(sparc_arg_count,sparc_n_named_args): Delete.
(struct sparc_args): Redefine and use for arch32 as well as arch64.
(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
(FUNCTION_ARG_ADVANCE): Rewrite.
(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
(FUNCTION_ARG_CALLEE_COPIES): Delete.
(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
(STRICT_ARGUMENT_NAMING): Define.
(doublemove_string): Declare.
* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
(doublemove_string): New function.
(output_move_quad): Clean up some of the arch64 support.
(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
Don't add 8 bytes of reserved space if arch64.
(sparc_builtin_saveregs): Combine arch32/arch64 versions.
(init_cumulative_args): New function.
(function_arg_slotno): New static function.
(function_arg,function_arg_partial_nregs): New functions.
(function_arg_{pass_by_reference,advance}): New functions.
(function_arg_padding): New function.
First pass at updating to current v9 abi.
From-SVN: r15968
1997-10-17 22:39:37 +02:00
|
|
|
|
#define FUNCTION_ARG_PADDING(MODE, TYPE) \
|
|
|
|
|
function_arg_padding ((MODE), (TYPE))
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1992-03-30 05:49:49 +02:00
|
|
|
|
/* Generate the special assembly code needed to tell the assembler whatever
|
|
|
|
|
it might need to know about the return value of a function.
|
|
|
|
|
|
2002-09-15 14:03:42 +02:00
|
|
|
|
For SPARC assemblers, we need to output a .proc pseudo-op which conveys
|
1992-03-30 05:49:49 +02:00
|
|
|
|
information to the assembler relating to peephole optimization (done in
|
|
|
|
|
the assembler). */
|
|
|
|
|
|
|
|
|
|
#define ASM_DECLARE_RESULT(FILE, RESULT) \
|
1998-06-29 19:36:07 +02:00
|
|
|
|
fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (RESULT)))
|
1992-03-30 05:49:49 +02:00
|
|
|
|
|
1999-08-03 00:58:04 +02:00
|
|
|
|
/* Output the special assembly code needed to tell the assembler some
|
2002-10-22 23:51:54 +02:00
|
|
|
|
register is used as global register variable.
|
1999-12-06 20:53:38 +01:00
|
|
|
|
|
|
|
|
|
SPARC 64bit psABI declares registers %g2 and %g3 as application
|
|
|
|
|
registers and %g6 and %g7 as OS registers. Any object using them
|
|
|
|
|
should declare (for %g2/%g3 has to, for %g6/%g7 can) that it uses them
|
|
|
|
|
and how they are used (scratch or some global variable).
|
|
|
|
|
Linker will then refuse to link together objects which use those
|
|
|
|
|
registers incompatibly.
|
|
|
|
|
|
|
|
|
|
Unless the registers are used for scratch, two different global
|
|
|
|
|
registers cannot be declared to the same name, so in the unlikely
|
|
|
|
|
case of a global register variable occupying more than one register
|
|
|
|
|
we prefix the second and following registers with .gnu.part1. etc. */
|
|
|
|
|
|
2005-04-15 21:14:07 +02:00
|
|
|
|
extern GTY(()) char sparc_hard_reg_printed[8];
|
1999-08-03 00:58:04 +02:00
|
|
|
|
|
|
|
|
|
#ifdef HAVE_AS_REGISTER_PSEUDO_OP
|
|
|
|
|
#define ASM_DECLARE_REGISTER_GLOBAL(FILE, DECL, REGNO, NAME) \
|
|
|
|
|
do { \
|
|
|
|
|
if (TARGET_ARCH64) \
|
|
|
|
|
{ \
|
1999-12-06 20:53:38 +01:00
|
|
|
|
int end = HARD_REGNO_NREGS ((REGNO), DECL_MODE (decl)) + (REGNO); \
|
|
|
|
|
int reg; \
|
|
|
|
|
for (reg = (REGNO); reg < 8 && reg < end; reg++) \
|
|
|
|
|
if ((reg & ~1) == 2 || (reg & ~1) == 6) \
|
1999-08-03 00:58:04 +02:00
|
|
|
|
{ \
|
1999-12-06 20:53:38 +01:00
|
|
|
|
if (reg == (REGNO)) \
|
|
|
|
|
fprintf ((FILE), "\t.register\t%%g%d, %s\n", reg, (NAME)); \
|
1999-08-03 00:58:04 +02:00
|
|
|
|
else \
|
|
|
|
|
fprintf ((FILE), "\t.register\t%%g%d, .gnu.part%d.%s\n", \
|
1999-12-06 20:53:38 +01:00
|
|
|
|
reg, reg - (REGNO), (NAME)); \
|
|
|
|
|
sparc_hard_reg_printed[reg] = 1; \
|
1999-08-03 00:58:04 +02:00
|
|
|
|
} \
|
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
|
|
|
|
#endif
|
|
|
|
|
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
|
2002-03-30 22:01:19 +01:00
|
|
|
|
/* Emit rtl for profiling. */
|
|
|
|
|
#define PROFILE_HOOK(LABEL) sparc_profile_hook (LABEL)
|
1996-03-29 21:45:31 +01:00
|
|
|
|
|
2002-03-30 22:01:19 +01:00
|
|
|
|
/* All the work done in PROFILE_HOOK, but still required. */
|
|
|
|
|
#define FUNCTION_PROFILER(FILE, LABELNO) do { } while (0)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1999-06-21 19:47:44 +02:00
|
|
|
|
/* Set the name of the mcount function for the system. */
|
|
|
|
|
#define MCOUNT_FUNCTION "*mcount"
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
|
|
|
|
|
the stack pointer does not matter. The value is tested only in
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
functions that have frame pointers. */
|
|
|
|
|
#define EXIT_IGNORE_STACK 1
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Length in units of the trampoline for entering a nested function. */
|
1998-07-13 18:53:32 +02:00
|
|
|
|
#define TRAMPOLINE_SIZE (TARGET_ARCH64 ? 32 : 16)
|
|
|
|
|
|
2011-06-02 12:48:11 +02:00
|
|
|
|
/* Alignment required for trampolines, in bits. */
|
|
|
|
|
#define TRAMPOLINE_ALIGNMENT 128
|
1993-09-09 00:24:29 +02:00
|
|
|
|
|
1993-03-02 22:09:17 +01:00
|
|
|
|
/* Generate RTL to flush the register windows so as to make arbitrary frames
|
|
|
|
|
available. */
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define SETUP_FRAME_ADDRESSES() \
|
|
|
|
|
do { \
|
|
|
|
|
if (!TARGET_FLAT) \
|
|
|
|
|
emit_insn (gen_flush_register_windows ());\
|
|
|
|
|
} while (0)
|
1993-03-02 22:09:17 +01:00
|
|
|
|
|
|
|
|
|
/* Given an rtx for the address of a frame,
|
|
|
|
|
return an rtx for the address of the word in the frame
|
2004-02-03 13:36:23 +01:00
|
|
|
|
that holds the dynamic chain--the previous frame's address. */
|
2002-06-15 03:20:03 +02:00
|
|
|
|
#define DYNAMIC_CHAIN_ADDRESS(frame) \
|
|
|
|
|
plus_constant (frame, 14 * UNITS_PER_WORD + SPARC_STACK_BIAS)
|
1993-03-02 22:09:17 +01:00
|
|
|
|
|
2006-10-03 18:25:00 +02:00
|
|
|
|
/* Given an rtx for the frame pointer,
|
|
|
|
|
return an rtx for the address of the frame. */
|
|
|
|
|
#define FRAME_ADDR_RTX(frame) plus_constant (frame, SPARC_STACK_BIAS)
|
|
|
|
|
|
1993-03-02 22:09:17 +01:00
|
|
|
|
/* The return address isn't on the stack, it is in a register, so we can't
|
|
|
|
|
access it from the current frame pointer. We can access it from the
|
|
|
|
|
previous frame pointer though by reading a value from the register window
|
|
|
|
|
save area. */
|
|
|
|
|
#define RETURN_ADDR_IN_PREVIOUS_FRAME
|
|
|
|
|
|
1995-10-03 16:50:33 +01:00
|
|
|
|
/* This is the offset of the return address to the true next instruction to be
|
2001-11-03 17:38:52 +01:00
|
|
|
|
executed for the current function. */
|
1996-01-25 15:16:13 +01:00
|
|
|
|
#define RETURN_ADDR_OFFSET \
|
re PR testsuite/35843 (-fdump-rtl-expand does not exist anymore)
PR testsuite/35843
* cfgexpand.c (pass_expand): Turn into RTL pass.
* passes.c (execute_one_pass): Do pass typechecking after execution.
* tree-pass.h (pass_expand): Turn into RTL pass.
* function.h (struct rtl_data): Move here fields
accesses_prior_frames, calls_eh_return, saves_all_registers,
has_nonlocal_goto, has_asm_statement, is_thunk,
all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool,
uses_pic_offset_table, uses_eh_lsda, tail_call_emit,
arg_pointer_save_area_init from struct function; turn into bool.
(struct function): Move
calls_eh_return, saves_all_registers, has_nonlocal_goto,
has_asm_statement, is_thunk, all_throwers_are_sibcalls, limit_stack,
profile, uses_const_pool, uses_pic_offset_table, uses_eh_lsda,
tail_call_emit, arg_pointer_save_area_init
into struct rtl_data. Remove recursive_call_emit and gimplified flags.
(current_function_returns_struct, current_function_returns_pcc_struct,
current_function_calls_setjmp, current_function_calls_alloca,
current_function_accesses_prior_frames,
current_function_calls_eh_return, current_function_is_thunk,
current_function_stdarg, current_function_profile,
current_function_limit_stack, current_function_uses_pic_offset_table,
current_function_uses_const_pool, current_function_has_nonlocal_label,
current_function_saves_all_registers,
current_function_has_nonlocal_goto,
current_function_has_asm_statement): Remove accesor macros.
* ra-conflict.c (global_conflicts): Update.
* tree-tailcall.c (suitable_for_tail_opt_p): Update.
(suitable_for_tail_call_opt_p): Update.
* builtins.c (expand_builtin_return_addr): Update.
(expand_builtin_setjmp_setup): Update.
(expand_builtin_nonlocal_goto): Update.
* final.c (final_start_function): Update.
(profile_function): Update.
(leaf_function_p): Update.
(only_leaf_regs_used): Update.
* df-scan.c (df_get_exit_block_use_set): Update.
* dojump.c (clear_pending_stack_adjust): Update.
* tree-stdarg.c (gate_optimize_stdarg): Update.
* gimple-low.c (lower_function_body): Update.
* global.c (compute_regsets): Update.
(global_alloc): Update.
* dwarf2out.c (dwarf2out_begin_prologue): Update.
* expr.c (expand_assignment): Update.
* dse.c (dse_step0): Update.
(dse_step1): Update.
* c-decl.c (store_parm_decls): Update.
* local-alloc.c (combine_regs): Update.
(find_free_reg): Update.
* function.c (assign_parms_augmented_arg_list): Update.
(assign_parm_find_data_types): Update.
(assign_parms): Update.
(allocate_struct_function): Update.
(expand_function_start): Update.
(expand_function_end): Update.
(get_arg_pointer_save_area): Update.
(thread_prologue_and_epilogue_insns): Update.
(rest_of_match_asm_constraints): Update.
* stor-layout.c (variable_size): Update.
* gcse.c (gcse_main): Update.
(bypass_jumps): Update.
* gimplify.c (gimplify_function_tree): Update.
* calls.c (emit_call_1): Update.
(expand_call): Update.
* bt-load.c (compute_defs_uses_and_gen): Update.
* except.c (sjlj_assign_call_site_values): Update.
(sjlj_emit_function_enter): Update.
(can_throw_external): Update.
(set_nothrow_function_flags): Update.
(expand_builtin_unwind_init): Update.
(expand_eh_return): Update.
(convert_to_eh_region_ranges): Update.
(output_function_exception_table): Update.
* emit-rtl.c (gen_tmp_stack_mem): Update.
* cfgexpand.c (expand_used_vars): Update.
(tree_expand_cfg): Update.
* cfgcleanup.c (rest_of_handle_jump): Update.
* explow.c (allocate_dynamic_stack_space): Update.
* varasm.c (assemble_start_function): Update.
(force_const_mem): Update.
(mark_constant_pool): Update.
* tree-optimize.c (tree_rest_of_compilation): Update.
* stack-ptr-mod.c (notice_stack_pointer_modification): Update.
* tree-cfg.c (notice_special_calls): Update.
(is_ctrl_altering_stmt): Update.
(tree_can_make_abnormal_goto): Update.
(tree_purge_dead_abnormal_call_edges): Update.
* config/alpha/predicates.md: Update.
* config/alpha/alpha.c (alpha_sa_mask): Update.
(alpha_sa_size): Update.
(alpha_does_function_need_gp): Update.
(alpha_expand_prologue): Update.
(alpha_start_function): Update.
(alpha_output_function_end_prologue): Update.
(alpha_expand_epilogue): Update.
* config/frv/frv.c (frv_stack_info): Update.
(frv_expand_epilogue): Update.
* config/s390/s390.c (s390_regs_ever_clobbered): Update.
(s390_register_info): Update.
(s390_frame_info): Update.
(s390_init_frame_layout): Update.
(s390_can_eliminate): Update.
(save_gprs): Update.
* config/spu/spu.c (spu_split_immediate): Update.
(need_to_save_reg): Update.
(spu_expand_prologue): Update.
(spu_expand_epilogue): Update.
* config/sparc/sparc.md: Update.
* config/sparc/sparc.c (eligible_for_return_delay): Update.
(sparc_tls_got): Update.
(legitimize_pic_address): Update.
(sparc_emit_call_insn): Update.
(sparc_expand_prologue): Update.
(output_return): Update.
(print_operand): Update.
(sparc_function_ok_for_sibcall): Update.
* config/sparc/sparc.h (EXIT_IGNORE_STACK): Update.
* config/m32r/m32r.md: Update.
* config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Update.
(m32r_compute_frame_size): Update.
(m32r_expand_prologue): Update.
(m32r_expand_epilogue): Update.
(m32r_legitimize_pic_address): Update.
* config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Update.
* config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
* config/i386/i386.c (ix86_frame_pointer_required): Update.
(gen_push): Update.
(ix86_save_reg): Update.
(ix86_compute_frame_layout): Update.
(ix86_expand_prologue): Update.
(ix86_expand_epilogue): Update.
* config/sh/sh.c (output_stack_adjust): Update.
(calc_live_regs): Update.
(sh5_schedule_saves): Update.
(sh_expand_prologue): Update.
(sh_expand_epilogue): Update.
(sh_setup_incoming_varargs): Update.
(sh_allocate_initial_value): Update.
(sh_get_pr_initial_val): Update.
* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Update.
* config/sh/sh.md (label:): Update.
* config/avr/avr.c (out_movhi_mr_r): Update.
* config/crx/crx.h (enum): Update.
* config/xtensa/xtensa.h (along): Update.
* config/stormy16/stormy16.c Update.
(xstormy16_compute_stack_layout): Update.
* config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Update.
(fr30_expand_prologue): Update.
* config/cris/cris.c (cris_conditional_register_usage): Update.
(cris_reg_saved_in_regsave_area): Update.
(cris_initial_frame_pointer_offset): Update.
(cris_simple_epilogue): Update.
(cris_expand_prologue): Update.
(cris_expand_epilogue): Update.
(cris_expand_pic_call_address): Update.
(cris_asm_output_symbol_ref): Update.
(cris_asm_output_label_ref): Update.
* config/cris/cris.md Update.
* config/iq2000/iq2000.c (compute_frame_size): Update.
(iq2000_expand_epilogue): Update.
* config/mt/mt.h (save_direction): Update.
* config/mn10300/mn10300.c (mn10300_function_value): Update.
* config/ia64/ia64.c (ia64_compute_frame_size): Update.
(ia64_secondary_reload_class): Update.
* config/m68k/m68k.c (m68k_save_reg): Update.
(m68k_expand_prologue): Update.
(m68k_expand_epilogue): Update.
(legitimize_pic_address): Update.
* config/rs6000/rs6000.c (rs6000_got_register): Update.
(first_reg_to_save): Update.
(first_altivec_reg_to_save): Update.
(compute_vrsave_mask): Update.
(compute_save_world_info): Update.
(rs6000_stack_info): Update.
(spe_func_has_64bit_regs_p): Update.
(rs6000_ra_ever_killed): Update.
(rs6000_emit_eh_reg_restore): Update.
(rs6000_emit_allocate_stack): Update.
(rs6000_emit_prologue): Update.
(rs6000_emit_epilogue): Update.
(rs6000_output_function_epilogue): Update.
(output_profile_hook): Update.
(rs6000_elf_declare_function_name): Update.
* config/rs6000/rs6000.h (rs6000_args): Update.
* config/rs6000/rs6000.md: Update.
* config/mcore/mcore.c (mcore_expand_prolog): Update.
* config/arc/arc.c (arc_output_function_epilogue): Update.
* config/arc/arc.h (FRAME_POINTER_REQUIRED): Update.
* config/darwin.c (machopic_function_base_name): Update.
* config/score/score3.c (score3_compute_frame_size): Update.
(rpush): Update.
(rpop): Update.
(score3_epilogue): Update.
* config/score/score7.c (score7_compute_frame_size): Update.
(score7_prologue): Update.
(score7_epilogue): Update.
* config/score/score.h (FRAME_POINTER_REQUIRED): Update.
* config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
* config/arm/arm.c (use_return_insn): Update.
(require_pic_register): Update.
(arm_load_pic_register): Update.
(arm_compute_save_reg0_reg12_mask): Update.
(arm_compute_save_reg_mask): Update.
(thumb1_compute_save_reg_mask): Update.
(output_return_instruction): Update.
(arm_output_function_prologue): Update.
(arm_output_epilogue): Update.
(arm_get_frame_offsets): Update.
(arm_expand_prologue): Update.
(thumb_pushpop): Update.
(thumb_exit): Update.
(thumb1_expand_prologue): Update.
(thumb1_expand_epilogue): Update.
(arm_unwind_emit): Update.
(arm_output_fn_unwind): Update.
* config/arm/arm.h (FRAME_POINTER_REQUIRED): Update.
* config/arm/arm.md: Update.
* config/pa/pa.md: Update.
* config/pa/pa.c (legitimize_pic_address): Update.
(compute_frame_size): Update.
(hppa_expand_prologue): Update.
(hppa_expand_epilogue): Update.
(borx_reg_operand): Update.
* config/pa/pa.h (FRAME_POINTER_REQUIRED): Update.
(HARD_REGNO_RENAME_OK): Update.
* config/mips/mips.c (mips_global_pointer): Update.
(mips_save_reg_p): Update.
(mips_compute_frame_info): Update.
(mips_frame_pointer_required): Update.
(mips_expand_prologue): Update.
(mips_expand_epilogue): Update.
(mips_can_use_return_insn): Update.
(mips_reorg_process_insns): Update.
* config/v850/v850.c (compute_register_save_size): Update.
* config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Update.
* config/mmix/mmix.c (along): Update.
(mmix_expand_epilogue): Update.
* config/bfin/bfin.c (legitimize_pic_address): Update.
(must_save_p): Update.
(stack_frame_needed_p): Update.
(add_to_reg): Update.
(bfin_expand_prologue): Update.
* stmt.c (expand_asm_operands): Update.
* reload1.c (reload): Update.
(init_elim_table): Update.
From-SVN: r134682
2008-04-26 01:14:40 +02:00
|
|
|
|
(8 + 4 * (! TARGET_ARCH64 && cfun->returns_struct))
|
1995-10-03 16:50:33 +01:00
|
|
|
|
|
1993-03-02 22:09:17 +01:00
|
|
|
|
/* The current return address is in %i7. The return address of anything
|
|
|
|
|
farther back is in the register window save area at [%fp+60]. */
|
|
|
|
|
/* ??? This ignores the fact that the actual return address is +8 for normal
|
|
|
|
|
returns, and +12 for structure returns. */
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define RETURN_ADDR_REGNUM 31
|
1993-03-02 22:09:17 +01:00
|
|
|
|
#define RETURN_ADDR_RTX(count, frame) \
|
|
|
|
|
((count == -1) \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
? gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM) \
|
1998-04-18 03:24:59 +02:00
|
|
|
|
: gen_rtx_MEM (Pmode, \
|
1999-09-07 07:49:18 +02:00
|
|
|
|
memory_address (Pmode, plus_constant (frame, \
|
2002-03-12 16:19:40 +01:00
|
|
|
|
15 * UNITS_PER_WORD \
|
|
|
|
|
+ SPARC_STACK_BIAS))))
|
1996-07-26 20:17:32 +02:00
|
|
|
|
|
1997-10-11 00:33:24 +02:00
|
|
|
|
/* Before the prologue, the return address is %o7 + 8. OK, sometimes it's
|
|
|
|
|
+12, but always using +8 is close enough for frame unwind purposes.
|
|
|
|
|
Actually, just using %o7 is close enough for unwinding, but %o7+8
|
|
|
|
|
is something you can return to. */
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define INCOMING_RETURN_ADDR_REGNUM 15
|
1997-10-11 00:33:24 +02:00
|
|
|
|
#define INCOMING_RETURN_ADDR_RTX \
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
plus_constant (gen_rtx_REG (word_mode, INCOMING_RETURN_ADDR_REGNUM), 8)
|
|
|
|
|
#define DWARF_FRAME_RETURN_COLUMN \
|
|
|
|
|
DWARF_FRAME_REGNUM (INCOMING_RETURN_ADDR_REGNUM)
|
1997-10-11 00:33:24 +02:00
|
|
|
|
|
|
|
|
|
/* The offset from the incoming value of %sp to the top of the stack frame
|
|
|
|
|
for the current function. On sparc64, we have to account for the stack
|
|
|
|
|
bias if present. */
|
|
|
|
|
#define INCOMING_FRAME_SP_OFFSET SPARC_STACK_BIAS
|
|
|
|
|
|
2001-03-28 13:23:52 +02:00
|
|
|
|
/* Describe how we implement __builtin_eh_return. */
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define EH_RETURN_REGNUM 1
|
2001-03-28 13:23:52 +02:00
|
|
|
|
#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 24 : INVALID_REGNUM)
|
invoke.texi (SPARC options): Add -mflat.
gcc/
* doc/invoke.texi (SPARC options): Add -mflat.
* config/sparc/sparc.opt: Likewise.
* config/sparc/sparc-protos.h (sparc_expand_epilogue): Add parameter.
(sparc_flat_expand_prologue): Declare.
(sparc_flat_expand_epilogue): Likewise.
* config/sparc/sparc.h (CPP_CPU_SPEC): Do not handle -msoft-float.
(CPP_ENDIAN_SPEC): Replace with...
(CPP_OTHER_SPEC): ...this. Also handle -mflat and -msoft-float.
(CPP_SPEC): Adjust to above change.
(EXTRA_SPECS): Likewise.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(SETUP_FRAME_ADDRESSES): Likewise.
(FIXED_REGISTERS): Set 0 for %fp.
(CALL_USED_REGISTERS): Likewise.
(INITIAL_ELIMINATION_OFFSET): Pass current_function_is_leaf.
(EXIT_IGNORE_STACK): Define to 1 unconditionally.
(RETURN_ADDR_REGNUM): Define.
(RETURN_ADDR_RTX): Use it.
(INCOMING_RETURN_ADDR_REGNUM): Define.
(INCOMING_RETURN_ADDR_RTX): Use it.
(DWARF_FRAME_RETURN_COLUMN): Likewise.
(EH_RETURN_REGNUM): Define.
(EH_RETURN_STACKADJ_RTX): Use it.
(EH_RETURN_HANDLER_RTX): Delete.
(EPILOGUE_USES): Use them and add TARGET_FLAT handling.
* config/sparc/sparc.c (apparent_fsize, actual_fsize, num_gfregs):
Delete.
(struct machine_function): Add frame_size, apparent_frame_size,
frame_base_reg, frame_base_offset, n_global_fp_regs and
save_local_in_regs_p fields.
(sparc_frame_size, sparc_apparent_frame_size, sparc_frame_base_reg,
sparc_frame_base_offset, sparc_n_global_fp_regs,
sparc_save_local_in_regs_p): New macros.
(sparc_option_override): Error out if -fcall-saved-REG is specified
for Out registers.
(eligible_for_restore_insn): Fix formatting.
(eligible_for_return_delay): Likewise. Add TARGET_FLAT handling.
(eligible_for_sibcall_delay): Likewise.
(RTX_OK_FOR_OFFSET_P, RTX_OK_FOR_OLO10_P): Add MODE parameter.
(sparc_legitimate_address_p): Adjust to above change.
(save_global_or_fp_reg_p): New predicate.
(return_addr_reg_needed_p): Likewise.
(save_local_or_in_reg_p): Likewise.
(sparc_compute_frame_size): Use them. Add TARGET_FLAT handling.
(SORR_SAVE, SORR_RESTORE): Delete.
(sorr_pred_t): New typedef.
(sorr_act_t): New enum.
(save_or_restore_regs): Rename to...
(emit_save_or_restore_regs): ...this. Change type of LOW and HIGH
parameters, remove ACTION parameter, add LEAF_FUNCTION_P, SAVE_P,
ACTION_TRUE and ACTION_FALSE parameters. Implement more general
mechanism. Add CFI information for double-word saves in 32-bit mode.
(emit_adjust_base_to_offset): New function extracted from...
(emit_save_or_restore_regs): ...this. Rename the rest to...
(emit_save_or_restore_regs_global_fp_regs): ...this.
(emit_save_or_restore_regs_local_in_regs): New function.
(gen_create_flat_frame_[123]): New functions.
(sparc_expand_prologue): Use SIZE local variable. Adjust.
(sparc_flat_expand_prologue): New function.
(sparc_asm_function_prologue): Add TARGET_FLAT handling.
(sparc_expand_epilogue): Use SIZE local variable. Adjust.
(sparc_flat_expand_epilogue): New function.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(output_return): Likewise.
(output_sibcall): Likewise.
(sparc_output_mi_thunk): Likewise.
(sparc_frame_pointer_required): Likewise.
(sparc_conditional_register_usage): If TARGET_FLAT, disable the leaf
function optimization.
* config/sparc/sparc.md (flat): New attribute.
(prologue): Add TARGET_FLAT handling.
(save_register_window): Disable if TARGET_FLAT.
(create_flat_frame_[123]): New patterns.
(epilogue): Add TARGET_FLAT handling.
(sibcall_epilogue): Likewise.
(eh_return): New expander.
(eh_return_internal): New insn and splitter.
(return_internal): Add TARGET_FLAT handling.
(untyped_return): Remove bogus test and use RETURN_ADDR_REGNUM.
(save_stack_nonlocal): Use RETURN_ADDR_REGNUM.
(nonlocal_goto): Add TARGET_FLAT handling.
* config/sparc/t-elf: Add -mflat multilib.
* config/sparc/t-leon: Likewise.
libgcc/
* config/sparc/linux-unwind.h (STACK_BIAS): Define.
(sparc64_fallback_frame_state): Use it.
(sparc64_frob_update_context): Further adjust context.
* config/sparc/sol2-unwind.h (sparc64_frob_update_context): Likewise.
* config/sparc/sol2-ci.S: Add TARGET_FLAT handling.
* config/sparc/sol2-cn.S: Likewise.
Co-Authored-By: Laurent Rougé <laurent.rouge@menta.fr>
From-SVN: r174897
2011-06-10 12:50:20 +02:00
|
|
|
|
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, EH_RETURN_REGNUM)
|
|
|
|
|
|
|
|
|
|
/* Define registers used by the epilogue and return instruction. */
|
|
|
|
|
#define EPILOGUE_USES(REGNO) \
|
|
|
|
|
((REGNO) == RETURN_ADDR_REGNUM \
|
|
|
|
|
|| (TARGET_FLAT \
|
|
|
|
|
&& epilogue_completed \
|
|
|
|
|
&& (REGNO) == INCOMING_RETURN_ADDR_REGNUM) \
|
|
|
|
|
|| (crtl->calls_eh_return && (REGNO) == EH_RETURN_REGNUM))
|
2001-12-28 10:55:14 +01:00
|
|
|
|
|
|
|
|
|
/* Select a format to encode pointers in exception handling data. CODE
|
|
|
|
|
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
|
|
|
|
|
true if the symbol may be affected by dynamic relocations.
|
|
|
|
|
|
|
|
|
|
If assembler and linker properly support .uaword %r_disp32(foo),
|
|
|
|
|
then use PC relative 32-bit relocations instead of absolute relocs
|
|
|
|
|
for shared libraries. On sparc64, use pc relative 32-bit relocs even
|
2002-04-04 00:21:12 +02:00
|
|
|
|
for binaries, to save memory.
|
|
|
|
|
|
|
|
|
|
binutils 2.12 would emit a R_SPARC_DISP32 dynamic relocation if the
|
|
|
|
|
symbol %r_disp32() is against was not local, but .hidden. In that
|
|
|
|
|
case, we have to use DW_EH_PE_absptr for pic personality. */
|
2001-12-28 10:55:14 +01:00
|
|
|
|
#ifdef HAVE_AS_SPARC_UA_PCREL
|
2002-04-04 00:21:12 +02:00
|
|
|
|
#ifdef HAVE_AS_SPARC_UA_PCREL_HIDDEN
|
2001-12-28 10:55:14 +01:00
|
|
|
|
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
|
|
|
|
(flag_pic \
|
|
|
|
|
? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
|
|
|
|
|
: ((TARGET_ARCH64 && ! GLOBAL) \
|
|
|
|
|
? (DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
|
|
|
|
|
: DW_EH_PE_absptr))
|
2002-04-04 00:21:12 +02:00
|
|
|
|
#else
|
|
|
|
|
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
|
|
|
|
(flag_pic \
|
|
|
|
|
? (GLOBAL ? DW_EH_PE_absptr : (DW_EH_PE_pcrel | DW_EH_PE_sdata4)) \
|
|
|
|
|
: ((TARGET_ARCH64 && ! GLOBAL) \
|
|
|
|
|
? (DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
|
|
|
|
|
: DW_EH_PE_absptr))
|
|
|
|
|
#endif
|
2001-12-28 10:55:14 +01:00
|
|
|
|
|
|
|
|
|
/* Emit a PC-relative relocation. */
|
|
|
|
|
#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL) \
|
|
|
|
|
do { \
|
|
|
|
|
fputs (integer_asm_op (SIZE, FALSE), FILE); \
|
|
|
|
|
fprintf (FILE, "%%r_disp%d(", SIZE * 8); \
|
|
|
|
|
assemble_name (FILE, LABEL); \
|
|
|
|
|
fputc (')', FILE); \
|
|
|
|
|
} while (0)
|
|
|
|
|
#endif
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Addressing modes, and classification of registers for them. */
|
|
|
|
|
|
|
|
|
|
/* Macros to check register numbers against specific register classes. */
|
|
|
|
|
|
|
|
|
|
/* These assume that REGNO is a hard or pseudo reg number.
|
|
|
|
|
They give nonzero only if REGNO is a hard reg of the suitable class
|
|
|
|
|
or a pseudo reg currently allocated to a suitable hard reg.
|
|
|
|
|
Since they use reg_renumber, they are safe only once reg_renumber
|
|
|
|
|
has been allocated, which happens in local-alloc.c. */
|
|
|
|
|
|
|
|
|
|
#define REGNO_OK_FOR_INDEX_P(REGNO) \
|
2011-10-23 23:50:56 +02:00
|
|
|
|
(SPARC_INT_REG_P (REGNO) || SPARC_INT_REG_P (reg_renumber[REGNO]) \
|
|
|
|
|
|| (REGNO) == FRAME_POINTER_REGNUM \
|
2002-02-04 19:16:07 +01:00
|
|
|
|
|| reg_renumber[REGNO] == FRAME_POINTER_REGNUM)
|
|
|
|
|
|
|
|
|
|
#define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P (REGNO)
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
#define REGNO_OK_FOR_FP_P(REGNO) \
|
1998-06-29 19:36:07 +02:00
|
|
|
|
(((unsigned) (REGNO) - 32 < (TARGET_V9 ? (unsigned)64 : (unsigned)32)) \
|
|
|
|
|
|| ((unsigned) reg_renumber[REGNO] - 32 < (TARGET_V9 ? (unsigned)64 : (unsigned)32)))
|
2011-07-09 12:13:56 +02:00
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define REGNO_OK_FOR_CCFP_P(REGNO) \
|
|
|
|
|
(TARGET_V9 \
|
1998-06-29 19:36:07 +02:00
|
|
|
|
&& (((unsigned) (REGNO) - 96 < (unsigned)4) \
|
|
|
|
|
|| ((unsigned) reg_renumber[REGNO] - 96 < (unsigned)4)))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Maximum number of registers that can appear in a valid memory address. */
|
|
|
|
|
|
|
|
|
|
#define MAX_REGS_PER_ADDRESS 2
|
|
|
|
|
|
1993-08-12 19:52:01 +02:00
|
|
|
|
/* Recognize any constant value that is a valid address.
|
|
|
|
|
When PIC, we do not accept an address that would require a scratch reg
|
|
|
|
|
to load into a register. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
sparc.c (struct machine_function): New type.
* config/sparc/sparc.c (struct machine_function): New type.
(TARGET_HAVE_TLS, TARGET_CANNOT_FORCE_CONST_MEM): Define.
(sparc_override_options): Initialize init_machine_status.
(tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand): New functions.
(symbolic_operand): Disallow tls_symbolic_operand.
(symbolic_memory_operand): Likewise.
(tls_call_delay, sparc_cannot_force_const_mem, legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p):
New functions.
(sparc_tls_symbol): New variable.
(sparc_tls_get_addr, sparc_tls_got, legitimize_tls_address,
legitimize_address): New functions.
(print_operand): Handle %&.
(sparc_init_machine_status, get_some_local_dynamic_name,
get_some_local_dynamic_name_1): New functions.
(sparc_output_dwarf_dtprel): New function.
* config/sparc/sparc.h (CONSTANT_ADDRESS_P): Moved into
constant_address_p.
(LEGITIMATE_PIC_OPERAND_P): Moved into legitimate_pic_operand_p.
(LEGITIMATE_CONSTANT_P): Moved into legitimate_constant_p.
(GO_IF_LEGITIMATE_ADDRESS): Moved into legitimate_address_p.
(LEGITIMIZE_ADDRESS): Moved into legitimize_address.
(PRINT_OPERAND_PUNCT_VALID_P): Add '&'.
(TARGET_TLS, TARGET_SUN_TLS, TARGET_GNU_TLS): Define.
(ASM_OUTPUT_DWARF_DTPREL): Define.
(PREDICATE_CODES): Add tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand.
* config/sparc/sparc.md (UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_TLSLDO,
UNSPEC_TLSIE, UNSPEC_TLSLE, UNSPEC_TLSLD_BASE): New constants.
(tls_call_delay): New attribute.
(in_call_delay): Use it.
(movqi, movhi, movsi, movdi): Call legitimize_tls_address if needed.
(tgd_hi22, tgd_lo10, tgd_add32, tgd_add64, tgd_call32, tgd_call64,
tldm_hi22, tldm_lo10, tldm_add32, tldm_add64, tldm_call32, tldm_call64,
tldo_hix22, tldo_lox10, tldo_add32, tldo_add64, tie_hi22, tie_lo10,
tie_ld32, tie_ld64, tie_add32, tie_add64, tle_hix22_sp32,
tle_lox10_sp32, tle_hix22_sp64, tle_lox10_sp64): New insns.
(tldo_ldub_sp32, tldo_ldub1_sp32, tldo_ldub2_sp32, tldo_ldsb1_sp32,
tldo_ldsb2_sp32, tldo_ldub_sp64, tldo_ldub1_sp64, tldo_ldub2_sp64,
tldo_ldub3_sp64, tldo_ldsb1_sp64, tldo_ldsb2_sp64, tldo_ldsb3_sp64,
tldo_lduh_sp32, tldo_lduh1_sp32, tldo_ldsh1_sp32, tldo_lduh_sp64,
tldo_lduh1_sp64, tldo_lduh2_sp64, tldo_ldsh1_sp64, tldo_ldsh2_sp64,
tldo_lduw_sp32, tldo_lduw_sp64, tldo_lduw1_sp64, tldo_ldsw1_sp64,
tldo_ldx_sp64, tldo_stb_sp32, tldo_stb_sp64, tldo_sth_sp32,
tldo_sth_sp64, tldo_stw_sp32, tldo_stw_sp64, tldo_stx_sp64): New
insns.
* config/sparc/sparc-protos.h (legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p,
legitimize_tls_address, legitimize_address, tls_symbolic_operand,
tls_call_delay, sparc_output_dwarf_dtprel): New prototypes.
* config/sparc/linux.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Define.
* config/sparc/linux64.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Likewise.
* configure.in (sparc*-*-*): Add TLS check.
* configure: Rebuilt.
From-SVN: r71202
2003-09-08 08:57:05 +02:00
|
|
|
|
#define CONSTANT_ADDRESS_P(X) constant_address_p (X)
|
1993-08-12 19:52:01 +02:00
|
|
|
|
|
|
|
|
|
/* Define this, so that when PIC, reload won't try to reload invalid
|
|
|
|
|
addresses which require two reload registers. */
|
|
|
|
|
|
sparc.c (struct machine_function): New type.
* config/sparc/sparc.c (struct machine_function): New type.
(TARGET_HAVE_TLS, TARGET_CANNOT_FORCE_CONST_MEM): Define.
(sparc_override_options): Initialize init_machine_status.
(tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand): New functions.
(symbolic_operand): Disallow tls_symbolic_operand.
(symbolic_memory_operand): Likewise.
(tls_call_delay, sparc_cannot_force_const_mem, legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p):
New functions.
(sparc_tls_symbol): New variable.
(sparc_tls_get_addr, sparc_tls_got, legitimize_tls_address,
legitimize_address): New functions.
(print_operand): Handle %&.
(sparc_init_machine_status, get_some_local_dynamic_name,
get_some_local_dynamic_name_1): New functions.
(sparc_output_dwarf_dtprel): New function.
* config/sparc/sparc.h (CONSTANT_ADDRESS_P): Moved into
constant_address_p.
(LEGITIMATE_PIC_OPERAND_P): Moved into legitimate_pic_operand_p.
(LEGITIMATE_CONSTANT_P): Moved into legitimate_constant_p.
(GO_IF_LEGITIMATE_ADDRESS): Moved into legitimate_address_p.
(LEGITIMIZE_ADDRESS): Moved into legitimize_address.
(PRINT_OPERAND_PUNCT_VALID_P): Add '&'.
(TARGET_TLS, TARGET_SUN_TLS, TARGET_GNU_TLS): Define.
(ASM_OUTPUT_DWARF_DTPREL): Define.
(PREDICATE_CODES): Add tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand.
* config/sparc/sparc.md (UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_TLSLDO,
UNSPEC_TLSIE, UNSPEC_TLSLE, UNSPEC_TLSLD_BASE): New constants.
(tls_call_delay): New attribute.
(in_call_delay): Use it.
(movqi, movhi, movsi, movdi): Call legitimize_tls_address if needed.
(tgd_hi22, tgd_lo10, tgd_add32, tgd_add64, tgd_call32, tgd_call64,
tldm_hi22, tldm_lo10, tldm_add32, tldm_add64, tldm_call32, tldm_call64,
tldo_hix22, tldo_lox10, tldo_add32, tldo_add64, tie_hi22, tie_lo10,
tie_ld32, tie_ld64, tie_add32, tie_add64, tle_hix22_sp32,
tle_lox10_sp32, tle_hix22_sp64, tle_lox10_sp64): New insns.
(tldo_ldub_sp32, tldo_ldub1_sp32, tldo_ldub2_sp32, tldo_ldsb1_sp32,
tldo_ldsb2_sp32, tldo_ldub_sp64, tldo_ldub1_sp64, tldo_ldub2_sp64,
tldo_ldub3_sp64, tldo_ldsb1_sp64, tldo_ldsb2_sp64, tldo_ldsb3_sp64,
tldo_lduh_sp32, tldo_lduh1_sp32, tldo_ldsh1_sp32, tldo_lduh_sp64,
tldo_lduh1_sp64, tldo_lduh2_sp64, tldo_ldsh1_sp64, tldo_ldsh2_sp64,
tldo_lduw_sp32, tldo_lduw_sp64, tldo_lduw1_sp64, tldo_ldsw1_sp64,
tldo_ldx_sp64, tldo_stb_sp32, tldo_stb_sp64, tldo_sth_sp32,
tldo_sth_sp64, tldo_stw_sp32, tldo_stw_sp64, tldo_stx_sp64): New
insns.
* config/sparc/sparc-protos.h (legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p,
legitimize_tls_address, legitimize_address, tls_symbolic_operand,
tls_call_delay, sparc_output_dwarf_dtprel): New prototypes.
* config/sparc/linux.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Define.
* config/sparc/linux64.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Likewise.
* configure.in (sparc*-*-*): Add TLS check.
* configure: Rebuilt.
From-SVN: r71202
2003-09-08 08:57:05 +02:00
|
|
|
|
#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1999-08-03 00:58:04 +02:00
|
|
|
|
/* Should gcc use [%reg+%lo(xx)+offset] addresses? */
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_AS_OFFSETABLE_LO10
|
|
|
|
|
#define USE_AS_OFFSETABLE_LO10 1
|
|
|
|
|
#else
|
|
|
|
|
#define USE_AS_OFFSETABLE_LO10 0
|
|
|
|
|
#endif
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1999-01-07 04:18:28 +01:00
|
|
|
|
/* Try a machine-dependent way of reloading an illegitimate address
|
|
|
|
|
operand. If we find one, push the reload and jump to WIN. This
|
2010-07-25 23:46:32 +02:00
|
|
|
|
macro is used in only one place: `find_reloads_address' in reload.c. */
|
|
|
|
|
#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \
|
|
|
|
|
do { \
|
|
|
|
|
int win; \
|
|
|
|
|
(X) = sparc_legitimize_reload_address ((X), (MODE), (OPNUM), \
|
|
|
|
|
(int)(TYPE), (IND_LEVELS), &win); \
|
|
|
|
|
if (win) \
|
|
|
|
|
goto WIN; \
|
1999-01-07 04:18:28 +01:00
|
|
|
|
} while (0)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Specify the machine mode that this machine uses
|
|
|
|
|
for the index in the tablejump instruction. */
|
1998-09-09 04:19:08 +02:00
|
|
|
|
/* If we ever implement any of the full models (such as CM_FULLANY),
|
|
|
|
|
this has to be DImode in that case */
|
1998-09-11 00:28:30 +02:00
|
|
|
|
#ifdef HAVE_GAS_SUBSECTION_ORDERING
|
1998-09-09 04:19:08 +02:00
|
|
|
|
#define CASE_VECTOR_MODE \
|
|
|
|
|
(! TARGET_PTR64 ? SImode : flag_pic ? SImode : TARGET_CM_MEDLOW ? SImode : DImode)
|
1998-09-11 00:28:30 +02:00
|
|
|
|
#else
|
|
|
|
|
/* If assembler does not have working .subsection -1, we use DImode for pic, as otherwise
|
2001-11-03 17:38:52 +01:00
|
|
|
|
we have to sign extend which slows things down. */
|
1998-09-11 00:28:30 +02:00
|
|
|
|
#define CASE_VECTOR_MODE \
|
|
|
|
|
(! TARGET_PTR64 ? SImode : flag_pic ? DImode : TARGET_CM_MEDLOW ? SImode : DImode)
|
|
|
|
|
#endif
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Define this as 1 if `char' should by default be signed; else as 0. */
|
|
|
|
|
#define DEFAULT_SIGNED_CHAR 1
|
|
|
|
|
|
|
|
|
|
/* Max number of bytes we can move from memory to memory
|
|
|
|
|
in one reasonably fast instruction. */
|
1992-04-08 07:33:24 +02:00
|
|
|
|
#define MOVE_MAX 8
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2004-06-09 20:26:11 +02:00
|
|
|
|
/* If a memory-to-memory move would take MOVE_RATIO or more simple
|
2004-07-07 21:25:01 +02:00
|
|
|
|
move-instruction pairs, we will do a movmem or libcall instead. */
|
2004-06-09 20:26:11 +02:00
|
|
|
|
|
2008-09-01 11:27:39 +02:00
|
|
|
|
#define MOVE_RATIO(speed) ((speed) ? 8 : 3)
|
2004-06-09 20:26:11 +02:00
|
|
|
|
|
1993-09-25 14:29:59 +02:00
|
|
|
|
/* Define if operations between registers always perform the operation
|
|
|
|
|
on the full register even if a narrower mode is specified. */
|
|
|
|
|
#define WORD_REGISTER_OPERATIONS
|
|
|
|
|
|
|
|
|
|
/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
|
|
|
|
|
will either zero-extend or sign-extend. The value of this macro should
|
|
|
|
|
be the code that says which one of the two operations is implicitly
|
rtl.def (NIL): Delete.
* rtl.def (NIL): Delete.
* read-rtl.c (read_rtx): Handle (nil) like (define_constants).
Tighten the syntax a little.
* cfgloop.h, combine.c, cse.c, loop-iv.c, postreload.c, reload.c
* config/alpha/alpha.c, config/alpha/alpha.h, config/arc/arc.h
* config/arm/arm.h, config/frv/frv.h, config/i386/i386.c
* config/i386/predicates.md, config/m32r/m32r.h
* config/m68hc11/m68hc11.c, config/mcore/mcore.h, config/mips/mips.c
* config/mmix/mmix.c, config/pa/pa.h, config/sh/sh.h
* config/sparc/sparc.h, doc/tm.texi:
Replace all occurrences of NIL with UNKNOWN.
From-SVN: r86193
2004-08-18 19:05:14 +02:00
|
|
|
|
done, UNKNOWN if none. */
|
1993-09-25 14:29:59 +02:00
|
|
|
|
#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Nonzero if access to memory by bytes is slow and undesirable.
|
|
|
|
|
For RISC chips, it means that access to memory by bytes is no
|
|
|
|
|
better than access by words when possible, so grab a whole word
|
|
|
|
|
and maybe make use of that. */
|
|
|
|
|
#define SLOW_BYTE_ACCESS 1
|
|
|
|
|
|
1993-10-11 12:43:24 +01:00
|
|
|
|
/* Define this to be nonzero if shift instructions ignore all but the low-order
|
2001-11-03 17:38:52 +01:00
|
|
|
|
few bits. */
|
1993-10-11 12:43:24 +01:00
|
|
|
|
#define SHIFT_COUNT_TRUNCATED 1
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
|
|
|
|
|
is done just by pretending it is already truncated. */
|
|
|
|
|
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
|
|
|
|
|
|
2011-10-06 08:28:35 +02:00
|
|
|
|
/* For SImode, we make sure the top 32-bits of the register are clear and
|
|
|
|
|
then we subtract 32 from the lzd instruction result. */
|
|
|
|
|
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
|
|
|
|
|
((VALUE) = ((MODE) == SImode ? 32 : 64), 1)
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
|
1992-05-20 02:10:41 +02:00
|
|
|
|
return the mode to be used for the comparison. For floating-point,
|
2000-01-26 03:06:21 +01:00
|
|
|
|
CCFP[E]mode is used. CC_NOOVmode should be used when the first operand
|
|
|
|
|
is a PLUS, MINUS, NEG, or ASHIFT. CCmode should be used when no special
|
1993-10-06 05:07:24 +01:00
|
|
|
|
processing is needed. */
|
2000-01-25 13:42:25 +01:00
|
|
|
|
#define SELECT_CC_MODE(OP,X,Y) select_cc_mode ((OP), (X), (Y))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2002-09-18 13:43:45 +02:00
|
|
|
|
/* Return nonzero if MODE implies a floating point inequality can be
|
2002-09-15 14:03:42 +02:00
|
|
|
|
reversed. For SPARC this is always true because we have a full
|
2000-03-24 22:50:31 +01:00
|
|
|
|
compliment of ordered and unordered comparisons, but until generic
|
|
|
|
|
code knows how to reverse it correctly we keep the old definition. */
|
|
|
|
|
#define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode && (MODE) != CCFPmode)
|
1994-02-12 14:50:50 +01:00
|
|
|
|
|
2001-01-02 03:45:03 +01:00
|
|
|
|
/* A function address in a call instruction for indexing purposes. */
|
|
|
|
|
#define FUNCTION_MODE Pmode
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Define this if addresses of constant functions
|
|
|
|
|
shouldn't be put through pseudo regs where they can be cse'd.
|
|
|
|
|
Desirable on machines where ordinary constants are expensive
|
|
|
|
|
but a CALL with constant address is cheap. */
|
|
|
|
|
#define NO_FUNCTION_CSE
|
|
|
|
|
|
target.h (init_libfuncs): New hook.
* target.h (init_libfuncs): New hook.
* target-def.h: Default TARGET_INIT_BUILTINS and
TARGET_INIT_LIBFUNCS to hook_void_void. Add
TARGET_INIT_LIBFUNCS to TARGET_INITIALIZER.
* builtins.c (default_init_builtins): Delete.
* expr.h (default_init_builtins): Delete prototype.
* doc/tm.texi: Document TARGET_INIT_LIBFUNCS and US_SOFTWARE_GOFAST.
Tweak documentation of TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL.
Remove documentation of INIT_TARGET_OPTABS, MULSI3_LIBCALL,
DIVSI3_LIBCALL, UDIVSI3_LIBCALL, MODSI3_LIBCALL, UMODSI3_LIBCALL,
MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, MODDI3_LIBCALL,
and UMODDI3_LIBCALL,
* Makefile.in (optabs.o): Depends on target.h.
* defaults.h: Provide default for FLOAT_LIB_COMPARE_RETURNS_BOOL.
* optabs.c: Include target.h.
(prepare_float_lib_cmp): No need for #ifdef around use of
FLOAT_LIB_COMPARE_RETURNS_BOOL.
(set_optab_libfunc): New function.
(init_optabs): Delete use of all *_LIBCALL defines.
Call targetm.init_libfuncs not INIT_TARGET_OPTABS.
* optabs.h: Prototype set_optab_libfunc.
* config.gcc: Remove all references to pa/long_double.h,
ia64/hpux_longdouble.h, and gofast.h.
(mips-*-*): When --enable-gofast, just add US_SOFTWARE_GOFAST
to tm_defines; don't set INIT_SUBTARGET_OPTABS or change tm_file.
* config/alpha/alpha.c, config/c4x/c4x.c, config/cris/cris.c
* config/frv/frv.c, config/h8300/h8300.c, config/i860/i860.c
* config/ia64/ia64.c, config/ip2k/ip2k.c, config/m68hc11/m68hc11.c
* config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c
* config/sparc/sparc.c, config/vax/vax.c:
Provide a definition for TARGET_INIT_LIBFUNCS. Where
necessary, include optabs.h, libfuncs.h, and/or config/gofast.h.
* config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.h
* config/avr/avr.h, config/cris/cris.h, config/frv/frv.h
* config/h8300/h8300.h, config/i860/i860.h, config/ip2k/ip2k.h
* config/iq2000/iq2000.h, config/m68hc11/m68hc11.h, config/mips/mips.h
* config/rs6000/aix.h, config/rs6000/sysv4.h, config/sparc/elf.h
* config/sparc/lite.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h
* config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h
* config/vax/elf.h: Don't define or use INIT_TARGET_OPTABS,
INIT_SUBTARGET_OPTABS, or any *_LIBCALL macros.
* config/ia64/hpux.h: Redefine INTEL_EXTENDED_IEEE_FORMAT to 0.
Set TARGET_INIT_LIBFUNCS and FLOAT_LIB_COMPARE_RETURNS_BOOL here.
* config/pa/pa-hpux.h: Define LONG_DOUBLE_TYPE_SIZE,
HPUX_LONG_DOUBLE_LIBRARY, and FLOAT_LIB_COMPARE_RETURNS_BOOL here.
* config/ia64/hpux_longdouble.h, config/pa/long_double.h: Delete.
* config/rs6000/xcoff.h: Don't define RS6000_ITRUNC nor RS6000_UITRUNC.
* config/sparc/sparc.h: Default SUN_CONVERSION_LIBFUNCS and
SUN_INTEGER_MULTIPLY_64 to 0.
* config/sparc/sol2.h: Redefine SUN_CONVERSION_LIBFUNCS and
SUN_INTEGER_MULTIPLY_64 to 1.
* config/sparc/elf.h: Redefine SUN_CONVERSION_LIBFUNCS and
SUN_INTEGER_MULTIPLY_64 to 0.
* config/sparc/lite.h, config/sparc/liteelf.h, config/sparc/sp86x-elf.h:
Define US_SOFTWARE_GOFAST.
* config/vax/vax.h: Default TARGET_ELF to 0.
* config/vax/elf.h: Redefine TARGET_ELF to 1.
* config/gofast.h: Don't define any macros here. Provide one
static function, gofast_maybe_init_libfuncs, which does what
INIT_GOFAST_LIBFUNCS used to do but only if US_SOFTWARE_GOFAST
is already defined. Do not clear negation libfuncs. Do
not mess with HFmode, XFmode, or TFmode libfuncs.
* config/avr/avr.c (avr_init_once): #if 0 out; mark FIXME.
From-SVN: r72009
2003-10-02 02:44:29 +02:00
|
|
|
|
/* The _Q_* comparison libcalls return booleans. */
|
|
|
|
|
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
|
(TARGET_HARD_QUAD): New macro.
(TARGET_SWITCHES): Add hard-quad-float, soft-quad-float.
(TARGET_DEFAULT): Use parentheses.
({ADDTF3,SUBTF3,MULTF3,DIVTF3,SQRTTF2,FLOATSITF2,FIX_TRUNCTFSI2,
EXTENDSFTF2,TRUNCTFSF2,EXTENDDFTF2,TRUNCTFDF2,EQTF2,NETF2,GTTF2,
GETF2,LTTF2,LETF2}_LIBCALL): New macros.
From-SVN: r6751
1994-03-11 20:53:44 +01:00
|
|
|
|
|
2002-05-09 12:38:44 +02:00
|
|
|
|
/* Assume by default that the _Qp_* 64-bit libcalls are implemented such
|
|
|
|
|
that the inputs are fully consumed before the output memory is clobbered. */
|
|
|
|
|
|
|
|
|
|
#define TARGET_BUGGY_QP_LIB 0
|
|
|
|
|
|
target.h (init_libfuncs): New hook.
* target.h (init_libfuncs): New hook.
* target-def.h: Default TARGET_INIT_BUILTINS and
TARGET_INIT_LIBFUNCS to hook_void_void. Add
TARGET_INIT_LIBFUNCS to TARGET_INITIALIZER.
* builtins.c (default_init_builtins): Delete.
* expr.h (default_init_builtins): Delete prototype.
* doc/tm.texi: Document TARGET_INIT_LIBFUNCS and US_SOFTWARE_GOFAST.
Tweak documentation of TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL.
Remove documentation of INIT_TARGET_OPTABS, MULSI3_LIBCALL,
DIVSI3_LIBCALL, UDIVSI3_LIBCALL, MODSI3_LIBCALL, UMODSI3_LIBCALL,
MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, MODDI3_LIBCALL,
and UMODDI3_LIBCALL,
* Makefile.in (optabs.o): Depends on target.h.
* defaults.h: Provide default for FLOAT_LIB_COMPARE_RETURNS_BOOL.
* optabs.c: Include target.h.
(prepare_float_lib_cmp): No need for #ifdef around use of
FLOAT_LIB_COMPARE_RETURNS_BOOL.
(set_optab_libfunc): New function.
(init_optabs): Delete use of all *_LIBCALL defines.
Call targetm.init_libfuncs not INIT_TARGET_OPTABS.
* optabs.h: Prototype set_optab_libfunc.
* config.gcc: Remove all references to pa/long_double.h,
ia64/hpux_longdouble.h, and gofast.h.
(mips-*-*): When --enable-gofast, just add US_SOFTWARE_GOFAST
to tm_defines; don't set INIT_SUBTARGET_OPTABS or change tm_file.
* config/alpha/alpha.c, config/c4x/c4x.c, config/cris/cris.c
* config/frv/frv.c, config/h8300/h8300.c, config/i860/i860.c
* config/ia64/ia64.c, config/ip2k/ip2k.c, config/m68hc11/m68hc11.c
* config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c
* config/sparc/sparc.c, config/vax/vax.c:
Provide a definition for TARGET_INIT_LIBFUNCS. Where
necessary, include optabs.h, libfuncs.h, and/or config/gofast.h.
* config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.h
* config/avr/avr.h, config/cris/cris.h, config/frv/frv.h
* config/h8300/h8300.h, config/i860/i860.h, config/ip2k/ip2k.h
* config/iq2000/iq2000.h, config/m68hc11/m68hc11.h, config/mips/mips.h
* config/rs6000/aix.h, config/rs6000/sysv4.h, config/sparc/elf.h
* config/sparc/lite.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h
* config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h
* config/vax/elf.h: Don't define or use INIT_TARGET_OPTABS,
INIT_SUBTARGET_OPTABS, or any *_LIBCALL macros.
* config/ia64/hpux.h: Redefine INTEL_EXTENDED_IEEE_FORMAT to 0.
Set TARGET_INIT_LIBFUNCS and FLOAT_LIB_COMPARE_RETURNS_BOOL here.
* config/pa/pa-hpux.h: Define LONG_DOUBLE_TYPE_SIZE,
HPUX_LONG_DOUBLE_LIBRARY, and FLOAT_LIB_COMPARE_RETURNS_BOOL here.
* config/ia64/hpux_longdouble.h, config/pa/long_double.h: Delete.
* config/rs6000/xcoff.h: Don't define RS6000_ITRUNC nor RS6000_UITRUNC.
* config/sparc/sparc.h: Default SUN_CONVERSION_LIBFUNCS and
SUN_INTEGER_MULTIPLY_64 to 0.
* config/sparc/sol2.h: Redefine SUN_CONVERSION_LIBFUNCS and
SUN_INTEGER_MULTIPLY_64 to 1.
* config/sparc/elf.h: Redefine SUN_CONVERSION_LIBFUNCS and
SUN_INTEGER_MULTIPLY_64 to 0.
* config/sparc/lite.h, config/sparc/liteelf.h, config/sparc/sp86x-elf.h:
Define US_SOFTWARE_GOFAST.
* config/vax/vax.h: Default TARGET_ELF to 0.
* config/vax/elf.h: Redefine TARGET_ELF to 1.
* config/gofast.h: Don't define any macros here. Provide one
static function, gofast_maybe_init_libfuncs, which does what
INIT_GOFAST_LIBFUNCS used to do but only if US_SOFTWARE_GOFAST
is already defined. Do not clear negation libfuncs. Do
not mess with HFmode, XFmode, or TFmode libfuncs.
* config/avr/avr.c (avr_init_once): #if 0 out; mark FIXME.
From-SVN: r72009
2003-10-02 02:44:29 +02:00
|
|
|
|
/* Assume by default that we do not have the Solaris-specific conversion
|
|
|
|
|
routines nor 64-bit integer multiply and divide routines. */
|
1994-09-09 21:35:29 +02:00
|
|
|
|
|
2004-04-01 18:05:22 +02:00
|
|
|
|
#define SUN_CONVERSION_LIBFUNCS 0
|
|
|
|
|
#define DITF_CONVERSION_LIBFUNCS 0
|
|
|
|
|
#define SUN_INTEGER_MULTIPLY_64 0
|
1999-08-23 18:09:52 +02:00
|
|
|
|
|
2002-04-19 01:37:15 +02:00
|
|
|
|
/* Provide the cost of a branch. For pre-v9 processors we use
|
|
|
|
|
a value of 3 to take into account the potential annulling of
|
|
|
|
|
the delay slot (which ends up being a bubble in the pipeline slot)
|
|
|
|
|
plus a cycle to take into consideration the instruction cache
|
|
|
|
|
effects.
|
|
|
|
|
|
|
|
|
|
On v9 and later, which have branch prediction facilities, we set
|
|
|
|
|
it to the depth of the pipeline as that is the cost of a
|
2006-03-02 23:47:02 +01:00
|
|
|
|
mispredicted branch.
|
|
|
|
|
|
|
|
|
|
On Niagara, normal branches insert 3 bubbles into the pipe
|
2007-10-19 06:29:38 +02:00
|
|
|
|
and annulled branches insert 4 bubbles.
|
|
|
|
|
|
2011-09-05 18:00:53 +02:00
|
|
|
|
On Niagara-2 and Niagara-3, a not-taken branch costs 1 cycle whereas
|
|
|
|
|
a taken branch costs 6 cycles. */
|
2002-04-19 01:37:15 +02:00
|
|
|
|
|
2008-08-31 13:18:41 +02:00
|
|
|
|
#define BRANCH_COST(speed_p, predictable_p) \
|
2002-04-19 01:37:15 +02:00
|
|
|
|
((sparc_cpu == PROCESSOR_V9 \
|
|
|
|
|
|| sparc_cpu == PROCESSOR_ULTRASPARC) \
|
2002-04-30 06:49:45 +02:00
|
|
|
|
? 7 \
|
|
|
|
|
: (sparc_cpu == PROCESSOR_ULTRASPARC3 \
|
2006-03-02 23:47:02 +01:00
|
|
|
|
? 9 \
|
|
|
|
|
: (sparc_cpu == PROCESSOR_NIAGARA \
|
|
|
|
|
? 4 \
|
2011-09-05 18:00:53 +02:00
|
|
|
|
: ((sparc_cpu == PROCESSOR_NIAGARA2 \
|
|
|
|
|
|| sparc_cpu == PROCESSOR_NIAGARA3) \
|
2007-10-19 06:29:38 +02:00
|
|
|
|
? 5 \
|
|
|
|
|
: 3))))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* Control the assembler format that we output. */
|
|
|
|
|
|
sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
* sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
(TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=,
-malign-functions=.
(sparc_align_{loops,jumps,funcs}_string): Declare.
(sparc_align_{loops,jumps,funcs}): Declare.
(DEFAULT_SPARC_ALIGN_FUNCS): New macro.
(FUNCTION_BOUNDARY): Use sparc_align_funcs.
(STACK_BIAS): Define.
(SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform
test.
(SPARC_SETHI_P): New macro.
(CONST_OK_FOR_LETTER_P): Use it.
(ASM_OUTPUT_ALIGN_CODE): Define.
(ASM_OUTPUT_LOOP_ALIGN): Define.
* sparc.h (ASM_COMMENT_START): Define.
* sparc/sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print
ascii form as well.
From-SVN: r15708
1997-09-25 03:14:03 +02:00
|
|
|
|
/* A C string constant describing how to begin a comment in the target
|
|
|
|
|
assembler language. The compiler assumes that the comment will end at
|
|
|
|
|
the end of the line. */
|
|
|
|
|
|
|
|
|
|
#define ASM_COMMENT_START "!"
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* Output to assembler file text saying following lines
|
|
|
|
|
may contain character constants, extra white space, comments, etc. */
|
|
|
|
|
|
|
|
|
|
#define ASM_APP_ON ""
|
|
|
|
|
|
|
|
|
|
/* Output to assembler file text saying following lines
|
|
|
|
|
no longer contain unusual constructs. */
|
|
|
|
|
|
|
|
|
|
#define ASM_APP_OFF ""
|
|
|
|
|
|
|
|
|
|
/* How to refer to registers in assembler output.
|
|
|
|
|
This sequence is indexed by compiler's hard-register-number (see above). */
|
|
|
|
|
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
#define REGISTER_NAMES \
|
|
|
|
|
{"%g0", "%g1", "%g2", "%g3", "%g4", "%g5", "%g6", "%g7", \
|
|
|
|
|
"%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%sp", "%o7", \
|
|
|
|
|
"%l0", "%l1", "%l2", "%l3", "%l4", "%l5", "%l6", "%l7", \
|
|
|
|
|
"%i0", "%i1", "%i2", "%i3", "%i4", "%i5", "%fp", "%i7", \
|
|
|
|
|
"%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7", \
|
|
|
|
|
"%f8", "%f9", "%f10", "%f11", "%f12", "%f13", "%f14", "%f15", \
|
|
|
|
|
"%f16", "%f17", "%f18", "%f19", "%f20", "%f21", "%f22", "%f23", \
|
|
|
|
|
"%f24", "%f25", "%f26", "%f27", "%f28", "%f29", "%f30", "%f31", \
|
|
|
|
|
"%f32", "%f33", "%f34", "%f35", "%f36", "%f37", "%f38", "%f39", \
|
|
|
|
|
"%f40", "%f41", "%f42", "%f43", "%f44", "%f45", "%f46", "%f47", \
|
|
|
|
|
"%f48", "%f49", "%f50", "%f51", "%f52", "%f53", "%f54", "%f55", \
|
|
|
|
|
"%f56", "%f57", "%f58", "%f59", "%f60", "%f61", "%f62", "%f63", \
|
Teach sparc backend about %gsr register and add intrinsics to access it.
* config/sparc/sparc.h (FIRST_PSEUDO_REGISTER): Bump to 103.
(SPARC_GSR_REG): Define.
(FIXED_REGISTERS): Mark GSR as fixed.
(CALL_USED_REGISTERS): Mark GSR as call used.
(HARD_REGNO_NREGS): GSR is always 1 register.
(REG_CLASS_CONTENTS): Add GSR to ALL_REGS.
(REG_ALLOC_ORDER, REG_LEAF_ALLOC_ORDER): Add GSR to the end.
(REGISTER_NAMES): Add "%gsr".
* config/sparc/sparc.md (UNSPEC_ALIGNADDR, UNSPEC_ALIGNADDRL):
Delete.
(UNSPEC_WRGSR): New unspec.
(GSR_REG): New constant.
(type): Add new insn type 'gsr'.
(fpack16_vis, fpackfix_vis, fpack32_vis,
faligndata<V64I:MODE>_vis)): Add use of GSR_REG.
(wrgsr_vis, *wrgsr_sp64, wrgsr_v8plus, rdgsr_vis, *rdgsr_sp64,
rdgsr_v8plus): New expanders and insns.
(alignaddr<P:mode>_vis, alignaddrl<P:mode>_vis): Reimplement
using patterns which show that this is a plus in addition to a
modification of GSR_REG, instead of an unspec.
* config/sparc/ultra1_2.md: Handle 'gsr'.
* config/sparc/ultra3.md: Likewise.
* config/sparc/niagara.md: Likewise.
* config/sparc/niagara2.md: Likewise.
* config/sparc/sparc.c (leaf_reg_remap, sparc_leaf_regs): Fill out
end of table.
(sparc_option_override): Make -mvis imply -mv8plus.
(hard_32bit_mode_classes, hard_64bit_mode_classes): Add entries
for %gsr.
(sparc_vis_init_builtins): Build __builtin_vis_write_gsr and
__builtin_vis_read_gsr.
(sparc_expand_buildin): Handle builtins that take one argument and
return void.
(sparc_fold_builtin): Never fold writes to %gsr.
* config/sparc/visintrin.h (__vis_write_gsr, __vis_read_gsr): New.
* doc/extend.texi: Document new VIS intrinsics.
From-SVN: r179159
2011-09-25 04:29:23 +02:00
|
|
|
|
"%fcc0", "%fcc1", "%fcc2", "%fcc3", "%icc", "%sfp", "%gsr" }
|
1992-04-08 06:53:48 +02:00
|
|
|
|
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
/* Define additional names for use in asm clobbers and asm declarations. */
|
1992-04-08 06:53:48 +02:00
|
|
|
|
|
sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
* sparc/sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define.
(TARGET_SWITCHES): Add live-g0.
(FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101).
(FIXED_REGISTERS,CALL_USED_REGISTERS): Update.
(FIXED_REGISTERS): %g0 is fixed by default.
(SPARC_{FIRST,LAST}_V9_FCC_REG): Define.
(SPARC_{ICC,FCC}_REG): Define.
(CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8.
(REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc.
(REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'.
(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc.
(REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case.
(REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg.
(REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise.
(REGISTER_NAMES): Add %icc.
(ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG.
* sparc/sparc.c (leaf_reg_remap): Add %icc=100.
(reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0.
(fcc_reg_operand): Renamed from ccfp_reg_operand.
Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match
modes if `mode' argument is VOIDmode.
(icc_or_fcc_reg_operand): New function.
(gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares.
Use SPARC_ICC_REG for int compares.
(eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0.
Delete unnecessary test for %g0.
(emit_move_sequence): Don't emit (set (mem) (const_int 0)) if
TARGET_LIVE_G0.
(output_scc_insn): Label moved to operand 3. Condition code reg
moved to operand 2.
(sparc_mode_class): Enum C_MODE renamed to CC_MODE.
(hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc.
(hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc.
(sparc_regno_reg_class): New global.
(sparc_init_modes): Initialize it.
(output_cbranch): Delete fp_cond_reg argument.
(print_operand, MEM op): Don't print "%g0+" if TARGET_SPARCLET.
(sparc_flat_eligible_for_epilogue_delay): Don't allow anything if
TARGET_LIVE_G0.
* sparc/sparc.md (live_g0): New attribute.
(*): Integer condition code register is now reg 100.
Use SPARC_ICC_REG instead of hardcoding reg 100 where possible.
Non-v9 floating point condition code register is now reg 96.
(*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases.
(*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch.
(*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0.
(*mov{qi,hi,si}_insn_liveg0): New patterns.
(*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to
fcc_reg_operand.
(*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if
TARGET_LIVE_G0.
(*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2.
(patterns that use %g0 in rs2): Use 0 immediate value instead.
(patterns that read %g0): Don't use if TARGET_LIVE_G0.
From-SVN: r11494
1996-03-08 01:12:21 +01:00
|
|
|
|
#define ADDITIONAL_REGISTER_NAMES \
|
|
|
|
|
{{"ccr", SPARC_ICC_REG}, {"cc", SPARC_ICC_REG}}
|
1992-04-08 06:53:48 +02:00
|
|
|
|
|
1997-04-23 02:39:04 +02:00
|
|
|
|
/* On Sun 4, this limit is 2048. We use 1000 to be safe, since the length
|
|
|
|
|
can run past this up to a continuation point. Once we used 1500, but
|
|
|
|
|
a single entry in C++ can run more than 500 bytes, due to the length of
|
|
|
|
|
mangled symbol names. dbxout.c should really be fixed to do
|
|
|
|
|
continuations when they are actually needed instead of trying to
|
|
|
|
|
guess... */
|
|
|
|
|
#define DBX_CONTIN_LENGTH 1000
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* This is how to output a command to make the user-level label named NAME
|
|
|
|
|
defined for reference from other files. */
|
|
|
|
|
|
* alpha.h, arc.h, arm/aout.h, avr.h, cris.h, d30v.h, dsp16xx.h,
fr30.h, h8300.h, i370.h, i386/sco5.h, i386/unix.h, i960.h, ia64.h,
ip2k.h, m32r.h, mcore.h, mips.h, mn10200.h, mn10300.h, ns32k.h,
openbsd.h, pa/pa-linux.h, pdp11.h, romp.h, rs6000/sysv4.h,
s390/linux.h, sh.h, sparc.h, stormy16.h, v850.h, vax.h, xtensa.h:
(ASM_GLOBALIZE_LABEL): Delete.
(GLOBAL_ASM_OP): Define.
From-SVN: r55892
2002-07-31 04:13:35 +02:00
|
|
|
|
/* Globalizing directive for a label. */
|
|
|
|
|
#define GLOBAL_ASM_OP "\t.global "
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
2001-11-03 17:38:52 +01:00
|
|
|
|
/* The prefix to add to user-visible assembler symbols. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1996-09-21 12:53:37 +02:00
|
|
|
|
#define USER_LABEL_PREFIX "_"
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* This is how to store into the string LABEL
|
|
|
|
|
the symbol_ref name of an internal numbered label where
|
|
|
|
|
PREFIX is the class of label and NUM is the number within the class.
|
|
|
|
|
This is suitable for output with `assemble_name'. */
|
|
|
|
|
|
|
|
|
|
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
1998-06-29 19:36:07 +02:00
|
|
|
|
sprintf ((LABEL), "*%s%ld", (PREFIX), (long)(NUM))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1998-08-10 07:34:44 +02:00
|
|
|
|
/* This is how we hook in and defer the case-vector until the end of
|
|
|
|
|
the function. */
|
|
|
|
|
#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
|
|
|
|
|
sparc_defer_case_vector ((LAB),(VEC), 0)
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_ADDR_DIFF_VEC(LAB,VEC) \
|
|
|
|
|
sparc_defer_case_vector ((LAB),(VEC), 1)
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* This is how to output an element of a case-vector that is absolute. */
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
|
1992-03-30 05:49:49 +02:00
|
|
|
|
do { \
|
|
|
|
|
char label[30]; \
|
|
|
|
|
ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
|
1998-09-09 04:19:08 +02:00
|
|
|
|
if (CASE_VECTOR_MODE == SImode) \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
fprintf (FILE, "\t.word\t"); \
|
|
|
|
|
else \
|
|
|
|
|
fprintf (FILE, "\t.xword\t"); \
|
1992-03-30 05:49:49 +02:00
|
|
|
|
assemble_name (FILE, label); \
|
1998-08-10 07:34:44 +02:00
|
|
|
|
fputc ('\n', FILE); \
|
1992-03-30 05:49:49 +02:00
|
|
|
|
} while (0)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* This is how to output an element of a case-vector that is relative.
|
|
|
|
|
(SPARC uses such vectors only when generating PIC.) */
|
|
|
|
|
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
|
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
1992-03-30 05:49:49 +02:00
|
|
|
|
do { \
|
|
|
|
|
char label[30]; \
|
1998-08-10 07:34:44 +02:00
|
|
|
|
ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \
|
1998-09-09 04:19:08 +02:00
|
|
|
|
if (CASE_VECTOR_MODE == SImode) \
|
sparc.h (cpu_type): New enum.
* sparc/sparc.h (cpu_type): New enum.
(CPP_PREDEFINES,CPP_SPEC): Add v9 support.
(NO_BUILTIN_PTRDIFF_TYPE, NO_BUILTIN_SIZE_TYPE, MAX_WCHAR_TYPE_SIZE,
SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, MAX_INT_TYPE_SIZE,
MAX_LONG_TYPE_SIZE): Define.
(PTRDIFF_TYPE, SIZE_TYPE, BITS_PER_WORD, MAX_BITS_PER_WORD,
UNITS_PER_WORD, MAX_UNITS_PER_WORD, LONG_DOUBLE_TYPE_SIZE,
POINTER_SIZE, PARM_BOUNDARY, STACK_BOUNDARY, SPARC_STACK_ALIGN,
EMPTY_FIELD_BOUNDARY, BIGGEST_ALIGNMENT, FIRST_PSEUDO_REGISTER,
FIXED_REGISTERS, CALL_USED_REGISTERS, CONDITIONAL_REGISTER_USAGE):
Add v9 support.
(sparc_override_options, sparc_code_model): Declare.
(OVERRIDE_OPTIONS): Call it.
(MASK_*): Define bits set by target flags.
(TARGET_*): Use them.
({MASK,TARGET}_{V9,INT64,LONG64,PTR64,ENV32,STACK_BIAS,
MEDLOW,MEDANY,FULLANY}): Define.
(MEDANY_BASE_REG): Define.
(V9_SWITCHES, TARGET_OPTIONS): Define.
(TARGET_SWITCHES, TARGET_DEFAULT): Use MASK_*.
(SPARC_STACK_BIAS, SECONDARY_MEMORY_NEEDED_MODE): Define.
(SECONDARY_MEMORY_NEEDED): Simplify.
(hard_regno_mode_class, sparc_mode_class, sparc_cpu_type): Declare.
(REG_PARM_STACK_SPACE): Do not define if v9.
(HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, MODES_TIEABLE_P,
RETURN_IN_MEMORY, STRUCT_VALUE, STRUCT_VALUE_INCOMING, reg_class,
REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_ALLOC_ORDER,
REG_LEAF_ALLOC_ORDER, LEAF_REGISTERS, REG_CLASS_FROM_LETTER,
CLASS_MAX_NREGS, STARTING_FRAME_OFFSET, FIRST_PARM_OFFSET,
BASE_RETURN_VALUE_REG, BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG,
BASE_INCOMING_ARG_REG, FUNCTION_ARG_REGNO_P): Add v9 support.
(sparc_arg_class): New enum (v9 only).
(sparc_args): New struct to record v9 arguments.
(CUMULATIVE_ARGS): Use it (v9 only).
(GET_SPARC_ARG_CLASS): Define.
(sparc_arg_count, sparc_n_named_args): Declare.
(PASS_IN_REG_P): Define.
(ROUND_REG, ROUND_ADVANCE, INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE,
FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_PARTIAL_NREGS,
FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES):
Add v9 support.
(sparc64_init_expanders, sparc64_fpconv_stack_temp): Declare.
(INIT_EXPANDERS): Define (v9 only).
(gen_v9_scc, output_v9branch): Declare.
(HAVE_conditional_move): Define.
(FUNCTION_PROFILER, FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX, REGNO_OK_FOR_FP_P,
REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P, EXTRA_CONSTRAINT,
CASE_VECTOR_MODE, Pmode, EXTRA_CC_MODES, EXTRA_CC_NAMES,
SELECT_CC_MODE, REGISTER_NAMES): Add v9 support.
(REGNO_OK_FOR_CCFP_P): Define.
(sparc_initialize_trampoline, sparc64_initialize_trampoline): Declare.
(INITIALIZE_TRAMPOLINE): Call them.
(ENCODE_SECTION_INFO): Mark functions in v9.
(RTX_COSTS): Assume MULT costs the same for v9 as v8.
(ASM_LONGLONG, ASM_FLOAT): Define.
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Add v9 support.
From-SVN: r7485
1994-06-15 09:46:50 +02:00
|
|
|
|
fprintf (FILE, "\t.word\t"); \
|
|
|
|
|
else \
|
|
|
|
|
fprintf (FILE, "\t.xword\t"); \
|
1992-03-30 05:49:49 +02:00
|
|
|
|
assemble_name (FILE, label); \
|
1998-08-10 07:34:44 +02:00
|
|
|
|
ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \
|
|
|
|
|
fputc ('-', FILE); \
|
|
|
|
|
assemble_name (FILE, label); \
|
|
|
|
|
fputc ('\n', FILE); \
|
1992-03-30 05:49:49 +02:00
|
|
|
|
} while (0)
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1998-09-11 00:28:30 +02:00
|
|
|
|
/* This is what to output before and after case-vector (both
|
|
|
|
|
relative and absolute). If .subsection -1 works, we put case-vectors
|
|
|
|
|
at the beginning of the current section. */
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_GAS_SUBSECTION_ORDERING
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_ADDR_VEC_START(FILE) \
|
|
|
|
|
fprintf(FILE, "\t.subsection\t-1\n")
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_ADDR_VEC_END(FILE) \
|
|
|
|
|
fprintf(FILE, "\t.previous\n")
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
1992-01-30 21:58:19 +01:00
|
|
|
|
/* This is how to output an assembler line
|
|
|
|
|
that says to advance the location counter
|
|
|
|
|
to a multiple of 2**LOG bytes. */
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
|
|
|
|
if ((LOG) != 0) \
|
|
|
|
|
fprintf (FILE, "\t.align %d\n", (1<<(LOG)))
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
|
fprintf (FILE, "\t.skip "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
|
|
|
|
/* This says how to output an assembler line
|
|
|
|
|
to define a global common symbol. */
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
|
1994-01-24 23:40:31 +01:00
|
|
|
|
( fputs ("\t.common ", (FILE)), \
|
1992-01-30 21:58:19 +01:00
|
|
|
|
assemble_name ((FILE), (NAME)), \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
|
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",\"bss\"\n", (SIZE)))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1994-01-24 23:40:31 +01:00
|
|
|
|
/* This says how to output an assembler line to define a local common
|
|
|
|
|
symbol. */
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1994-01-24 23:40:31 +01:00
|
|
|
|
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGNED) \
|
|
|
|
|
( fputs ("\t.reserve ", (FILE)), \
|
|
|
|
|
assemble_name ((FILE), (NAME)), \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
|
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",\"bss\",%u\n", \
|
1994-01-24 23:40:31 +01:00
|
|
|
|
(SIZE), ((ALIGNED) / BITS_PER_UNIT)))
|
1992-01-30 21:58:19 +01:00
|
|
|
|
|
1997-07-16 21:05:27 +02:00
|
|
|
|
/* A C statement (sans semicolon) to output to the stdio stream
|
|
|
|
|
FILE the assembler definition of uninitialized global DECL named
|
|
|
|
|
NAME whose size is SIZE bytes and alignment is ALIGN bytes.
|
|
|
|
|
Try to use asm_output_aligned_bss to implement this macro. */
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
|
|
|
|
|
do { \
|
|
|
|
|
ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
2000-09-25 12:24:23 +02:00
|
|
|
|
#define IDENT_ASM_OP "\t.ident\t"
|
1993-02-16 20:35:31 +01:00
|
|
|
|
|
|
|
|
|
/* Output #ident as a .ident. */
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_IDENT(FILE, NAME) \
|
2000-09-25 15:39:45 +02:00
|
|
|
|
fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
|
1993-02-16 20:35:31 +01:00
|
|
|
|
|
2004-09-08 21:17:53 +02:00
|
|
|
|
/* Prettify the assembly. */
|
|
|
|
|
|
|
|
|
|
extern int sparc_indent_opcode;
|
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_OPCODE(FILE, PTR) \
|
|
|
|
|
do { \
|
|
|
|
|
if (sparc_indent_opcode) \
|
|
|
|
|
{ \
|
|
|
|
|
putc (' ', FILE); \
|
|
|
|
|
sparc_indent_opcode = 0; \
|
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
2005-06-08 07:05:45 +02:00
|
|
|
|
/* TLS support defaulting to original Sun flavor. GNU extensions
|
|
|
|
|
must be activated in separate configuration files. */
|
sparc.c (struct machine_function): New type.
* config/sparc/sparc.c (struct machine_function): New type.
(TARGET_HAVE_TLS, TARGET_CANNOT_FORCE_CONST_MEM): Define.
(sparc_override_options): Initialize init_machine_status.
(tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand): New functions.
(symbolic_operand): Disallow tls_symbolic_operand.
(symbolic_memory_operand): Likewise.
(tls_call_delay, sparc_cannot_force_const_mem, legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p):
New functions.
(sparc_tls_symbol): New variable.
(sparc_tls_get_addr, sparc_tls_got, legitimize_tls_address,
legitimize_address): New functions.
(print_operand): Handle %&.
(sparc_init_machine_status, get_some_local_dynamic_name,
get_some_local_dynamic_name_1): New functions.
(sparc_output_dwarf_dtprel): New function.
* config/sparc/sparc.h (CONSTANT_ADDRESS_P): Moved into
constant_address_p.
(LEGITIMATE_PIC_OPERAND_P): Moved into legitimate_pic_operand_p.
(LEGITIMATE_CONSTANT_P): Moved into legitimate_constant_p.
(GO_IF_LEGITIMATE_ADDRESS): Moved into legitimate_address_p.
(LEGITIMIZE_ADDRESS): Moved into legitimize_address.
(PRINT_OPERAND_PUNCT_VALID_P): Add '&'.
(TARGET_TLS, TARGET_SUN_TLS, TARGET_GNU_TLS): Define.
(ASM_OUTPUT_DWARF_DTPREL): Define.
(PREDICATE_CODES): Add tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand.
* config/sparc/sparc.md (UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_TLSLDO,
UNSPEC_TLSIE, UNSPEC_TLSLE, UNSPEC_TLSLD_BASE): New constants.
(tls_call_delay): New attribute.
(in_call_delay): Use it.
(movqi, movhi, movsi, movdi): Call legitimize_tls_address if needed.
(tgd_hi22, tgd_lo10, tgd_add32, tgd_add64, tgd_call32, tgd_call64,
tldm_hi22, tldm_lo10, tldm_add32, tldm_add64, tldm_call32, tldm_call64,
tldo_hix22, tldo_lox10, tldo_add32, tldo_add64, tie_hi22, tie_lo10,
tie_ld32, tie_ld64, tie_add32, tie_add64, tle_hix22_sp32,
tle_lox10_sp32, tle_hix22_sp64, tle_lox10_sp64): New insns.
(tldo_ldub_sp32, tldo_ldub1_sp32, tldo_ldub2_sp32, tldo_ldsb1_sp32,
tldo_ldsb2_sp32, tldo_ldub_sp64, tldo_ldub1_sp64, tldo_ldub2_sp64,
tldo_ldub3_sp64, tldo_ldsb1_sp64, tldo_ldsb2_sp64, tldo_ldsb3_sp64,
tldo_lduh_sp32, tldo_lduh1_sp32, tldo_ldsh1_sp32, tldo_lduh_sp64,
tldo_lduh1_sp64, tldo_lduh2_sp64, tldo_ldsh1_sp64, tldo_ldsh2_sp64,
tldo_lduw_sp32, tldo_lduw_sp64, tldo_lduw1_sp64, tldo_ldsw1_sp64,
tldo_ldx_sp64, tldo_stb_sp32, tldo_stb_sp64, tldo_sth_sp32,
tldo_sth_sp64, tldo_stw_sp32, tldo_stw_sp64, tldo_stx_sp64): New
insns.
* config/sparc/sparc-protos.h (legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p,
legitimize_tls_address, legitimize_address, tls_symbolic_operand,
tls_call_delay, sparc_output_dwarf_dtprel): New prototypes.
* config/sparc/linux.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Define.
* config/sparc/linux64.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Likewise.
* configure.in (sparc*-*-*): Add TLS check.
* configure: Rebuilt.
From-SVN: r71202
2003-09-08 08:57:05 +02:00
|
|
|
|
#ifdef HAVE_AS_TLS
|
|
|
|
|
#define TARGET_TLS 1
|
|
|
|
|
#else
|
|
|
|
|
#define TARGET_TLS 0
|
|
|
|
|
#endif
|
2005-06-08 07:05:45 +02:00
|
|
|
|
|
sparc.c (struct machine_function): New type.
* config/sparc/sparc.c (struct machine_function): New type.
(TARGET_HAVE_TLS, TARGET_CANNOT_FORCE_CONST_MEM): Define.
(sparc_override_options): Initialize init_machine_status.
(tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand): New functions.
(symbolic_operand): Disallow tls_symbolic_operand.
(symbolic_memory_operand): Likewise.
(tls_call_delay, sparc_cannot_force_const_mem, legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p):
New functions.
(sparc_tls_symbol): New variable.
(sparc_tls_get_addr, sparc_tls_got, legitimize_tls_address,
legitimize_address): New functions.
(print_operand): Handle %&.
(sparc_init_machine_status, get_some_local_dynamic_name,
get_some_local_dynamic_name_1): New functions.
(sparc_output_dwarf_dtprel): New function.
* config/sparc/sparc.h (CONSTANT_ADDRESS_P): Moved into
constant_address_p.
(LEGITIMATE_PIC_OPERAND_P): Moved into legitimate_pic_operand_p.
(LEGITIMATE_CONSTANT_P): Moved into legitimate_constant_p.
(GO_IF_LEGITIMATE_ADDRESS): Moved into legitimate_address_p.
(LEGITIMIZE_ADDRESS): Moved into legitimize_address.
(PRINT_OPERAND_PUNCT_VALID_P): Add '&'.
(TARGET_TLS, TARGET_SUN_TLS, TARGET_GNU_TLS): Define.
(ASM_OUTPUT_DWARF_DTPREL): Define.
(PREDICATE_CODES): Add tgd_symbolic_operand, tld_symbolic_operand,
tie_symbolic_operand, tle_symbolic_operand.
* config/sparc/sparc.md (UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_TLSLDO,
UNSPEC_TLSIE, UNSPEC_TLSLE, UNSPEC_TLSLD_BASE): New constants.
(tls_call_delay): New attribute.
(in_call_delay): Use it.
(movqi, movhi, movsi, movdi): Call legitimize_tls_address if needed.
(tgd_hi22, tgd_lo10, tgd_add32, tgd_add64, tgd_call32, tgd_call64,
tldm_hi22, tldm_lo10, tldm_add32, tldm_add64, tldm_call32, tldm_call64,
tldo_hix22, tldo_lox10, tldo_add32, tldo_add64, tie_hi22, tie_lo10,
tie_ld32, tie_ld64, tie_add32, tie_add64, tle_hix22_sp32,
tle_lox10_sp32, tle_hix22_sp64, tle_lox10_sp64): New insns.
(tldo_ldub_sp32, tldo_ldub1_sp32, tldo_ldub2_sp32, tldo_ldsb1_sp32,
tldo_ldsb2_sp32, tldo_ldub_sp64, tldo_ldub1_sp64, tldo_ldub2_sp64,
tldo_ldub3_sp64, tldo_ldsb1_sp64, tldo_ldsb2_sp64, tldo_ldsb3_sp64,
tldo_lduh_sp32, tldo_lduh1_sp32, tldo_ldsh1_sp32, tldo_lduh_sp64,
tldo_lduh1_sp64, tldo_lduh2_sp64, tldo_ldsh1_sp64, tldo_ldsh2_sp64,
tldo_lduw_sp32, tldo_lduw_sp64, tldo_lduw1_sp64, tldo_ldsw1_sp64,
tldo_ldx_sp64, tldo_stb_sp32, tldo_stb_sp64, tldo_sth_sp32,
tldo_sth_sp64, tldo_stw_sp32, tldo_stw_sp64, tldo_stx_sp64): New
insns.
* config/sparc/sparc-protos.h (legitimate_constant_p,
constant_address_p, legitimate_pic_operand_p, legitimate_address_p,
legitimize_tls_address, legitimize_address, tls_symbolic_operand,
tls_call_delay, sparc_output_dwarf_dtprel): New prototypes.
* config/sparc/linux.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Define.
* config/sparc/linux64.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Likewise.
* configure.in (sparc*-*-*): Add TLS check.
* configure: Rebuilt.
From-SVN: r71202
2003-09-08 08:57:05 +02:00
|
|
|
|
#define TARGET_SUN_TLS TARGET_TLS
|
|
|
|
|
#define TARGET_GNU_TLS 0
|
|
|
|
|
|
2011-09-25 23:28:51 +02:00
|
|
|
|
#ifndef HAVE_AS_FMAF_HPC_VIS3
|
|
|
|
|
#define AS_NIAGARA3_FLAG "b"
|
|
|
|
|
#else
|
|
|
|
|
#define AS_NIAGARA3_FLAG "d"
|
|
|
|
|
#endif
|
|
|
|
|
|
1997-04-23 22:11:52 +02:00
|
|
|
|
/* The number of Pmode words for the setjmp buffer. */
|
|
|
|
|
#define JMP_BUF_SIZE 12
|
2008-05-14 23:49:41 +02:00
|
|
|
|
|
|
|
|
|
/* We use gcc _mcount for profiling. */
|
|
|
|
|
#define NO_PROFILE_COUNTERS 0
|
2011-10-15 05:46:59 +02:00
|
|
|
|
|
|
|
|
|
/* Debug support */
|
|
|
|
|
#define MASK_DEBUG_OPTIONS 0x01 /* debug option handling */
|
|
|
|
|
#define MASK_DEBUG_ALL MASK_DEBUG_OPTIONS
|
|
|
|
|
|
|
|
|
|
#define TARGET_DEBUG_OPTIONS (sparc_debug & MASK_DEBUG_OPTIONS)
|