gcc/gcc/config/alpha/alpha.c

9898 lines
266 KiB
C
Raw Normal View History

1992-10-26 22:01:33 +01:00
/* Subroutines used for code generation on the DEC Alpha.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
Remove obsolete Tru64 UNIX V5.1B support libstdc++-v3: * configure.host: Remove osf* handling. * config/os/osf: Remove. * doc/xml/manual/using.xml: Remove OSF reference. * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* handling. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. libobjc: * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. * configure: Regenerate. * thr.c (_XOPEN_SOURCE): Define unconditionally. libjava: * configure.ac (alpha*-dec-osf*): Remove. * configure: Regenerate. * configure.host (alpha*-dec-osf*): Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use IPV6_MULTICAST_IF unconditionally. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of _Jv_accept. * include/posix-signal.h [__alpha__ && __osf__]: Remove. * include/posix.h (_POSIX_PII_SOCKET): Don't define. (_Jv_accept): Remove. * java/io/File.java (File._access): Rename to access. Change callers. (File._stat): Likewise. * java/io/File.h: Regenerate. * classpath/lib/java/io/File.class: Regenerate. * java/io/natFilePosix.cc (java::io::File::_access): Rename to access. (java::io::File::_stat): Rename to stat. * java/io/natFileWin32.cc: Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Remove alpha*-dec-osf* handling. * testsuite/libjava.jvmti/jvmti-interp.exp (gcj_jni_compile_c_to_so): Likewise. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. libitm: * configure.tgt (*-*-osf*): Remove. * configure: Regenerate. libgomp: * configure.tgt (alpha*-dec-osf*): Remove. * config/osf/sem.h: Remove. * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. libgfortran: * configure.ac: Remove Tru64 reference. * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* handling. * configure: Regenerate. * intrinsics/c99_functions.c [__osf__]: Remove. libgcc: * config.host: Remove alpha*-dec-osf5.1* handling. * config/alpha/gthr-posix.c: Remove. * config/alpha/libgcc-osf5.ver: Remove. * config/alpha/osf5-unwind.h: Remove. * config/alpha/t-osf-pthread: Remove. * config/alpha/t-slibgcc-osf: Remove. * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. * mkmap-flat.awk: Remove osf_export handling. gnattools: * configure.ac: Remove alpha*-dec-osf* handling. * configure: Regenerate. gcc/testsuite: * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. Adapt line numbers. * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/spbp.C: Likewise. * g++.dg/ext/label13.C: Likewise. * g++.dg/guality/guality.exp: Likewise. * g++.dg/other/anon5.C: Likewise. * g++.dg/other/pragma-ep-1.C: Remove. * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. * g++.dg/warn/pr31246.C: Likewise. * g++.dg/warn/weak1.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.ext/attrib5.C: Likewise. * gcc.c-torture/compile/limits-declparen.c: Likewise. * gcc.c-torture/compile/limits-pointer.c: Likewise. * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. * gcc.dg/c99-tgmath-1.c: Likewise. * gcc.dg/c99-tgmath-2.c: Likewise. * gcc.dg/c99-tgmath-3.c: Likewise. * gcc.dg/c99-tgmath-4.c: Likewise. * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * gcc.dg/debug/pr49032.c: Likewise. * gcc.dg/guality/guality.exp: Likewise. * gcc.dg/intmax_t-1.c: Likewise. * gcc.dg/pr48616.c: Likewise. * gcc.dg/pragma-ep-1.c: Remove. * gcc.dg/pragma-ep-2.c: Remove. * gcc.dg/pragma-ep-3.c: Remove. * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. * gcc.misc-tests/gcov-14.c: Likewise. * gfortran.dg/guality/guality.exp: Likewise. * lib/target-supports.exp (check_weak_available): Likewise. (add_options_for_tls): Likewise. (check_ascii_locale_available): Likewise. * obj-c++.dg/dwarf-2.mm: Likewise. * objc.dg/dwarf-1.m: Likewise. * objc.dg/dwarf-2.m: Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix handling. * c-pragma.c (handle_pragma_extern_prefix): Remove. (init_pragma): Don't register extern_prefix. gcc/po: * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. gcc: * config.gcc (alpha*-dec-osf5.1*): Remove. * config.host (alpha*-dec-osf*): Remove. * configure.ac (*-*-osf*): Remove. (alpha*-dec-osf*): Remove. * configure: Regenerate. * config/alpha/host-osf.c, config/alpha/osf5.h, config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: Remove. * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. * config/alpha/alpha.c (struct machine_function): Update comment. (alpha_start_function): Remove Tru64 UNIX as handling for max_frame_size. * config/alpha/alpha.md ("exception_receiver"): Remove TARGET_LD_BUGGY_LDGP. ("*exception_receiver_2"): Likewise. * except.c (finish_eh_generation): Remove Tru64 reference. * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. * target.def (handle_pragma_extern_prefix): Remove. * Makefile.in (mips-tfile.o-warn): Remove. (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. * mips-tdump.c, mips-tfile.c: Remove. * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma extern_prefix. * doc/install.texi (Binaries): Remove Tru64 UNIX reference. (Specific, alpha*-dec-osf5.1): Note removal. * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Remove. * doc/tm.texi: Regenerate. * doc/trouble.texi (Cross-Compiler Problems): Remove. gcc/ada: * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, system-tru64.ads: Remove. * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: Remove. [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. * env.c [__alpha__ && __osf__]: Remove. * gsocket.h (_OSF_SOURCE): Remove. (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. * init.c [__alpha__ && __osf__]: Remove. * link.c [__osf__]: Remove. * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. [__osf__ && !_SS_MAXSIZE]: Remove. * sysdep.c [__osf__]: Remove. * terminals.c [__alpha__ && __osf__]: Remove. [OSF1]: Remove. * g-traceb.ads: Remove Tru64 reference. * g-trasym.ads: Likewise. * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. (Summary of Run-Time Configurations): Likewise. * memtrack.adb: Likewise. fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove alpha-dec-osf5.1. config: * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. toplevel: * MAINTAINERS (OS Port Maintainers): Remove osf. * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. From-SVN: r185240
2012-03-12 16:35:56 +01:00
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
1992-10-26 22:01:33 +01:00
2003-09-27 06:48:30 +02:00
This file is part of GCC.
1992-10-26 22:01:33 +01:00
2003-09-27 06:48:30 +02:00
GCC is free software; you can redistribute it and/or modify
1992-10-26 22:01:33 +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-10-26 22:01:33 +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-10-26 22:01:33 +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-10-26 22:01:33 +01:00
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
1992-10-26 22:01:33 +01:00
#include "rtl.h"
expr.h: Split out optab- and libfunc-related code to... * expr.h: Split out optab- and libfunc-related code to... * optabs.h, libfuncs.h: ... these new headers. * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h. (OPTABS_H): New. (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to dependencies. * mkconfig.sh: Don't include insn-codes.h from config.h. * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether enum insn_code is available. Move reload_in_optab and reload_out_optab array declarations to optabs.h. * regmove.c (gen_add3_insn): Move to optabs.c, export from there, prototype in expr.h. * gencodes.c: Cleanup: zap global variables, don't use printf where puts will do, don't bother defining MAX_INSN_CODE which nothing uses, let CODE_FOR_nothing get its value implicitly. * genemit.c, genopinit.c: Include optabs.h in generated file. * genoutput.c: Include insn-codes.h in generated file. * builtins.c, caller-save.c, combine.c, doloop.c, explow.c, expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c, config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c, config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c: Include optabs.h. * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c, config/m88k/m88k.c, config/sparc/sparc.c: Include libfuncs.h. * reload.c: Include expr.h and optabs.h before reload.h. * config/alpha/alpha.c: Include tree.h before reload.h. * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h, and reload.h in that order. * config/sparc/sparc.c: Include debug.h. * recog.c: Include insn-codes.h. cp: * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. * except.c: Include libfuncs.h. java: * Make-lang.in (java/decl.o): Update dependencies. * decl.c: Include libfuncs.h, don't include toplev.h. From-SVN: r44858
2001-08-13 17:56:51 +02:00
#include "tree.h"
1992-10-26 22:01:33 +01:00
#include "regs.h"
#include "hard-reg-set.h"
#include "insn-config.h"
#include "conditions.h"
#include "output.h"
#include "insn-attr.h"
#include "flags.h"
#include "recog.h"
#include "expr.h"
expr.h: Split out optab- and libfunc-related code to... * expr.h: Split out optab- and libfunc-related code to... * optabs.h, libfuncs.h: ... these new headers. * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h. (OPTABS_H): New. (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to dependencies. * mkconfig.sh: Don't include insn-codes.h from config.h. * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether enum insn_code is available. Move reload_in_optab and reload_out_optab array declarations to optabs.h. * regmove.c (gen_add3_insn): Move to optabs.c, export from there, prototype in expr.h. * gencodes.c: Cleanup: zap global variables, don't use printf where puts will do, don't bother defining MAX_INSN_CODE which nothing uses, let CODE_FOR_nothing get its value implicitly. * genemit.c, genopinit.c: Include optabs.h in generated file. * genoutput.c: Include insn-codes.h in generated file. * builtins.c, caller-save.c, combine.c, doloop.c, explow.c, expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c, config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c, config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c: Include optabs.h. * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c, config/m88k/m88k.c, config/sparc/sparc.c: Include libfuncs.h. * reload.c: Include expr.h and optabs.h before reload.h. * config/alpha/alpha.c: Include tree.h before reload.h. * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h, and reload.h in that order. * config/sparc/sparc.c: Include debug.h. * recog.c: Include insn-codes.h. cp: * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. * except.c: Include libfuncs.h. java: * Make-lang.in (java/decl.o): Update dependencies. * decl.c: Include libfuncs.h, don't include toplev.h. From-SVN: r44858
2001-08-13 17:56:51 +02:00
#include "optabs.h"
#include "reload.h"
1992-10-26 22:01:33 +01:00
#include "obstack.h"
#include "except.h"
#include "function.h"
toplev.h: Do not include diagnostic-core.h. 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. From-SVN: r161943
2010-07-08 06:22:54 +02:00
#include "diagnostic-core.h"
#include "ggc.h"
#include "integrate.h"
#include "tm_p.h"
Makefile.in (TARGET_H, [...]): New. * Makefile.in (TARGET_H, TARGET_DEF_H): New. (c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update. * c-decl.c (duplicate_decls): Use function pointer. * c-typeck.c (common_type): Similarly. * tree.c (valid_machine_attribute): Similarly. (merge_machine_type_attributes): Rename merge_type_attributes. (merge_machine_decl_attributes): Rename merge_decl_attributes. (merge_dllimport_decl_attributes): New function. * tree.h (merge_machine_type_attributes): Rename merge_type_attributes. (merge_machine_decl_attributes): Rename merge_decl_attributes. (merge_dllimport_decl_attributes): New prototype. * target.h: New. * target-def.h: New. doc: (Joseph Myers) * doc/gcc.texi, doc/tm.texi: Update documentation. cp: Make-lang.in: Update dependencies. * spew.c: Include target.h. (duplicate_decls): Call target function. * decl2.c: include target.h (import_export_class): Use existence of target function pointer. * typeck.c: Include target.h. (qualify_type_recursive): Rename variable. Call target function. (type_after_usual_arithmetic_conversions): Similarly. (common_type): Similarly. config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c, avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c, i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c, mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c) : Include target.h and target-def.h. Define target. * arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove. * arc/arc.c (arc_valid_machine_decl_attribute): Rename arc_valid_decl_attribute, make static. * arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * arm/arm-protos.h (arm_valid_machine_decl_attribute, arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute, arm_pe_merge_machine_decl_attributes): Remove. * arm/arm.c (arm_valid_machine_decl_attribute_p): Rename arm_valid_decl_attribute_p, make static. (arm_pe_valid_decl_attribute_p): Move from pe.c. * arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c. (arm_pe_merge_machine_decl_attributes): Move to tree.c. * arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New. (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. * avr/avr-protos.h (valid_machine_type_attribute, valid_machine_decl_attribute): Remove. * avr/avr.c (valid_machine_type_attribute, valid_machine_decl_attribute): Rename and make static. * avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. * c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove. * c4x/c4x.c (c4x_valid_type_attribute_p): Make static. * c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * d30v/d30v.h: Remove obsolete comments. * h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove. * h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make static. * h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. (i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES, i386_pe_valid_type_attributes_p): Remove. * i386/i386-protos.h (ix86_valid_decl_attribute_p, ix86_valid_type_attribute_p): Remove. * i386/i386.c (ix86_valid_decl_attribute_p): Remove. (ix86_valid_type_attribute_p): Make static. * i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c. * ia64/ia64-protos.h (ia64_valid_type_attribute): Remove. * ia64/ia64.c (ia64_valid_type_attribute): Make static. * ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove. * m32r/m32r.c (m32r_valid_decl_attribute): Make static. * m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p, m68hc11_valid_type_attribute_p): Remove. * m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove. (m68hc11_valid_type_attribute_p): Make static. * m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * mcore/mcore-protos.h (mcore_valid_machine_decl_attribute, mcore_merge_machine_decl_attribute): Remove. * mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename, make static. (mcore_merge_machine_decl_attributes): Move to tree.c. * mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. * ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p, ns32k_valid_type_attribute_p): Remove. * ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove. (ns32k_valid_type_attribute_p): Make static. * ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p, rs6000_valid_type_attribute_p): Remove. * rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove. (rs6000_valid_type_attribute_p): Make static. * rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove. * sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static. * sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove. * v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static. * v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. From-SVN: r43585
2001-06-26 20:09:27 +02:00
#include "target.h"
#include "target-def.h"
target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h. * target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h. * target.def (default_target_flags, handle_option, supports_split_stack, optimization_table, init_struct, except_unwind_info, unwind_tables_default, have_named_sections): Move to common/common-target.def. * target.h (enum opt_levels, struct default_options): Move to common/common-target.h. * targhooks.c (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info, default_target_handle_option, empty_optimization_table): Move to common/common-targhooks.c. * targhooks.h (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info, default_target_handle_option, empty_optimization_table): Move to common/common-targhooks.h. * common/common-target-def.h: Include common/common-targhooks.h. (TARGET_HAVE_NAMED_SECTIONS): Define if TARGET_ASM_NAMED_SECTION defined. * common/common-target.def (handle_option, option_init_struct, option_optimization_table, default_target_flags, except_unwind_info, supports_split_stack, unwind_tables_default, have_named_sections): Move from target.def. (HOOK_PREFIX): Undefine at end of file. * common/common-target.h: Include input.h. (enum opt_levels, struct default_options): Move from target.h. * common/common-targhooks.c, common/common-targhooks.h: New. * config.gcc (target_has_targetm_common): Default to yes. (moxie*): Set target_has_targetm_common=no. (hppa*-*-*): Don't set target_has_targetm_common=yes. * doc/tm.texi: Regenerate. * Makefile.in (COMMON_TARGET_H): Add $(INPUT_H). (C_TARGET_DEF_H): Add common/common-targhooks.h. (GCC_OBJS): Remove vec.o. (OBJS): Remove hooks.o and vec.o. (OBJS-libcommon-target): Add vec.o, hooks.o and common/common-targhooks.o. (c-family/c-common.o, c-family/c-cppbuiltin.o, lto-opts.o, tree.o, tree-tailcall.o, opts.o, toplev.o, varasm.o, function.o, except.o, expr.o, explow.o, dbxout.o, dwarf2out.o, cfgrtl.o, haifa-sched.o, cfglayout.o, $(out_object_file), $(common_out_object_file)): Update dependencies. (common/common-targhooks.o): New. * common/config/default-common.c: Include tm.h. Add FIXME comment. * common/config/pa/pa-common.c: Include more headers. Take copyright dates from pa.c. (pa_option_optimization_table, pa_handle_option, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move from pa.c. * common/config/alpha/alpha-common.c, common/config/arm/arm-common.c, common/config/avr/avr-common.c, common/config/bfin/bfin-common.c, common/config/cris/cris-common.c, common/config/fr30/fr30-common.c, common/config/frv/frv-common.c, common/config/h8300/h8300-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/iq2000/iq2000-common.c, common/config/lm32/lm32-common.c, common/config/m32c/m32c-common.c, common/config/m32r/m32r-common.c, common/config/m68k/m68k-common.c, common/config/mcore/mcore-common.c, common/config/mep/mep-common.c, common/config/microblaze/microblaze-common.c, common/config/mips/mips-common.c, common/config/mmix/mmix-common.c, common/config/mn10300/mn10300-common.c, common/config/pdp11/pdp11-common.c, common/config/picochip/picochip-common.c, common/config/rs6000/rs6000-common.c, common/config/rx/rx-common.c, common/config/s390/s390-common.c, common/config/score/score-common.c, common/config/sh/sh-common.c, common/config/sparc/sparc-common.c, common/config/spu/spu-common.c, common/config/v850/v850-common.c, common/config/vax/vax-common.c, common/config/xstormy16/xstormy16-common.c, common/config/xtensa/xtensa-common.c: New. * config/alpha/alpha.c: Include common/common-target.h. (alpha_option_optimization_table, alpha_handle_option, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to alpha-common.c. * config/arm/arm-protos.h (arm_except_unwind_info): Declare. * config/arm/arm.c (arm_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, arm_except_unwind_info): Move to arm-common.c. * config/avr/avr.c (avr_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to avr-common.c. * config/bfin/bfin.c (struct bfin_cpu): Move to bfin.h. (bfin_cpus, bfin_handle_option, TARGET_HANDLE_OPTION, TARGET_DEFAULT_TARGET_FLAGS): Move to bfin-common.c. * config/bfin/bfin.h struct bfin_cpu): Move from bfin.c. * config/cris/cris.c (cris_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, cris_handle_option): Move to cris-common.c. * config/fr30/fr30.c (fr30_option_optimization_table, TARGET_EXCEPT_UNWIND_INFO, TARGET_OPTION_OPTIMIZATION_TABLE): Move to fr30-common.c. * config/frv/frv.c (frv_option_optimization_table, MASK_DEFAULT_ALLOC_CC, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to frv-common.c. * config/h8300/h8300.c (h8300_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to h8300-common.c. * config/i386/i386-protos.h (ix86_handle_option): Declare. * config/i386/i386.c: Include common/common-target.h. (OPTION_MASK_ISA_MMX_SET, OPTION_MASK_ISA_3DNOW_SET, OPTION_MASK_ISA_SSE_SET, OPTION_MASK_ISA_SSE2_SET, OPTION_MASK_ISA_SSE3_SET, OPTION_MASK_ISA_SSSE3_SET, OPTION_MASK_ISA_SSE4_1_SET, OPTION_MASK_ISA_SSE4_2_SET, OPTION_MASK_ISA_AVX_SET, OPTION_MASK_ISA_FMA_SET, OPTION_MASK_ISA_SSE4_SET, OPTION_MASK_ISA_SSE4A_SET, OPTION_MASK_ISA_FMA4_SET, OPTION_MASK_ISA_XOP_SET, OPTION_MASK_ISA_LWP_SET, OPTION_MASK_ISA_AES_SET, OPTION_MASK_ISA_PCLMUL_SET, OPTION_MASK_ISA_ABM_SET, OPTION_MASK_ISA_BMI_SET, OPTION_MASK_ISA_TBM_SET, OPTION_MASK_ISA_POPCNT_SET, OPTION_MASK_ISA_CX16_SET, OPTION_MASK_ISA_SAHF_SET, OPTION_MASK_ISA_MOVBE_SET, OPTION_MASK_ISA_CRC32_SET, OPTION_MASK_ISA_FSGSBASE_SET, OPTION_MASK_ISA_RDRND_SET, OPTION_MASK_ISA_F16C_SET, OPTION_MASK_ISA_MMX_UNSET, OPTION_MASK_ISA_3DNOW_UNSET, OPTION_MASK_ISA_3DNOW_A_UNSET, OPTION_MASK_ISA_SSE_UNSET, OPTION_MASK_ISA_SSE2_UNSET, OPTION_MASK_ISA_SSE3_UNSET, OPTION_MASK_ISA_SSSE3_UNSET, OPTION_MASK_ISA_SSE4_1_UNSET, OPTION_MASK_ISA_SSE4_2_UNSET, OPTION_MASK_ISA_AVX_UNSET, OPTION_MASK_ISA_FMA_UNSET, OPTION_MASK_ISA_SSE4_UNSET, OPTION_MASK_ISA_SSE4A_UNSET, OPTION_MASK_ISA_FMA4_UNSET, OPTION_MASK_ISA_XOP_UNSET, OPTION_MASK_ISA_LWP_UNSET, OPTION_MASK_ISA_AES_UNSET, OPTION_MASK_ISA_PCLMUL_UNSET, OPTION_MASK_ISA_ABM_UNSET, OPTION_MASK_ISA_BMI_UNSET, OPTION_MASK_ISA_TBM_UNSET, OPTION_MASK_ISA_POPCNT_UNSET, OPTION_MASK_ISA_CX16_UNSET, OPTION_MASK_ISA_SAHF_UNSET, OPTION_MASK_ISA_MOVBE_UNSET, OPTION_MASK_ISA_CRC32_UNSET, OPTION_MASK_ISA_FSGSBASE_UNSET, OPTION_MASK_ISA_RDRND_UNSET, OPTION_MASK_ISA_F16C_UNSET, ix86_handle_option, ix86_option_optimization_table, ix86_option_init_struct, ix86_supports_split_stack, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, TARGET_SUPPORTS_SPLIT_STACK): Move to i386-common.c. * config/i386/t-i386 (i386.o): Update dependencies. * config/ia64/ia64-protos.h (ia64_except_unwind_info): Declare. * config/ia64/ia64.c (ia64_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, ia64_handle_option): Move to ia64-common.c. * config/iq2000/iq2000.c (iq2000_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): Move to iq2000-common.c. * config/lm32/lm32.c (lm32_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to lm32-common.c. * config/m32c/m32c.c (TARGET_HAVE_NAMED_SECTIONS): Move to m32c-common.c. * config/m32r/m32r.c (m32r_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, m32r_handle_option): Move to m32r-common.c. (m32r_memory_move_cost): Remove comment referring to TARGET_HANDLE_OPTION. * config/m68k/m68k.c (TARGET_HANDLE_OPTION, m68k_handle_option): Move to m68k-common.c. * config/mcore/mcore.c (mcore_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to mcore-common.c. * config/mep/mep.c (mep_option_optimization_table, mep_handle_option, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS): Move to mep-common.c. * config/microblaze/microblaze.c (microblaze_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to microblaze-common.c. * config/mips/mips.c (mips_handle_option, mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move to mips-common.c. * config/mmix/mmix.c (mmix_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to mmix-common.c. * config/mn10300/mn10300.c (mn10300_option_optimization_table, mn10300_handle_option, TARGET_EXCEPT_UNWIND_INFO, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to mn10300-common.c. * config/pa/pa.c: Include common/common-target.h. (pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, pa_handle_option): Move to pa-common.c. (pa_option_override): Use targetm_common.except_unwind_info. (pa_asm_output_mi_thunk, pa_function_section): Use targetm_common.have_named_sections. * config/pdp11/pdp11.c (pdp11_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, pdp11_handle_option, pdp11_option_init_struct): Move to pdp11-common.c. * config/picochip/picochip.c (picochip_option_optimization_table, TARGET_HAVE_NAMED_SECTIONS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to picochip-common.c. * config/rs6000/rs6000.c: Include common/common-target.h. (rs6000_option_optimization_table, TARGET_HANDLE_OPTION, TARGET_OPTION_INIT_STRUCT, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, rs6000_option_init_struct, rs6000_handle_option): Move to rs6000-common.c. * config/rs6000/t-rs6000 (rs6000.o): Update dependencies. * config/rx/rx.c (rx_handle_option, rx_option_optimization_table, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to rx-common.c. * config/s390/s390.c (processor_flags_table, s390_option_optimization_table, s390_option_init_struct, s390_handle_option, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT): Move to s390-common.c. * config/s390/s390.h (processor_flags_table): Declare. * config/score/score.c (score_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, MASK_ALL_CPU_BITS, score_handle_option): Move to score-common.c. * config/sh/sh.c (sh_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, sh_handle_option, sh_option_init_struct): Move to sh-common.c. * config/sparc/sparc.c: Include common/common-target.h. (sparc_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to sparc-common.c. * config/spu/spu.c (TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_INIT_STRUCT, TARGET_EXCEPT_UNWIND_INFO, spu_option_init_struct): Move to spu-common.c. * config/stormy16/stormy16.c (xstorym16_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): Move to xstormy16-common.c. * config/v850/v850.c (small_memory_physical_max, v850_handle_memory_optionn v850_handle_option, v850_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to v850-common.c. * config/vax/vax.c (TARGET_DEFAULT_TARGET_FLAGS): Move to vax-common.c. * config/xtensa/xtensa.c (xtensa_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to xtensa-common.c. * cfglayout.c: Include common/common-target.h. (fixup_reorder_chain): Use targetm_common.have_named_sections. * cfgrtl.c: Include common/common-target.h. (force_nonfallthru_and_redirect, commit_one_edge_insertion): Use targetm_common.have_named_sections. * dbxout.c: Include common/common-target.h. (dbxout_function_end): Use targetm_common.have_named_sections. * defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Use targetm_common.except_unwind_info. * dwarf2out.c: Include common/common-target.h. (dwarf2out_do_frame, dwarf2out_do_cfi_asm, dwarf2out_begin_prologue, dwarf2out_frame_init, dwarf2out_frame_finish, dwarf2out_assembly_start): Use targetm_common.except_unwind_info. * except.c: Include common/common-target.h. (init_eh, finish_eh_generation, output_one_function_exception_table): Use targetm_common.except_unwind_info. (switch_to_exception_section): Use targetm_common.have_named_sections. * explow.c: Include common/common-target.h. * expr.c: Include common/common-target.h. (build_personality_function): Use targetm_common.except_unwind_info. * function.c: Include common/common-target.h. (expand_function_end): Use targetm_common.except_unwind_info. * haifa-sched.c: Include common/common-target.h. (sched_create_recovery_edges): Use targetm_common.have_named_sections. * lto-opts.c: Include common/common-target.h instead of target.h. (lto_reissue_options): Use targetm_common.handle_option. * opts.c: Include common/common-target.h. (target_handle_option): Use targetm_common.handle_option. (init_options_struct): Update comment referring to targetm.target_option.optimization. Use targetm_common.default_target_flags, targetm_common.unwind_tables_default and targetm_common.option_init_struct. (default_options_optimization): Use targetm_common.option_optimization_table. (finish_options): Use targetm_common.except_unwind_info, targetm_common.unwind_tables_default, targetm_common.have_named_sections and targetm_common.supports_split_stack. * toplev.c: Include common/common-target.h. (process_options): Use targetm_common.have_named_sections. * tree-tailcall.c: Include common/common-target.h. (suitable_for_tail_call_opt_p): Use targetm_common.except_unwind_info. * tree.c: Include common/common-target.h. (build_common_builtin_nodes): Use targetm_common.except_unwind_info. * varasm.c: Include common/common-target.h. (resolve_unique_section, hot_function_section, default_function_section): Use targetm_common.have_named_sections. ada: * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o. (ada/utils.o): Update dependencies. * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add ../../../libcpp/libcpp.a. * gcc-interface/utils.c: Include common/common-target.h. (process_attributes): Use targetm_common.have_named_sections. c-family: * c-common.c: Include common/common-target.h. (handle_section_attribute): Use targetm_common.have_named_sections. * c-cppbuiltin.c: Include common/common-target.h. (c_cpp_builtins): Use targetm_common.except_unwind_info. cp: * Make-lang.in (cp/method.o): Update dependencies. * method.c: Include common/common-target.h. (use_thunk): Use targetm_common.have_named_sections. go: * Make-lang.in (go/go-lang.o, go/go-backend.o): Update dependencies. * go-backend.c: Include common/common-target.h. (go_write_export_data): Use targetm_common.have_named_sections. * go-lang.c: Include common/common-target.h. (go_langhook_init_options_struct): Use targetm_common.supports_split_stack. po: * exgettext: Handle common/ directory and subdirectories. From-SVN: r175064
2011-06-15 01:11:35 +02:00
#include "common/common-target.h"
#include "debug.h"
#include "langhooks.h"
system.h: Include "safe-ctype.h" instead of <safe-ctype.h>. * system.h: Include "safe-ctype.h" instead of <safe-ctype.h>. Include <signal.h>, <sys/mman.h>, <sys/resource.h> and <sys/times.h>. (O_BINARY, SIGCHLD, MAP_FAILED, MAP_ANONYMOUS, kill): Conditionally define. (GET_ENVIRONMENT): Poison. * configure.ac: Don't test for mincore. * configure: Regenerate. * config.in: Regenerate. * collect2-aix.c: Don't include <sys/mman.h>. * collect2.c: Don't include <signal.h>. (SIGCHLD): Don't define. (prefix_from_env): Use getenv instead of GET_ENVIRONMENT. * config/alpha/alpha.c: Include "splay-tree.h" instead of <splay-tree.h>. * config/arm/arm.c (arm_target_help): Use getenv instead of GET_ENVIRONMENT. * config/avr/driver-avr.c: Don't include <stdlib.h>. * config/frv/frv.c: Don't include <ctype.h>. * config/host-darwin.c: Don't include <sys/mman.h>. * config/host-hpux.c: Don't include <sys/mman.h> or <unistd.h>. (MAP_FAILED): Don't define. * config/host-linux.c: Don't include <sys/mman.h> or <limits.h>. * config/host-solaris.c: Don't include <sys/mman.h>. * config/i386/cygming.h: Don't include <stdio.h>. * config/i386/driver-i386.c: Don't include <stdlib.h>. * config/i386/host-cygwin.c: Don't include <sys/mman.h>. * config/iq2000/iq2000.c: Don't include <signal.h>. * config/m32c/m32c-pragma.c: Don't include <stdio.h>. * config/m68hc11/m68hc11.c: Don't include <stdio.h>. * config/mep/mep-pragma.c: Don't include <stdio.h>. * config/microblaze/microblaze.c: Don't include <signal.h>. * config/mips/mips.c: Don't include <signal.h>. * config/rs6000/host-darwin.c: Don't include <signal.h>. * cppdefault.c (cpp_relocated): Use getenv instead of GET_ENVIRONMENT. * defaults.h (GET_ENVIRONMENT): Don't define. * et-forest.h: Don't include <ansidecl.h> or <stddef.h>. * gcc.c: Don't include <signal.h>, <sys/mman.h> or <sys/types.h>. (SIGCHLD, MAP_FAILED, kill): Don't define. (process_command): Use getenv instead of GET_ENVIRONMENT. * genhooks.c: Don't include <string.h>. * ggc-common.c: Don't include <sys/resource.h>, <sys/mman.h> or <sys/types.h>. (MAP_FAILED): Don't define. * ggc-page.c Don't include <sys/mman.h>. (MAP_ANONYMOUS, MAP_FAILED): Don't define. * ggc-zone.c: Don't include <sys/mman.h>. (MAP_ANONYMOUS, MAP_FAILED): Don't define. * graph.c: Include "config.h" instead of <config.h>. * incpath.c (add_env_var_paths): Use getenv instead of GET_ENVIRONMENT. * lto-wrapper.c: Don't include <errno.h>, <signal.h> or "libiberty.h". (SIGCHLD, kill): Don't define. * mips-tfile.c: Don't include <signal.h>. * opts.c: Don't include <signal.h> or <sys/resource.h>. (print_specific_help): Use getenv instead of GET_ENVIRONMENT. * passes.c: Don't include <signal.h>, <sys/resource.h> or <sys/times.h>. * sparseset.h: Don't include <assert.h>. * timevar.c: Don't include <sys/times.h> or <sys/resource.h>. * tlink.c: Don't include "libiberty.h". * toplev.c: Don't include <signal.h> or <sys/times.h>. * tree-mudflap.c: Include "demangle.h" instead of <demangle.h>. * tree-switch-conversion.c: Don't include <signal.h>. * vmsdbgout.c: Don't include <errno.h> or <string.h>. c-family: * c-opts.c (check_deps_environment_vars): Use getenv instead of GET_ENVIRONMENT. * c-pch.c (O_BINARY): Don't define here. * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>. fortran: * gfortran.h (alloca): Don't include definitions. (NULL): Don't define. java: * boehm.c: Include "config.h" instead of <config.h>. * builtins.c: Don't include <stdarg.h>. * class.c: Don't include "stdio.h". (O_BINARY): Don't define here. * jcf-depend.c: Don't include <assert.h>. (jcf_dependency_set_dep_file, jcf_dependency_init, jcf_dependency_write): Use gcc_assert. * jcf-io.c (O_BINARY): Don't define here. * jcf-path.c: Don't include "tm.h". (jcf_path_init): Use getenv instead of GET_ENVIRONMENT. * resource.c: Don't include "stdio.h". (O_BINARY): Don't define here. * verify-impl.c: Don't include <stdio.h>. lto: * lto-endian.h: Delete. * lto-object.c: Don't include "libiberty.h". (O_BINARY): Don't define. * lto.c: Don't include "libiberty.h" or <sys/mman.h>. (O_BINARY): Don't define. From-SVN: r167241
2010-11-29 15:09:41 +01:00
#include "splay-tree.h"
#include "cfglayout.h"
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
#include "gimple.h"
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
#include "tree-flow.h"
#include "tree-stdarg.h"
#include "tm-constrs.h"
#include "df.h"
#include "libfuncs.h"
target.def (handle_option): Take gcc_options and cl_decoded_option pointers and location_t. * target.def (handle_option): Take gcc_options and cl_decoded_option pointers and location_t. * doc/tm.texi.in (TARGET_HANDLE_OPTION): Update documentation. * doc/tm.texi: Regenerate. * hooks.c (hook_bool_size_t_constcharptr_int_true): Remove. * hooks.h (hook_bool_size_t_constcharptr_int_true): Don't declare. * lto-opts.c (lto_reissue_options): Generate option structure for targetm.handle_option call. * opts.c (target_handle_option): Update call to targetm.handle_option. Remove assertions about values now passed down to hook. * targhooks.c (default_target_handle_option): New. * targhooks.h (default_target_handle_option): Declare. * config/alpha/alpha.c: Include opts.h. (alpha_handle_option): Update to new hook interface. * config/arm/arm.c: Include opts.h. (arm_handle_option): Update to new hook interface. * config/arm/t-arm (arm.o): Update dependencies. * config/bfin/bfin.c: Include opts.h. (bfin_handle_option): Update to new hook interface. * config/cris/cris.c: Include opts.h. (cris_handle_option): Update to new hook interface. * config/frv/frv.c: Include opts.h. (frv_handle_option): Update to new hook interface. * config/i386/i386.c: Include opts.h. (ix86_handle_option): Update to new hook interface. (ix86_valid_target_attribute_inner_p): Generate option structure for call to ix86_handle_option. * config/i386/t-i386 (i386.o): Update dependencies. * config/ia64/ia64.c: Include opts.h. (ia64_handle_option): Update to new hook interface. * config/ia64/t-ia64 (ia64.o): Update dependencies. * config/iq2000/iq2000.c: Include opts.h. (iq2000_handle_option): Update to new hook interface. * config/m32c/m32c.c: Include opts.h. (m32c_handle_option): Update to new hook interface. * config/m32r/m32r.c: Include opts.h. (m32r_handle_option): Update to new hook interface. * config/m68k/m68k.c: Include opts.h. (m68k_handle_option): Update to new hook interface. * config/mep/mep.c: Include opts.h. (mep_handle_option): Update to new hook interface. * config/microblaze/microblaze.c: Include opts.h. (microblaze_handle_option): Update to new hook interface. * config/mips/mips.c: Include opts.h. (mips_handle_option): Update to new hook interface. * config/mn10300/mn10300.c: Include opts.h. (mn10300_handle_option): Update to new hook interface. * config/pa/pa.c: Include opts.h. (pa_handle_option): Update to new hook interface. * config/pdp11/pdp11.c: Include opts.h. (pdp11_handle_option): Update to new hook interface. * config/rs6000/rs6000.c: Include opts.h. (rs6000_handle_option): Update to new hook interface. * config/rs6000/t-rs6000 (rs6000.o): Update dependencies. * config/rx/rx.c: Include opts.h. (rx_handle_option): Update to new hook interface. * config/s390/s390.c: Include opts.h. (s390_handle_option): Update to new hook interface. * config/score/score.c: Include opts.h. (score_handle_option): Update to new hook interface. * config/sh/sh.c: Include opts.h. (sh_handle_option): Update to new hook interface. * config/sparc/sparc.c: Include opts.h. (sparc_handle_option): Update to new hook interface. * config/v850/v850.c: Include opts.h. (v850_handle_option): Update to new hook interface. From-SVN: r171308
2011-03-22 23:23:02 +01:00
#include "opts.h"
/* Specify which cpu to schedule for. */
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
enum processor_type alpha_tune;
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
/* Which cpu we're generating code for. */
enum processor_type alpha_cpu;
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
static const char * const alpha_cpu_name[] =
{
"ev4", "ev5", "ev6"
};
/* Specify how accurate floating-point traps need to be. */
enum alpha_trap_precision alpha_tp;
/* Specify the floating-point rounding mode. */
enum alpha_fp_rounding_mode alpha_fprm;
/* Specify which things cause traps. */
enum alpha_fp_trap_mode alpha_fptm;
/* Nonzero if inside of a function, because the Alpha asm can't
handle .files inside of functions. */
static int inside_function = FALSE;
/* The number of cycles of latency we should assume on memory reads. */
int alpha_memory_latency = 3;
/* Whether the function needs the GP. */
static int alpha_function_needs_gp;
/* The assembler name of the current function. */
static const char *alpha_fnname;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
/* The next explicit relocation sequence number. */
extern GTY(()) int alpha_next_sequence_number;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
int alpha_next_sequence_number = 1;
/* The literal and gpdisp sequence numbers for this insn, as printed
by %# and %* respectively. */
extern GTY(()) int alpha_this_literal_sequence_number;
extern GTY(()) int alpha_this_gpdisp_sequence_number;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
int alpha_this_literal_sequence_number;
int alpha_this_gpdisp_sequence_number;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
/* Costs of various operations on the different architectures. */
struct alpha_rtx_cost_data
{
unsigned char fp_add;
unsigned char fp_mult;
unsigned char fp_div_sf;
unsigned char fp_div_df;
unsigned char int_mult_si;
unsigned char int_mult_di;
unsigned char int_shift;
unsigned char int_cmov;
unsigned short int_div;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
};
static struct alpha_rtx_cost_data const alpha_rtx_cost_data[PROCESSOR_MAX] =
{
{ /* EV4 */
COSTS_N_INSNS (6), /* fp_add */
COSTS_N_INSNS (6), /* fp_mult */
COSTS_N_INSNS (34), /* fp_div_sf */
COSTS_N_INSNS (63), /* fp_div_df */
COSTS_N_INSNS (23), /* int_mult_si */
COSTS_N_INSNS (23), /* int_mult_di */
COSTS_N_INSNS (2), /* int_shift */
COSTS_N_INSNS (2), /* int_cmov */
COSTS_N_INSNS (97), /* int_div */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
},
{ /* EV5 */
COSTS_N_INSNS (4), /* fp_add */
COSTS_N_INSNS (4), /* fp_mult */
COSTS_N_INSNS (15), /* fp_div_sf */
COSTS_N_INSNS (22), /* fp_div_df */
COSTS_N_INSNS (8), /* int_mult_si */
COSTS_N_INSNS (12), /* int_mult_di */
COSTS_N_INSNS (1) + 1, /* int_shift */
COSTS_N_INSNS (1), /* int_cmov */
COSTS_N_INSNS (83), /* int_div */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
},
{ /* EV6 */
COSTS_N_INSNS (4), /* fp_add */
COSTS_N_INSNS (4), /* fp_mult */
COSTS_N_INSNS (12), /* fp_div_sf */
COSTS_N_INSNS (15), /* fp_div_df */
COSTS_N_INSNS (7), /* int_mult_si */
COSTS_N_INSNS (7), /* int_mult_di */
COSTS_N_INSNS (1), /* int_shift */
COSTS_N_INSNS (2), /* int_cmov */
COSTS_N_INSNS (86), /* int_div */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
},
};
/* Similar but tuned for code size instead of execution latency. The
extra +N is fractional cost tuning based on latency. It's used to
encourage use of cheaper insns like shift, but only if there's just
one of them. */
static struct alpha_rtx_cost_data const alpha_rtx_cost_size =
{
COSTS_N_INSNS (1), /* fp_add */
COSTS_N_INSNS (1), /* fp_mult */
COSTS_N_INSNS (1), /* fp_div_sf */
COSTS_N_INSNS (1) + 1, /* fp_div_df */
COSTS_N_INSNS (1) + 1, /* int_mult_si */
COSTS_N_INSNS (1) + 2, /* int_mult_di */
COSTS_N_INSNS (1), /* int_shift */
COSTS_N_INSNS (1), /* int_cmov */
COSTS_N_INSNS (6), /* int_div */
};
/* Get the number of args of a function in one of two ways. */
#if TARGET_ABI_OPEN_VMS
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
#define NUM_ARGS crtl->args.info.num_args
#else
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
#define NUM_ARGS crtl->args.info
#endif
#define REG_PV 27
#define REG_RA 26
2002-06-04 06:06:38 +02:00
/* Declarations of static functions. */
static struct machine_function *alpha_init_machine_status (void);
static rtx alpha_emit_xfloating_compare (enum rtx_code *, rtx, rtx);
#if TARGET_ABI_OPEN_VMS
static void alpha_write_linkage (FILE *, const char *);
static bool vms_valid_pointer_mode (enum machine_mode);
#else
#define vms_patch_builtins() gcc_unreachable()
#endif
Makefile.in (TARGET_H, [...]): New. * Makefile.in (TARGET_H, TARGET_DEF_H): New. (c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update. * c-decl.c (duplicate_decls): Use function pointer. * c-typeck.c (common_type): Similarly. * tree.c (valid_machine_attribute): Similarly. (merge_machine_type_attributes): Rename merge_type_attributes. (merge_machine_decl_attributes): Rename merge_decl_attributes. (merge_dllimport_decl_attributes): New function. * tree.h (merge_machine_type_attributes): Rename merge_type_attributes. (merge_machine_decl_attributes): Rename merge_decl_attributes. (merge_dllimport_decl_attributes): New prototype. * target.h: New. * target-def.h: New. doc: (Joseph Myers) * doc/gcc.texi, doc/tm.texi: Update documentation. cp: Make-lang.in: Update dependencies. * spew.c: Include target.h. (duplicate_decls): Call target function. * decl2.c: include target.h (import_export_class): Use existence of target function pointer. * typeck.c: Include target.h. (qualify_type_recursive): Rename variable. Call target function. (type_after_usual_arithmetic_conversions): Similarly. (common_type): Similarly. config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c, avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c, i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c, mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c) : Include target.h and target-def.h. Define target. * arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove. * arc/arc.c (arc_valid_machine_decl_attribute): Rename arc_valid_decl_attribute, make static. * arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * arm/arm-protos.h (arm_valid_machine_decl_attribute, arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute, arm_pe_merge_machine_decl_attributes): Remove. * arm/arm.c (arm_valid_machine_decl_attribute_p): Rename arm_valid_decl_attribute_p, make static. (arm_pe_valid_decl_attribute_p): Move from pe.c. * arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c. (arm_pe_merge_machine_decl_attributes): Move to tree.c. * arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New. (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. * avr/avr-protos.h (valid_machine_type_attribute, valid_machine_decl_attribute): Remove. * avr/avr.c (valid_machine_type_attribute, valid_machine_decl_attribute): Rename and make static. * avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. * c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove. * c4x/c4x.c (c4x_valid_type_attribute_p): Make static. * c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * d30v/d30v.h: Remove obsolete comments. * h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove. * h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make static. * h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. (i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES, i386_pe_valid_type_attributes_p): Remove. * i386/i386-protos.h (ix86_valid_decl_attribute_p, ix86_valid_type_attribute_p): Remove. * i386/i386.c (ix86_valid_decl_attribute_p): Remove. (ix86_valid_type_attribute_p): Make static. * i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c. * ia64/ia64-protos.h (ia64_valid_type_attribute): Remove. * ia64/ia64.c (ia64_valid_type_attribute): Make static. * ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove. * m32r/m32r.c (m32r_valid_decl_attribute): Make static. * m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p, m68hc11_valid_type_attribute_p): Remove. * m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove. (m68hc11_valid_type_attribute_p): Make static. * m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * mcore/mcore-protos.h (mcore_valid_machine_decl_attribute, mcore_merge_machine_decl_attribute): Remove. * mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename, make static. (mcore_merge_machine_decl_attributes): Move to tree.c. * mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. * ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p, ns32k_valid_type_attribute_p): Remove. * ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove. (ns32k_valid_type_attribute_p): Make static. * ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p, rs6000_valid_type_attribute_p): Remove. * rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove. (rs6000_valid_type_attribute_p): Make static. * rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove. * sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static. * sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. * v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove. * v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static. * v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. From-SVN: r43585
2001-06-26 20:09:27 +02:00
#ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
alpha.c (alpha_mangle_fundamental_type): Rename to... gcc/ * config/alpha/alpha.c (alpha_mangle_fundamental_type): Rename to... (alpha_mangle_type): This. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/arm/arm-protos.h (arm_mangle_type): Add prototype. * config/arm/arm.c (TARGET_MANGLE_TYPE): Define target hook. (arm_init_neon_builtins): Fix comment. (arm_mangle_map_entry): New. (arm_mangle_map): New. (arm_mangle_type): New. * config/i386/i386.c (ix86_mangle_fundamental_type): Rename to... (ix86_mangle_type): This. Use TYPE_MAIN_VARIANT and restrict mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/ia64/ia64.c (ia64_mangle_fundamental_type): Rename to... (ia64_mangle_type): This. Use TYPE_MAIN_VARIANT and restrict mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/rs6000/rs6000.c (rs6000_mangle_fundamental_type): Rename to... (rs6000_mangle_type): This. Use TYPE_MAIN_VARIANT. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/s390/s390.c (s390_mangle_fundamental_type): Rename to... (s390_mangle_type): This. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/sparc/sparc.c (sparc_mangle_fundamental_type): Rename to... (sparc_mangle_type): This. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * cp/mangle.c (write_type): Call mangle_type target hook on all types before mangling. Use original type, not main variant, as argument. * target-def.h (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename hook to... (TARGET_MANGLE_TYPE): This. * target.h (gcc_target): Rename mangle_fundamental_type to mangle_type. * doc/tm.texi (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename section to... (TARGET_MANGLE_TYPE): This. Note slightly different semantics. Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com> From-SVN: r126917
2007-07-25 17:43:04 +02:00
/* Implement TARGET_MANGLE_TYPE. */
static const char *
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
alpha_mangle_type (const_tree type)
{
if (TYPE_MAIN_VARIANT (type) == long_double_type_node
&& TARGET_LONG_DOUBLE_128)
return "g";
/* For all other types, use normal C++ mangling. */
return NULL;
}
#endif
/* Parse target option strings. */
tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. * doc/tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. (C_COMMON_OVERRIDE_OPTIONS): Don't refer to OVERRIDE_OPTIONS. * doc/tm.texi: Regenerate. * system.h (OVERRIDE_OPTIONS): Poison. * target.def (override): Default to hook_void_void. * targhooks.c (default_target_option_override): Remove. * genmodes.c, machmode.def: Update comments mentioning OVERRIDE_OPTIONS. * config/alpha/alpha-modes.def: Update comment mentioning alpha_override_options. * config/alpha/alpha-protos.h (override_options): Remove. * config/alpha/alpha.c (override_options): Rename to alpha_option_override. Call SUBTARGET_OVERRIDE_OPTIONS. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/alpha/alpha.h (OVERRIDE_OPTIONS): Remove. * config/alpha/vms.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/arc/arc-protos.h (arc_init): Remove. * config/arc/arc.c (TARGET_OPTION_OVERRIDE): Define. (arc_init): Rename to arc_option_override. Make static. * config/arc/arc.h (ARC_EXTENSION_CPU): Correct comment. (OVERRIDE_OPTIONS): Remove. * config/arm/arm-protos.h (arm_override_options): Remove. * config/arm/arm.c (TARGET_OPTION_OVERRIDE): Define. (arm_override_options): Rename to arm_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/arm/arm.h (OVERRIDE_OPTIONS): Remove. * config/arm/arm.md: Update comment referring to arm_override_options. * config/arm/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/avr/avr-protos.h (avr_override_options): Remove. * config/avr/avr.c (TARGET_OPTION_OVERRIDE): Define. (avr_override_options): Rename to avr_option_override. Make static. * config/avr/avr.h (OVERRIDE_OPTIONS): Remove. * config/bfin/bfin-protos.h (override_options): Remove (twice). * config/bfin/bfin.c (override_options): Rename to bfin_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/bfin/bfin.h (OVERRIDE_OPTIONS): Remove. * config/cris/cris-protos.h (cris_override_options): Remove. * config/cris/cris.c (TARGET_OPTION_OVERRIDE): Define. (cris_override_options): Rename to cris_option_override. Make static. * config/cris/cris.h (OVERRIDE_OPTIONS): Remove. * config/frv/frv-protos.h (frv_override_options): Remove. * config/frv/frv.c (TARGET_OPTION_OVERRIDE): Define. (frv_override_options): Rename to frv_option_override. Make static. * config/frv/frv.h (OVERRIDE_OPTIONS): Remove. * config/h8300/h8300-protos.h (h8300_init_once): Remove. * config/h8300/h8300.c (h8300_init_once): Rename to h8300_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/h8300/h8300.h (OVERRIDE_OPTIONS): Remove. * config/i386/i386-protos.h (override_options): Remove. * config/i386/i386.c (override_options): Rename to ix86_option_override_internal. Make static. Comments referring to this function and callers changed. (ix86_option_override): New. (TARGET_OPTION_OVERRIDE): Define. * config/i386/i386.h (OVERRIDE_OPTION): Remove. * config/i386/linux64.h (DEFAULT_PCC_STRUCT_RETURN): Update comment. * config/ia64/ia64.c (ia64_file_start): Update comment referring to ia64_override_options. * config/iq2000/iq2000-protos.h (override_options): Remove. * config/iq2000/iq2000.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to iq2000_option_override. Make static. * config/iq2000/iq2000.h (OVERRIDE_OPTIONS): Remove. * config/lm32/lm32-protos.h (lm32_override_options): Remove. * config/lm32/lm32.c (TARGET_OPTION_OVERRIDE): Define. (lm32_override_options): Rename to lm32_option_override. Make static. * config/lm32/lm32.h (OVERRIDE_OPTIONS): Remove. * config/m32r/m32r.c (TARGET_OPTION_OVERRIDE): Define. (m32r_option_override): New. (m32r_init): Update comment. * config/m32r/m32r.h (OVERRIDE_OPTIONS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_override_options): Remove. * config/m68hc11/m68hc11.c (TARGET_OPTION_OVERRIDE): Define. (m68hc11_override_options): Rename to m68hc11_option_override. Make static. Return void. * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove. * config/m68k/m68k-protos.h (override_options): Remove. * config/m68k/m68k.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to m68k_option_override. Make static. * config/m68k/m68k.h (OVERRIDE_OPTIONS): Remove. * config/mcore/mcore-protos.h (mcore_override_options): Remove. * config/mcore/mcore.c (TARGET_OPTION_OVERRIDE): Define. (mcore_override_options): Rename to mcore_option_override. Make static. * config/mcore/mcore.h (OVERRIDE_OPTIONS): Remove. * config/mep/mep-protos.h (mep_override_options): Remove. * config/mep/mep.c (TARGET_OPTION_OVERRIDE): Define. (mep_override_options): Rename to mep_option_override. Make static. * config/mep/mep.h (OVERRIDE_OPTIONS): Remove. * config/mmix/mmix-protos.h (mmix_override_options): Remove. * config/mmix/mmix.c (TARGET_OPTION_OVERRIDE): Define. (mmix_override_options): Rename to mmix_option_override. Make static. * config/mmix/mmix.h (OVERRIDE_OPTIONS): Remove. * config/mn10300/mn10300-protos.h (mn10300_override_options): Remove. * config/mn10300/mn10300.c (TARGET_OPTION_OVERRIDE): Define. (mn10300_override_options): Rename to mn10300_option_override. Make static. * config/mn10300/mn10300.h (OVERRIDE_OPTIONS): Remove. * config/moxie/moxie-protos.h (moxie_override_options): Remove. * config/moxie/moxie.c (moxie_override_options): Rename to moxie_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/moxie/moxie.h (OVERRIDE_OPTIONS): Remove. * config/picochip/picochip-protos.h (picochip_override_options): Remove. Update comment referring to picochip_override_options. * config/picochip/picochip.c (TARGET_OPTION_OVERRIDE): Define. (picochip_override_options): Rename to picochip_option_override. Make static. Update comment and definition of TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. * config/picochip/picochip.h (OVERRIDE_OPTIONS): Remove. * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/linux64.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/rs6000-modes.def: Update comment referring to rs6000_override_options. * config/rs6000/rs6000-protos.h (rs6000_override_options): Remove. * config/rs6000/rs6000.c (TARGET_OPTION_OVERRIDE): Define. (rs6000_override_options): Rename to rs6000_option_override_internal. Make static. Commented referring to rs6000_override_options and OVERRIDE_OPTIONS updated. (rs6000_option_override): New. * config/rs6000/rs6000.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/s390/s390-protos.h (override_options): Remove. * config/s390/s390.c (override_options): Rename to s390_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/s390/s390.h (OVERRIDE_OPTIONS): Remove. * config/score/score-protos.h (score_override_options): Remove. * config/score/score.c (TARGET_OPTION_OVERRIDE): Define. (score_override_options): Rename to score_option_override. Make static. * config/score/score.h (OVERRIDE_OPTIONS): Remove. Update comment referring to override_options. * config/score/score3.c (score3_override_options): Rename to score3_option_override. * config/score/score3.h (score3_override_options): Rename to score3_option_override. * config/score/score7.c (score7_override_options): Rename to score7_option_override. * config/score/score7.h (score7_override_options): Rename to score7_option_override. * config/sh/sh.c: Update comments referring to OVERRIDE_OPTIONS. * config/sparc/sparc.c (TARGET_OPTION_OVERRIDE): Define. (sparc_override_options): Rename to sparc_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/sparc/sparc.h (OVERRIDE_OPTIONS): Remove. * config/sparc/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/spu/spu-protos.h (spu_override_options): Remove. * config/spu/spu.c (TARGET_OPTION_OVERRIDE): Define. (spu_override_options): Rename to spu_option_override. Make static. * config/spu/spu.h (OVERRIDE_OPTIONS): Remove. * config/vax/elf.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/vax/vax-protos.h (override_options): Remove. * config/vax/vax.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to vax_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/vax/vax.h (OVERRIDE_OPTIONS): Remove. * config/vxworks.c: Update comment referring to OVERRIDE_OPTIONS. * config/vxworks.h: Update comment referring to OVERRIDE_OPTIONS. * config/xtensa/xtensa-protos.h (override_options): Remove. * config/xtensa/xtensa.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to xtensa_option_override. Make static. * config/xtensa/xtensa.h (OVERRIDE_OPTIONS): Remove. From-SVN: r164334
2010-09-16 13:59:39 +02:00
static void
alpha_option_override (void)
{
builtins.c (expand_builtin_setjmp_receiver): Const-ify. * builtins.c (expand_builtin_setjmp_receiver): Const-ify. * c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length): Likewise. * c-dump.c (dump_option_value_info): Likewise. * c-format.c (format_length_info, format_char_info, format_flag_spec, format_flag_pair, format_kind_info): Likewise. * collect2.c (names): Likewise. * cppdefault.h (default_include): Likewise. * cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise. * flow.c (life_analysis): Likewise. * gcc.c (dir_separator_str, modify_target, option_map, target_option_translations, spec_list_1, extra_specs_1, init_spec): Likewise. * gcov.c (gcov_version_string): Likewise. * genattr.c (write_units): Likewise. * genattrtab.c (make_length_attrs, write_function_unit_info): Likewise. * gengenrtl.c (rtx_definition, defs): Likewise. * genrecog.c (pred_table): Likewise. * global.c (global_alloc): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (find_free_reg): Likewise. * params.h (param_info): Likewise. * predict.c (predictor_info): Likewise. * protoize.c (unexpansion_struct): Likewise. * real.c (bmask): Likewise. * recog.h (insn_operand_data, insn_data): Likewise. * regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise. * stmt.c (expand_nl_goto_receiver): Likewise. * toplev.c (da, debug_args, lang_opt, documented_lang_options, target_switches, target_options): Likewise. * tradcif.y (token, tokentab2, yylex): Likewise. * tree.h (attribute_spec): Likewise. * alpha.c (override_options, alpha_lookup_xfloating_lib_func): Likewise. * arc.c (arc_output_function_epilogue): Likewise. * arm.c (processors, all_cores, all_architectures, arm_override_options, isr_attribute_arg, isr_attribute_args, arm_isr_value): Likewise. * avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc): Likewise. * c4x.c (c4x_int_reglist): Likewise. * d30v.c (override_options): Likewise. * h8300.c (shift_insn): Likewise. * i386.c (size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost, ix86_expand_sse_comi, ix86_expand_sse_compare, override_options, builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg, ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise. * i386.h (processor_costs, ix86_cost): Likewise. * m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise. * m68hc11.h (processor_costs, m68hc11_cost): Likewise. * m68k.c (codes_68881, codes_FPA): Likewise. * m88k.c (mode_from_align, max_from_align, all_from_align, best_from_align, m_options): Likewise. * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. * mcore.c (mode_from_align): Likewise. * mips/elf64.h (UNIQUE_SECTION): Likewise. * mips/iris6gld.h (UNIQUE_SECTION): Likewise. * mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise. * mips.h (mips_regno_to_class): Likewise. * ns32k.c (scales): Likewise. * pa.c (import_string, magic_milli): Likewise. * rs6000.c (alt_reg_names, rs6000_override_options): Likewise. * sparc.c (leaf_reg_remap, sparc_override_options, reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders): Likewise. * sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise. cp: * class.c (build_vtable_entry_ref): Const-ify. * decl.c (predefined_identifier, initialize_predefined_identifiers): Likewise. * init.c (build_new_1): Likewise. * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): Likewise. f: * bad.c (_ffebad_message_, ffebad_messages_): Const-ify. * bld.c (ffebld_arity_op_): Likewise. * bld.h (ffebld_arity_op_): Likewise. * com.c (ffecom_init_0): Likewise. * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, names, gens, imps, specs, cc_pair, cc_descriptions, cc_summaries): Likewise. * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_, ffeintrin_imps_, ffeintrin_specs_): Likewise. java: * jcf-io.c (format_uint): Const-ify. * lang.c (java_tree_code_type, java_tree_code_length): Likewise. * lex.c (java_get_line_col): Likewise. * parse.y (build_incdec): Likewise. From-SVN: r46062
2001-10-07 18:51:11 +02:00
static const struct cpu_table {
const char *const name;
const enum processor_type processor;
const int flags;
} cpu_table[] = {
{ "ev4", PROCESSOR_EV4, 0 },
{ "ev45", PROCESSOR_EV4, 0 },
{ "21064", PROCESSOR_EV4, 0 },
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
{ "ev5", PROCESSOR_EV5, 0 },
{ "21164", PROCESSOR_EV5, 0 },
{ "ev56", PROCESSOR_EV5, MASK_BWX },
{ "21164a", PROCESSOR_EV5, MASK_BWX },
{ "pca56", PROCESSOR_EV5, MASK_BWX|MASK_MAX },
{ "21164PC",PROCESSOR_EV5, MASK_BWX|MASK_MAX },
{ "21164pc",PROCESSOR_EV5, MASK_BWX|MASK_MAX },
{ "ev6", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX },
{ "21264", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX },
{ "ev67", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX },
{ "21264a", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX }
};
int const ct_size = ARRAY_SIZE (cpu_table);
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
int i;
tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. * doc/tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. (C_COMMON_OVERRIDE_OPTIONS): Don't refer to OVERRIDE_OPTIONS. * doc/tm.texi: Regenerate. * system.h (OVERRIDE_OPTIONS): Poison. * target.def (override): Default to hook_void_void. * targhooks.c (default_target_option_override): Remove. * genmodes.c, machmode.def: Update comments mentioning OVERRIDE_OPTIONS. * config/alpha/alpha-modes.def: Update comment mentioning alpha_override_options. * config/alpha/alpha-protos.h (override_options): Remove. * config/alpha/alpha.c (override_options): Rename to alpha_option_override. Call SUBTARGET_OVERRIDE_OPTIONS. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/alpha/alpha.h (OVERRIDE_OPTIONS): Remove. * config/alpha/vms.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/arc/arc-protos.h (arc_init): Remove. * config/arc/arc.c (TARGET_OPTION_OVERRIDE): Define. (arc_init): Rename to arc_option_override. Make static. * config/arc/arc.h (ARC_EXTENSION_CPU): Correct comment. (OVERRIDE_OPTIONS): Remove. * config/arm/arm-protos.h (arm_override_options): Remove. * config/arm/arm.c (TARGET_OPTION_OVERRIDE): Define. (arm_override_options): Rename to arm_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/arm/arm.h (OVERRIDE_OPTIONS): Remove. * config/arm/arm.md: Update comment referring to arm_override_options. * config/arm/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/avr/avr-protos.h (avr_override_options): Remove. * config/avr/avr.c (TARGET_OPTION_OVERRIDE): Define. (avr_override_options): Rename to avr_option_override. Make static. * config/avr/avr.h (OVERRIDE_OPTIONS): Remove. * config/bfin/bfin-protos.h (override_options): Remove (twice). * config/bfin/bfin.c (override_options): Rename to bfin_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/bfin/bfin.h (OVERRIDE_OPTIONS): Remove. * config/cris/cris-protos.h (cris_override_options): Remove. * config/cris/cris.c (TARGET_OPTION_OVERRIDE): Define. (cris_override_options): Rename to cris_option_override. Make static. * config/cris/cris.h (OVERRIDE_OPTIONS): Remove. * config/frv/frv-protos.h (frv_override_options): Remove. * config/frv/frv.c (TARGET_OPTION_OVERRIDE): Define. (frv_override_options): Rename to frv_option_override. Make static. * config/frv/frv.h (OVERRIDE_OPTIONS): Remove. * config/h8300/h8300-protos.h (h8300_init_once): Remove. * config/h8300/h8300.c (h8300_init_once): Rename to h8300_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/h8300/h8300.h (OVERRIDE_OPTIONS): Remove. * config/i386/i386-protos.h (override_options): Remove. * config/i386/i386.c (override_options): Rename to ix86_option_override_internal. Make static. Comments referring to this function and callers changed. (ix86_option_override): New. (TARGET_OPTION_OVERRIDE): Define. * config/i386/i386.h (OVERRIDE_OPTION): Remove. * config/i386/linux64.h (DEFAULT_PCC_STRUCT_RETURN): Update comment. * config/ia64/ia64.c (ia64_file_start): Update comment referring to ia64_override_options. * config/iq2000/iq2000-protos.h (override_options): Remove. * config/iq2000/iq2000.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to iq2000_option_override. Make static. * config/iq2000/iq2000.h (OVERRIDE_OPTIONS): Remove. * config/lm32/lm32-protos.h (lm32_override_options): Remove. * config/lm32/lm32.c (TARGET_OPTION_OVERRIDE): Define. (lm32_override_options): Rename to lm32_option_override. Make static. * config/lm32/lm32.h (OVERRIDE_OPTIONS): Remove. * config/m32r/m32r.c (TARGET_OPTION_OVERRIDE): Define. (m32r_option_override): New. (m32r_init): Update comment. * config/m32r/m32r.h (OVERRIDE_OPTIONS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_override_options): Remove. * config/m68hc11/m68hc11.c (TARGET_OPTION_OVERRIDE): Define. (m68hc11_override_options): Rename to m68hc11_option_override. Make static. Return void. * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove. * config/m68k/m68k-protos.h (override_options): Remove. * config/m68k/m68k.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to m68k_option_override. Make static. * config/m68k/m68k.h (OVERRIDE_OPTIONS): Remove. * config/mcore/mcore-protos.h (mcore_override_options): Remove. * config/mcore/mcore.c (TARGET_OPTION_OVERRIDE): Define. (mcore_override_options): Rename to mcore_option_override. Make static. * config/mcore/mcore.h (OVERRIDE_OPTIONS): Remove. * config/mep/mep-protos.h (mep_override_options): Remove. * config/mep/mep.c (TARGET_OPTION_OVERRIDE): Define. (mep_override_options): Rename to mep_option_override. Make static. * config/mep/mep.h (OVERRIDE_OPTIONS): Remove. * config/mmix/mmix-protos.h (mmix_override_options): Remove. * config/mmix/mmix.c (TARGET_OPTION_OVERRIDE): Define. (mmix_override_options): Rename to mmix_option_override. Make static. * config/mmix/mmix.h (OVERRIDE_OPTIONS): Remove. * config/mn10300/mn10300-protos.h (mn10300_override_options): Remove. * config/mn10300/mn10300.c (TARGET_OPTION_OVERRIDE): Define. (mn10300_override_options): Rename to mn10300_option_override. Make static. * config/mn10300/mn10300.h (OVERRIDE_OPTIONS): Remove. * config/moxie/moxie-protos.h (moxie_override_options): Remove. * config/moxie/moxie.c (moxie_override_options): Rename to moxie_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/moxie/moxie.h (OVERRIDE_OPTIONS): Remove. * config/picochip/picochip-protos.h (picochip_override_options): Remove. Update comment referring to picochip_override_options. * config/picochip/picochip.c (TARGET_OPTION_OVERRIDE): Define. (picochip_override_options): Rename to picochip_option_override. Make static. Update comment and definition of TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. * config/picochip/picochip.h (OVERRIDE_OPTIONS): Remove. * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/linux64.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/rs6000-modes.def: Update comment referring to rs6000_override_options. * config/rs6000/rs6000-protos.h (rs6000_override_options): Remove. * config/rs6000/rs6000.c (TARGET_OPTION_OVERRIDE): Define. (rs6000_override_options): Rename to rs6000_option_override_internal. Make static. Commented referring to rs6000_override_options and OVERRIDE_OPTIONS updated. (rs6000_option_override): New. * config/rs6000/rs6000.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/s390/s390-protos.h (override_options): Remove. * config/s390/s390.c (override_options): Rename to s390_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/s390/s390.h (OVERRIDE_OPTIONS): Remove. * config/score/score-protos.h (score_override_options): Remove. * config/score/score.c (TARGET_OPTION_OVERRIDE): Define. (score_override_options): Rename to score_option_override. Make static. * config/score/score.h (OVERRIDE_OPTIONS): Remove. Update comment referring to override_options. * config/score/score3.c (score3_override_options): Rename to score3_option_override. * config/score/score3.h (score3_override_options): Rename to score3_option_override. * config/score/score7.c (score7_override_options): Rename to score7_option_override. * config/score/score7.h (score7_override_options): Rename to score7_option_override. * config/sh/sh.c: Update comments referring to OVERRIDE_OPTIONS. * config/sparc/sparc.c (TARGET_OPTION_OVERRIDE): Define. (sparc_override_options): Rename to sparc_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/sparc/sparc.h (OVERRIDE_OPTIONS): Remove. * config/sparc/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/spu/spu-protos.h (spu_override_options): Remove. * config/spu/spu.c (TARGET_OPTION_OVERRIDE): Define. (spu_override_options): Rename to spu_option_override. Make static. * config/spu/spu.h (OVERRIDE_OPTIONS): Remove. * config/vax/elf.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/vax/vax-protos.h (override_options): Remove. * config/vax/vax.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to vax_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/vax/vax.h (OVERRIDE_OPTIONS): Remove. * config/vxworks.c: Update comment referring to OVERRIDE_OPTIONS. * config/vxworks.h: Update comment referring to OVERRIDE_OPTIONS. * config/xtensa/xtensa-protos.h (override_options): Remove. * config/xtensa/xtensa.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to xtensa_option_override. Make static. * config/xtensa/xtensa.h (OVERRIDE_OPTIONS): Remove. From-SVN: r164334
2010-09-16 13:59:39 +02:00
#ifdef SUBTARGET_OVERRIDE_OPTIONS
SUBTARGET_OVERRIDE_OPTIONS;
#endif
/* Default to full IEEE compliance mode for Go language. */
if (strcmp (lang_hooks.name, "GNU Go") == 0
&& !(target_flags_explicit & MASK_IEEE))
target_flags |= MASK_IEEE;
alpha_fprm = ALPHA_FPRM_NORM;
alpha_tp = ALPHA_TP_PROG;
alpha_fptm = ALPHA_FPTM_N;
if (TARGET_IEEE)
{
alpha_tp = ALPHA_TP_INSN;
alpha_fptm = ALPHA_FPTM_SU;
}
if (TARGET_IEEE_WITH_INEXACT)
{
alpha_tp = ALPHA_TP_INSN;
alpha_fptm = ALPHA_FPTM_SUI;
}
if (alpha_tp_string)
{
if (! strcmp (alpha_tp_string, "p"))
alpha_tp = ALPHA_TP_PROG;
else if (! strcmp (alpha_tp_string, "f"))
alpha_tp = ALPHA_TP_FUNC;
else if (! strcmp (alpha_tp_string, "i"))
alpha_tp = ALPHA_TP_INSN;
else
builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h, c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c, gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c, tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, config/darwin.c, config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/symbian.c, config/stormy16/stormy16.c, config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. Use %' as apostrophe in diagnostics where applicable. Use %< and %> in place of '' quotes where applicable. Use %qs in place of %<%s%>. Consistently quote __builtin function names. ada: * misc.c (gnat_handle_option): Use %< and %> for quoting in warning message. cp: * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for quoting in diagnostics. * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for quoting in printf format. * decl.c (duplicate_decls, start_decl): Use %qD instead of unquoted %D. objc: * objc-act.c: Use %q, %< and %> for quoting in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Adjust expected messages. From-SVN: r90337
2004-11-09 11:13:30 +01:00
error ("bad value %qs for -mtrap-precision switch", alpha_tp_string);
}
if (alpha_fprm_string)
{
if (! strcmp (alpha_fprm_string, "n"))
alpha_fprm = ALPHA_FPRM_NORM;
else if (! strcmp (alpha_fprm_string, "m"))
alpha_fprm = ALPHA_FPRM_MINF;
else if (! strcmp (alpha_fprm_string, "c"))
alpha_fprm = ALPHA_FPRM_CHOP;
else if (! strcmp (alpha_fprm_string,"d"))
alpha_fprm = ALPHA_FPRM_DYN;
else
builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h, c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c, gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c, tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, config/darwin.c, config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/symbian.c, config/stormy16/stormy16.c, config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. Use %' as apostrophe in diagnostics where applicable. Use %< and %> in place of '' quotes where applicable. Use %qs in place of %<%s%>. Consistently quote __builtin function names. ada: * misc.c (gnat_handle_option): Use %< and %> for quoting in warning message. cp: * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for quoting in diagnostics. * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for quoting in printf format. * decl.c (duplicate_decls, start_decl): Use %qD instead of unquoted %D. objc: * objc-act.c: Use %q, %< and %> for quoting in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Adjust expected messages. From-SVN: r90337
2004-11-09 11:13:30 +01:00
error ("bad value %qs for -mfp-rounding-mode switch",
alpha_fprm_string);
}
if (alpha_fptm_string)
{
if (strcmp (alpha_fptm_string, "n") == 0)
alpha_fptm = ALPHA_FPTM_N;
else if (strcmp (alpha_fptm_string, "u") == 0)
alpha_fptm = ALPHA_FPTM_U;
else if (strcmp (alpha_fptm_string, "su") == 0)
alpha_fptm = ALPHA_FPTM_SU;
else if (strcmp (alpha_fptm_string, "sui") == 0)
alpha_fptm = ALPHA_FPTM_SUI;
else
builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h, c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c, gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c, tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, config/darwin.c, config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/symbian.c, config/stormy16/stormy16.c, config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. Use %' as apostrophe in diagnostics where applicable. Use %< and %> in place of '' quotes where applicable. Use %qs in place of %<%s%>. Consistently quote __builtin function names. ada: * misc.c (gnat_handle_option): Use %< and %> for quoting in warning message. cp: * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for quoting in diagnostics. * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for quoting in printf format. * decl.c (duplicate_decls, start_decl): Use %qD instead of unquoted %D. objc: * objc-act.c: Use %q, %< and %> for quoting in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Adjust expected messages. From-SVN: r90337
2004-11-09 11:13:30 +01:00
error ("bad value %qs for -mfp-trap-mode switch", alpha_fptm_string);
}
if (alpha_cpu_string)
{
for (i = 0; i < ct_size; i++)
if (! strcmp (alpha_cpu_string, cpu_table [i].name))
{
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
alpha_tune = alpha_cpu = cpu_table [i].processor;
target_flags &= ~ (MASK_BWX | MASK_MAX | MASK_FIX | MASK_CIX);
target_flags |= cpu_table [i].flags;
break;
}
if (i == ct_size)
builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h, c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c, gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c, tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, config/darwin.c, config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/symbian.c, config/stormy16/stormy16.c, config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. Use %' as apostrophe in diagnostics where applicable. Use %< and %> in place of '' quotes where applicable. Use %qs in place of %<%s%>. Consistently quote __builtin function names. ada: * misc.c (gnat_handle_option): Use %< and %> for quoting in warning message. cp: * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for quoting in diagnostics. * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for quoting in printf format. * decl.c (duplicate_decls, start_decl): Use %qD instead of unquoted %D. objc: * objc-act.c: Use %q, %< and %> for quoting in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Adjust expected messages. From-SVN: r90337
2004-11-09 11:13:30 +01:00
error ("bad value %qs for -mcpu switch", alpha_cpu_string);
}
if (alpha_tune_string)
{
for (i = 0; i < ct_size; i++)
if (! strcmp (alpha_tune_string, cpu_table [i].name))
{
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
alpha_tune = cpu_table [i].processor;
break;
}
if (i == ct_size)
error ("bad value %qs for -mtune switch", alpha_tune_string);
}
/* Do some sanity checks on the above options. */
if ((alpha_fptm == ALPHA_FPTM_SU || alpha_fptm == ALPHA_FPTM_SUI)
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
&& alpha_tp != ALPHA_TP_INSN && alpha_cpu != PROCESSOR_EV6)
{
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "fp software completion requires -mtrap-precision=i");
alpha_tp = ALPHA_TP_INSN;
}
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
if (alpha_cpu == PROCESSOR_EV6)
{
/* Except for EV6 pass 1 (not released), we always have precise
arithmetic traps. Which means we can do software completion
without minding trap shadows. */
alpha_tp = ALPHA_TP_PROG;
}
if (TARGET_FLOAT_VAX)
{
if (alpha_fprm == ALPHA_FPRM_MINF || alpha_fprm == ALPHA_FPRM_DYN)
{
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "rounding mode not supported for VAX floats");
alpha_fprm = ALPHA_FPRM_NORM;
}
if (alpha_fptm == ALPHA_FPTM_SUI)
{
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "trap mode not supported for VAX floats");
alpha_fptm = ALPHA_FPTM_SU;
}
if (target_flags_explicit & MASK_LONG_DOUBLE_128)
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "128-bit long double not supported for VAX floats");
target_flags &= ~MASK_LONG_DOUBLE_128;
}
{
char *end;
int lat;
if (!alpha_mlat_string)
alpha_mlat_string = "L1";
if (ISDIGIT ((unsigned char)alpha_mlat_string[0])
&& (lat = strtol (alpha_mlat_string, &end, 10), *end == '\0'))
;
else if ((alpha_mlat_string[0] == 'L' || alpha_mlat_string[0] == 'l')
&& ISDIGIT ((unsigned char)alpha_mlat_string[1])
&& alpha_mlat_string[2] == '\0')
{
static int const cache_latency[][4] =
{
{ 3, 30, -1 }, /* ev4 -- Bcache is a guess */
{ 2, 12, 38 }, /* ev5 -- Bcache from PC164 LMbench numbers */
{ 3, 12, 30 }, /* ev6 -- Bcache from DS20 LMbench. */
};
lat = alpha_mlat_string[1] - '0';
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
if (lat <= 0 || lat > 3 || cache_latency[alpha_tune][lat-1] == -1)
{
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "L%d cache latency unknown for %s",
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
lat, alpha_cpu_name[alpha_tune]);
lat = 3;
}
else
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
lat = cache_latency[alpha_tune][lat-1];
}
else if (! strcmp (alpha_mlat_string, "main"))
{
/* Most current memories have about 370ns latency. This is
a reasonable guess for a fast cpu. */
lat = 150;
}
else
{
diagnostic.c (warning): Accept parameter to classify warning option. * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
2005-04-23 23:29:07 +02:00
warning (0, "bad value %qs for -mmemory-latency", alpha_mlat_string);
lat = 3;
}
alpha_memory_latency = lat;
}
/* Default the definition of "small data" to 8 bytes. */
flags.h (g_switch_value, [...]): Remove. * flags.h (g_switch_value, g_switch_set): Remove. * opts.c (g_switch_value, g_switch_set): Remove. * config/g.opt (G): Add Var(g_switch_value). * config/alpha/alpha.c (alpha_handle_option): Don't handle -G here. (alpha_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. (alpha_in_small_data_p): Remove cast in comparison with g_switch_value. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/frv/frv.c (frv_const_unspec_p): Remove cast in comparison with g_switch_value. (frv_handle_option): Don't handle -G here. (frv_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. Don't modify g_switch_set. (frv_in_small_data_p): Remove cast in comparison with g_switch_value. * config/frv/frv.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/ia64/ia64.c (ia64_handle_option): Don't handle -G here. (ia64_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/lm32/lm32.c (lm32_handle_option, TARGET_HANDLE_OPTION): Remove. (lm32_in_small_data_p): Remove cast in comparison with g_switch_value. * config/lm32/lm32.h (ASM_OUTPUT_ALIGNED_LOCAL, ASM_OUTPUT_ALIGNED_COMMON): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/m32r/m32r.c (m32r_handle_option): Don't handle -G here. (m32r_init): Check global_options_set.x_g_switch_value instead of g_switch_set. (m32r_in_small_data_p): Remove cast in comparison with g_switch_value. (m32r_file_start): Format g_switch_value with %d. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_BSS): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/microblaze/microblaze.c (microblaze_handle_option): Don't handle -G here. (microblaze_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/mips/mips.c (mips_handle_option): Don't handle -G here. (mips_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/rs6000/rs6000.c (rs6000_handle_option): Don't handle -G here. (rs6000_file_start): Format g_switch_value with %d. (small_data_operand, rs6000_elf_in_small_data_p): Remove casts in comparisons with g_switch_value. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/rs6000/vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/score/score.c (score_handle_option): Don't handle -G here. * config/score/score3.c (score3_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/score/score7.c (score7_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. From-SVN: r164960
2010-10-04 22:48:39 +02:00
if (!global_options_set.x_g_switch_value)
g_switch_value = 8;
/* Infer TARGET_SMALL_DATA from -fpic/-fPIC. */
if (flag_pic == 1)
target_flags |= MASK_SMALL_DATA;
else if (flag_pic == 2)
target_flags &= ~MASK_SMALL_DATA;
/* Align labels and loops for optimal branching. */
/* ??? Kludge these by not doing anything if we don't optimize and also if
we are writing ECOFF symbols to work around a bug in DEC's assembler. */
if (optimize > 0 && write_symbols != SDB_DEBUG)
{
if (align_loops <= 0)
align_loops = 16;
if (align_jumps <= 0)
align_jumps = 16;
}
if (align_functions <= 0)
align_functions = 16;
2001-09-11 10:52:39 +02:00
/* Register variables and functions with the garbage collector. */
/* Set up function hooks. */
init_machine_status = alpha_init_machine_status;
real.c (struct real_format): Move to real.h. * real.c (struct real_format): Move to real.h. (real_format_for_mode): Rename from fmt_for_mode; update all users; initialize with ieee defaults. (real_to_target_fmt, real_from_target_fmt): New. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_quad_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Rename from s/_format//. (ieee_quad_format): Fix emin. (format_for_size, init_real_once): Remove. * real.h (struct real_format): Move from real.c. (real_format_for_mode): Declare. (real_to_target_fmt, real_from_target_fmt): Declare. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_quad_format, vax_f_format, vax_d_format, vax_g_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Declare. * toplev.c (do_compile): Don't call init_real_once. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Remove. * config/alpha/alpha.h (TARGET_FLOAT_FORMAT): Define. * config/alpha/osf5.h (LONG_DOUBLE_TYPE_SIZE): 64, if vax mode. * config/alpha/alpha.c (override_options): Set real_format_for_mode for VAX, if enabled. * config/c4x/c4x.c (c4x_override_options): Set real_format_for_mode for C4X. * config/i370/i370.h (OVERRIDE_OPTIONS): New. * config/i370/i370.c (override_options): New. * config/i370/i370-protos.h: Update. * config/i386/i386.c (override_options): Set real_format_for_mode for Intel 80-bit extended. * config/i386/i386.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Mind -mlong-double-64. (OVERRIDE_OPTIONS): Move code... * config/i960/i960.c (i960_initialize): ... here. Set real_format_for_mode for Intel 80-bit extended. * config/ia64/ia64.c (ia64_override_options): Set real_format_for_mode for Intel 80-bit extended, if enabled. * config/m68k/m68k.c (override_options): Set real_format_for_mode for Motorola 96-bit extended. * config/vax/vax.h (OVERRIDE_OPTIONS): New. * config/vax/vax.c (override_options): New. * config/vax/vax-protos.h: Update. From-SVN: r57388
2002-09-21 18:10:36 +02:00
/* Tell the compiler when we're using VAX floating point. */
if (TARGET_FLOAT_VAX)
{
REAL_MODE_FORMAT (SFmode) = &vax_f_format;
REAL_MODE_FORMAT (DFmode) = &vax_g_format;
REAL_MODE_FORMAT (TFmode) = NULL;
real.c (struct real_format): Move to real.h. * real.c (struct real_format): Move to real.h. (real_format_for_mode): Rename from fmt_for_mode; update all users; initialize with ieee defaults. (real_to_target_fmt, real_from_target_fmt): New. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_quad_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Rename from s/_format//. (ieee_quad_format): Fix emin. (format_for_size, init_real_once): Remove. * real.h (struct real_format): Move from real.c. (real_format_for_mode): Declare. (real_to_target_fmt, real_from_target_fmt): Declare. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_quad_format, vax_f_format, vax_d_format, vax_g_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Declare. * toplev.c (do_compile): Don't call init_real_once. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Remove. * config/alpha/alpha.h (TARGET_FLOAT_FORMAT): Define. * config/alpha/osf5.h (LONG_DOUBLE_TYPE_SIZE): 64, if vax mode. * config/alpha/alpha.c (override_options): Set real_format_for_mode for VAX, if enabled. * config/c4x/c4x.c (c4x_override_options): Set real_format_for_mode for C4X. * config/i370/i370.h (OVERRIDE_OPTIONS): New. * config/i370/i370.c (override_options): New. * config/i370/i370-protos.h: Update. * config/i386/i386.c (override_options): Set real_format_for_mode for Intel 80-bit extended. * config/i386/i386.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Mind -mlong-double-64. (OVERRIDE_OPTIONS): Move code... * config/i960/i960.c (i960_initialize): ... here. Set real_format_for_mode for Intel 80-bit extended. * config/ia64/ia64.c (ia64_override_options): Set real_format_for_mode for Intel 80-bit extended, if enabled. * config/m68k/m68k.c (override_options): Set real_format_for_mode for Motorola 96-bit extended. * config/vax/vax.h (OVERRIDE_OPTIONS): New. * config/vax/vax.c (override_options): New. * config/vax/vax-protos.h: Update. From-SVN: r57388
2002-09-21 18:10:36 +02:00
}
#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
target_flags |= MASK_LONG_DOUBLE_128;
#endif
}
1992-10-26 22:01:33 +01:00
/* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */
int
zap_mask (HOST_WIDE_INT value)
1992-10-26 22:01:33 +01:00
{
int i;
for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR;
i++, value >>= 8)
if ((value & 0xff) != 0 && (value & 0xff) != 0xff)
return 0;
return 1;
}
/* Return true if OP is valid for a particular TLS relocation.
Makefile.in (insn-preds.o): Depend on TREE_H. * Makefile.in (insn-preds.o): Depend on TREE_H. * genpreds.c (write_insn_preds_c): Include tree.h. * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand, reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand, const48_operand, and_operand, or_operand, mode_width_operand, mode_mask_operand, mul8_operand, const0_operand, hard_fp_register_operand, hard_int_register_operand, reg_or_cint_operand, some_operand, some_ni_operand, input_operand, samegp_function_operand, direct_call_operand, small_symbolic_operand, global_symbolic_operand, call_operand, symbolic_operand, dtp16_symbolic_operand, dtp32_symbolic_operand, gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand, gottp_symbolic_operand, alpha_comparison_operator, alpha_zero_comparison_operator, alpha_swapped_comparison_operator, signed_comparison_operator, alpha_fp_comparison_operator, divmod_operator, fix_operator, aligned_memory_operand, unaligned_memory_operand, reg_or_unaligned_mem_operand, any_memory_operand, reg_not_elim_operand, normal_memory_operand, reg_no_subreg_operand, addition_operation): Move to predicates.md. (reg_or_const_int_operand): Remove. Replace all users with reg_or_cint_operand. (tls_symbolic_operand_1): Export. Don't check mode or for CONST. (resolve_reload_operand): Split out of aligned_memory_operand. * config/alpha/alpha-protos.h: Update for exports. * config/alpha/alpha.h (PREDICATE_CODES): Remove. * config/alpha/alpha.md: Include predicates.md. * config/alpha/predicates.md: New file. From-SVN: r85953
2004-08-13 21:11:35 +02:00
We are already guaranteed that OP is a CONST. */
1992-10-26 22:01:33 +01:00
int
Makefile.in (insn-preds.o): Depend on TREE_H. * Makefile.in (insn-preds.o): Depend on TREE_H. * genpreds.c (write_insn_preds_c): Include tree.h. * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand, reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand, const48_operand, and_operand, or_operand, mode_width_operand, mode_mask_operand, mul8_operand, const0_operand, hard_fp_register_operand, hard_int_register_operand, reg_or_cint_operand, some_operand, some_ni_operand, input_operand, samegp_function_operand, direct_call_operand, small_symbolic_operand, global_symbolic_operand, call_operand, symbolic_operand, dtp16_symbolic_operand, dtp32_symbolic_operand, gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand, gottp_symbolic_operand, alpha_comparison_operator, alpha_zero_comparison_operator, alpha_swapped_comparison_operator, signed_comparison_operator, alpha_fp_comparison_operator, divmod_operator, fix_operator, aligned_memory_operand, unaligned_memory_operand, reg_or_unaligned_mem_operand, any_memory_operand, reg_not_elim_operand, normal_memory_operand, reg_no_subreg_operand, addition_operation): Move to predicates.md. (reg_or_const_int_operand): Remove. Replace all users with reg_or_cint_operand. (tls_symbolic_operand_1): Export. Don't check mode or for CONST. (resolve_reload_operand): Split out of aligned_memory_operand. * config/alpha/alpha-protos.h: Update for exports. * config/alpha/alpha.h (PREDICATE_CODES): Remove. * config/alpha/alpha.md: Include predicates.md. * config/alpha/predicates.md: New file. From-SVN: r85953
2004-08-13 21:11:35 +02:00
tls_symbolic_operand_1 (rtx op, int size, int unspec)
1992-10-26 22:01:33 +01:00
{
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
op = XEXP (op, 0);
if (GET_CODE (op) != UNSPEC || XINT (op, 1) != unspec)
return 0;
op = XVECEXP (op, 0, 0);
if (GET_CODE (op) != SYMBOL_REF)
return 0;
switch (SYMBOL_REF_TLS_MODEL (op))
{
case TLS_MODEL_LOCAL_DYNAMIC:
return unspec == UNSPEC_DTPREL && size == alpha_tls_size;
case TLS_MODEL_INITIAL_EXEC:
return unspec == UNSPEC_TPREL && size == 64;
case TLS_MODEL_LOCAL_EXEC:
return unspec == UNSPEC_TPREL && size == alpha_tls_size;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
}
Makefile.in (insn-preds.o): Depend on TREE_H. * Makefile.in (insn-preds.o): Depend on TREE_H. * genpreds.c (write_insn_preds_c): Include tree.h. * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand, reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand, const48_operand, and_operand, or_operand, mode_width_operand, mode_mask_operand, mul8_operand, const0_operand, hard_fp_register_operand, hard_int_register_operand, reg_or_cint_operand, some_operand, some_ni_operand, input_operand, samegp_function_operand, direct_call_operand, small_symbolic_operand, global_symbolic_operand, call_operand, symbolic_operand, dtp16_symbolic_operand, dtp32_symbolic_operand, gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand, gottp_symbolic_operand, alpha_comparison_operator, alpha_zero_comparison_operator, alpha_swapped_comparison_operator, signed_comparison_operator, alpha_fp_comparison_operator, divmod_operator, fix_operator, aligned_memory_operand, unaligned_memory_operand, reg_or_unaligned_mem_operand, any_memory_operand, reg_not_elim_operand, normal_memory_operand, reg_no_subreg_operand, addition_operation): Move to predicates.md. (reg_or_const_int_operand): Remove. Replace all users with reg_or_cint_operand. (tls_symbolic_operand_1): Export. Don't check mode or for CONST. (resolve_reload_operand): Split out of aligned_memory_operand. * config/alpha/alpha-protos.h: Update for exports. * config/alpha/alpha.h (PREDICATE_CODES): Remove. * config/alpha/alpha.md: Include predicates.md. * config/alpha/predicates.md: New file. From-SVN: r85953
2004-08-13 21:11:35 +02:00
/* Used by aligned_memory_operand and unaligned_memory_operand to
resolve what reload is going to do with OP if it's a register. */
Makefile.in (insn-preds.o): Depend on TREE_H. * Makefile.in (insn-preds.o): Depend on TREE_H. * genpreds.c (write_insn_preds_c): Include tree.h. * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand, reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand, const48_operand, and_operand, or_operand, mode_width_operand, mode_mask_operand, mul8_operand, const0_operand, hard_fp_register_operand, hard_int_register_operand, reg_or_cint_operand, some_operand, some_ni_operand, input_operand, samegp_function_operand, direct_call_operand, small_symbolic_operand, global_symbolic_operand, call_operand, symbolic_operand, dtp16_symbolic_operand, dtp32_symbolic_operand, gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand, gottp_symbolic_operand, alpha_comparison_operator, alpha_zero_comparison_operator, alpha_swapped_comparison_operator, signed_comparison_operator, alpha_fp_comparison_operator, divmod_operator, fix_operator, aligned_memory_operand, unaligned_memory_operand, reg_or_unaligned_mem_operand, any_memory_operand, reg_not_elim_operand, normal_memory_operand, reg_no_subreg_operand, addition_operation): Move to predicates.md. (reg_or_const_int_operand): Remove. Replace all users with reg_or_cint_operand. (tls_symbolic_operand_1): Export. Don't check mode or for CONST. (resolve_reload_operand): Split out of aligned_memory_operand. * config/alpha/alpha-protos.h: Update for exports. * config/alpha/alpha.h (PREDICATE_CODES): Remove. * config/alpha/alpha.md: Include predicates.md. * config/alpha/predicates.md: New file. From-SVN: r85953
2004-08-13 21:11:35 +02:00
rtx
resolve_reload_operand (rtx op)
1992-10-26 22:01:33 +01:00
{
if (reload_in_progress)
1992-10-26 22:01:33 +01:00
{
rtx tmp = op;
if (GET_CODE (tmp) == SUBREG)
tmp = SUBREG_REG (tmp);
if (REG_P (tmp)
&& REGNO (tmp) >= FIRST_PSEUDO_REGISTER)
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
op = reg_equiv_memory_loc (REGNO (tmp));
if (op == 0)
return 0;
}
1992-10-26 22:01:33 +01:00
}
Makefile.in (insn-preds.o): Depend on TREE_H. * Makefile.in (insn-preds.o): Depend on TREE_H. * genpreds.c (write_insn_preds_c): Include tree.h. * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand, reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand, const48_operand, and_operand, or_operand, mode_width_operand, mode_mask_operand, mul8_operand, const0_operand, hard_fp_register_operand, hard_int_register_operand, reg_or_cint_operand, some_operand, some_ni_operand, input_operand, samegp_function_operand, direct_call_operand, small_symbolic_operand, global_symbolic_operand, call_operand, symbolic_operand, dtp16_symbolic_operand, dtp32_symbolic_operand, gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand, gottp_symbolic_operand, alpha_comparison_operator, alpha_zero_comparison_operator, alpha_swapped_comparison_operator, signed_comparison_operator, alpha_fp_comparison_operator, divmod_operator, fix_operator, aligned_memory_operand, unaligned_memory_operand, reg_or_unaligned_mem_operand, any_memory_operand, reg_not_elim_operand, normal_memory_operand, reg_no_subreg_operand, addition_operation): Move to predicates.md. (reg_or_const_int_operand): Remove. Replace all users with reg_or_cint_operand. (tls_symbolic_operand_1): Export. Don't check mode or for CONST. (resolve_reload_operand): Split out of aligned_memory_operand. * config/alpha/alpha-protos.h: Update for exports. * config/alpha/alpha.h (PREDICATE_CODES): Remove. * config/alpha/alpha.md: Include predicates.md. * config/alpha/predicates.md: New file. From-SVN: r85953
2004-08-13 21:11:35 +02:00
return op;
}
/* The scalar modes supported differs from the default check-what-c-supports
version in that sometimes TFmode is available even when long double
indicates only DFmode. */
static bool
alpha_scalar_mode_supported_p (enum machine_mode mode)
{
switch (mode)
{
case QImode:
case HImode:
case SImode:
case DImode:
case TImode: /* via optabs.c */
return true;
case SFmode:
case DFmode:
return true;
case TFmode:
return TARGET_HAS_XFLOATING_LIBS;
default:
return false;
}
}
/* Alpha implements a couple of integer vector mode operations when
TARGET_MAX is enabled. We do not check TARGET_MAX here, however,
which allows the vectorizer to operate on e.g. move instructions,
or when expand_vector_operations can do something useful. */
static bool
alpha_vector_mode_supported_p (enum machine_mode mode)
{
return mode == V8QImode || mode == V4HImode || mode == V2SImode;
}
/* Return 1 if this function can directly return via $26. */
int
direct_return (void)
{
return (TARGET_ABI_OSF
&& reload_completed
&& alpha_sa_size () == 0
&& get_frame_size () == 0
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
&& crtl->outgoing_args_size == 0
&& crtl->args.pretend_args_size == 0);
}
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
/* Return the TLS model to use for SYMBOL. */
static enum tls_model
tls_symbolic_operand_type (rtx symbol)
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
{
enum tls_model model;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
if (GET_CODE (symbol) != SYMBOL_REF)
return TLS_MODEL_NONE;
model = SYMBOL_REF_TLS_MODEL (symbol);
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
/* Local-exec with a 64-bit size is the same code as initial-exec. */
if (model == TLS_MODEL_LOCAL_EXEC && alpha_tls_size == 64)
model = TLS_MODEL_INITIAL_EXEC;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
return model;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
}
/* Return true if the function DECL will share the same GP as any
function in the current unit of translation. */
static bool
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
decl_has_samegp (const_tree decl)
{
/* Functions that are not local can be overridden, and thus may
not share the same gp. */
if (!(*targetm.binds_local_p) (decl))
return false;
/* If -msmall-data is in effect, assume that there is only one GP
for the module, and so any local symbol has this property. We
need explicit relocations to be able to enforce this for symbols
not defined in this unit of translation, however. */
if (TARGET_EXPLICIT_RELOCS && TARGET_SMALL_DATA)
return true;
/* Functions that are not external are defined in this UoT. */
/* ??? Irritatingly, static functions not yet emitted are still
marked "external". Apply this to non-static functions only. */
return !TREE_PUBLIC (decl) || !DECL_EXTERNAL (decl);
}
hooks.c (hook_tree_bool_false): New. * hooks.c (hook_tree_bool_false): New. * hooks.h: Declare it. * target-def.h (TARGET_ASM_SELECT_SECTION): New. (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. * target.h (select_section, unique_section): New. (in_small_data_p): New. * varasm.c (resolve_unique_section): Use hooks instead of macros. (variable_section, output_constant_def_contents): Likewise. (default_select_section, default_unique_section): New. (categorize_decl_for_section, default_elf_select_section): New. * output.h: Declare them. * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/darwin.c (machopic_select_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/nextstep.c (nextstep_select_section): ... here. * config/nextstep-protos.h: Update. * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/svr3.h (SELECT_SECTION): Remove. * config/alpha/alpha.c (unicosmk_unique_section): Make static. (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. (alpha_encode_section_info): Use it. * config/alpha/alpha-protos.h: Update. * config/alpha/elf.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. * config/arm/pe.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. (avr_unique_section): Rename from unique_section; make static. * config/avr/avr-protos.h: Update. * config/avr/avr.h (UNIQUE_SECTION): Remove. * config/c4x/c4x.h (SELECT_SECTION): Remove. * config/i386/cygwin.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/i386/i386-interix.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/djgpp.h (UNIQUE_SECTION): Remove. * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. * config/i386/sco5.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/i386/svr3gas.h (SELECT_SECTION): Remove. * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION instead of SELECT_SECTION. * config/m68k/dpx2.h: Likewise. * config/rs6000/lynx.h: Likewise. * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. (ia64_in_small_data_p): New. (ia64_encode_section_info): Use it. Reorganize overlarge conditional. (ia64_aix_select_section, ia64_aix_unique_section): New. * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/m32r/m32r.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/m32r/m32r.c (m32r_select_section): Take align argument. * config/m32r/m32r-protos.h: Update. * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/m88k/m88k.c (m88k_select_section): ... here. * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. * config/mcore/mcore.h (UNIQUE_SECTION): Remove. * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. (mcore_unique_section): Make static. * config/mcore/mcore-protos.h: Update. * config/mips/elf.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/mips/elf64.h: Likewise. * config/mips/iris6gld.h: Likewise. * config/mips/linux.h: Likewise. * config/mips/mips-protos.h: Update. * config/mips/mips.c (mips_select_section): Add align argument. * config/mips/mips.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/mmix/mmix.c (mmix_select_section): Remove. (mmix_unique_section): Remove. * config/mmix/mmix-protos.h: Update. * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/pa/pa.c (pa_select_section): ... here. * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename from rs6000_select_section and make static. (rs6000_elf_unique_section): Similarly. (rs6000_xcoff_select_section): From xcoff.h. (rs6000_xcoff_unique_section): Likewise. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/rs6000/xcoff.h: Likewise. * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_section): ... here. * config/v850/v850.h (SELECT_SECTION): Move ... * config/v850/v850.c (v850_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * config/vax/vms.h (SELECT_SECTION): Move ... * config/vax/vax.c (vms_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs for the target hooks. From-SVN: r53550
2002-05-17 09:43:41 +02:00
/* Return true if EXP should be placed in the small data section. */
static bool
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
alpha_in_small_data_p (const_tree exp)
hooks.c (hook_tree_bool_false): New. * hooks.c (hook_tree_bool_false): New. * hooks.h: Declare it. * target-def.h (TARGET_ASM_SELECT_SECTION): New. (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. * target.h (select_section, unique_section): New. (in_small_data_p): New. * varasm.c (resolve_unique_section): Use hooks instead of macros. (variable_section, output_constant_def_contents): Likewise. (default_select_section, default_unique_section): New. (categorize_decl_for_section, default_elf_select_section): New. * output.h: Declare them. * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/darwin.c (machopic_select_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/nextstep.c (nextstep_select_section): ... here. * config/nextstep-protos.h: Update. * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/svr3.h (SELECT_SECTION): Remove. * config/alpha/alpha.c (unicosmk_unique_section): Make static. (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. (alpha_encode_section_info): Use it. * config/alpha/alpha-protos.h: Update. * config/alpha/elf.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. * config/arm/pe.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. (avr_unique_section): Rename from unique_section; make static. * config/avr/avr-protos.h: Update. * config/avr/avr.h (UNIQUE_SECTION): Remove. * config/c4x/c4x.h (SELECT_SECTION): Remove. * config/i386/cygwin.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/i386/i386-interix.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/djgpp.h (UNIQUE_SECTION): Remove. * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. * config/i386/sco5.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/i386/svr3gas.h (SELECT_SECTION): Remove. * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION instead of SELECT_SECTION. * config/m68k/dpx2.h: Likewise. * config/rs6000/lynx.h: Likewise. * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. (ia64_in_small_data_p): New. (ia64_encode_section_info): Use it. Reorganize overlarge conditional. (ia64_aix_select_section, ia64_aix_unique_section): New. * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/m32r/m32r.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/m32r/m32r.c (m32r_select_section): Take align argument. * config/m32r/m32r-protos.h: Update. * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/m88k/m88k.c (m88k_select_section): ... here. * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. * config/mcore/mcore.h (UNIQUE_SECTION): Remove. * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. (mcore_unique_section): Make static. * config/mcore/mcore-protos.h: Update. * config/mips/elf.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/mips/elf64.h: Likewise. * config/mips/iris6gld.h: Likewise. * config/mips/linux.h: Likewise. * config/mips/mips-protos.h: Update. * config/mips/mips.c (mips_select_section): Add align argument. * config/mips/mips.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/mmix/mmix.c (mmix_select_section): Remove. (mmix_unique_section): Remove. * config/mmix/mmix-protos.h: Update. * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/pa/pa.c (pa_select_section): ... here. * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename from rs6000_select_section and make static. (rs6000_elf_unique_section): Similarly. (rs6000_xcoff_select_section): From xcoff.h. (rs6000_xcoff_unique_section): Likewise. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/rs6000/xcoff.h: Likewise. * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_section): ... here. * config/v850/v850.h (SELECT_SECTION): Move ... * config/v850/v850.c (v850_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * config/vax/vms.h (SELECT_SECTION): Move ... * config/vax/vax.c (vms_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs for the target hooks. From-SVN: r53550
2002-05-17 09:43:41 +02:00
{
/* We want to merge strings, so we never consider them small data. */
if (TREE_CODE (exp) == STRING_CST)
return false;
/* Functions are never in the small data area. Duh. */
if (TREE_CODE (exp) == FUNCTION_DECL)
return false;
hooks.c (hook_tree_bool_false): New. * hooks.c (hook_tree_bool_false): New. * hooks.h: Declare it. * target-def.h (TARGET_ASM_SELECT_SECTION): New. (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. * target.h (select_section, unique_section): New. (in_small_data_p): New. * varasm.c (resolve_unique_section): Use hooks instead of macros. (variable_section, output_constant_def_contents): Likewise. (default_select_section, default_unique_section): New. (categorize_decl_for_section, default_elf_select_section): New. * output.h: Declare them. * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/darwin.c (machopic_select_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/nextstep.c (nextstep_select_section): ... here. * config/nextstep-protos.h: Update. * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/svr3.h (SELECT_SECTION): Remove. * config/alpha/alpha.c (unicosmk_unique_section): Make static. (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. (alpha_encode_section_info): Use it. * config/alpha/alpha-protos.h: Update. * config/alpha/elf.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. * config/arm/pe.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. (avr_unique_section): Rename from unique_section; make static. * config/avr/avr-protos.h: Update. * config/avr/avr.h (UNIQUE_SECTION): Remove. * config/c4x/c4x.h (SELECT_SECTION): Remove. * config/i386/cygwin.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/i386/i386-interix.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/djgpp.h (UNIQUE_SECTION): Remove. * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. * config/i386/sco5.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/i386/svr3gas.h (SELECT_SECTION): Remove. * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION instead of SELECT_SECTION. * config/m68k/dpx2.h: Likewise. * config/rs6000/lynx.h: Likewise. * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. (ia64_in_small_data_p): New. (ia64_encode_section_info): Use it. Reorganize overlarge conditional. (ia64_aix_select_section, ia64_aix_unique_section): New. * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/m32r/m32r.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/m32r/m32r.c (m32r_select_section): Take align argument. * config/m32r/m32r-protos.h: Update. * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/m88k/m88k.c (m88k_select_section): ... here. * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. * config/mcore/mcore.h (UNIQUE_SECTION): Remove. * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. (mcore_unique_section): Make static. * config/mcore/mcore-protos.h: Update. * config/mips/elf.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/mips/elf64.h: Likewise. * config/mips/iris6gld.h: Likewise. * config/mips/linux.h: Likewise. * config/mips/mips-protos.h: Update. * config/mips/mips.c (mips_select_section): Add align argument. * config/mips/mips.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/mmix/mmix.c (mmix_select_section): Remove. (mmix_unique_section): Remove. * config/mmix/mmix-protos.h: Update. * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/pa/pa.c (pa_select_section): ... here. * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename from rs6000_select_section and make static. (rs6000_elf_unique_section): Similarly. (rs6000_xcoff_select_section): From xcoff.h. (rs6000_xcoff_unique_section): Likewise. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/rs6000/xcoff.h: Likewise. * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_section): ... here. * config/v850/v850.h (SELECT_SECTION): Move ... * config/v850/v850.c (v850_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * config/vax/vms.h (SELECT_SECTION): Move ... * config/vax/vax.c (vms_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs for the target hooks. From-SVN: r53550
2002-05-17 09:43:41 +02:00
if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
{
const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
if (strcmp (section, ".sdata") == 0
|| strcmp (section, ".sbss") == 0)
return true;
}
else
{
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
/* If this is an incomplete type with size 0, then we can't put it
in sdata because it might be too big when completed. */
flags.h (g_switch_value, [...]): Remove. * flags.h (g_switch_value, g_switch_set): Remove. * opts.c (g_switch_value, g_switch_set): Remove. * config/g.opt (G): Add Var(g_switch_value). * config/alpha/alpha.c (alpha_handle_option): Don't handle -G here. (alpha_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. (alpha_in_small_data_p): Remove cast in comparison with g_switch_value. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/frv/frv.c (frv_const_unspec_p): Remove cast in comparison with g_switch_value. (frv_handle_option): Don't handle -G here. (frv_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. Don't modify g_switch_set. (frv_in_small_data_p): Remove cast in comparison with g_switch_value. * config/frv/frv.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/ia64/ia64.c (ia64_handle_option): Don't handle -G here. (ia64_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/lm32/lm32.c (lm32_handle_option, TARGET_HANDLE_OPTION): Remove. (lm32_in_small_data_p): Remove cast in comparison with g_switch_value. * config/lm32/lm32.h (ASM_OUTPUT_ALIGNED_LOCAL, ASM_OUTPUT_ALIGNED_COMMON): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/m32r/m32r.c (m32r_handle_option): Don't handle -G here. (m32r_init): Check global_options_set.x_g_switch_value instead of g_switch_set. (m32r_in_small_data_p): Remove cast in comparison with g_switch_value. (m32r_file_start): Format g_switch_value with %d. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_BSS): Cast g_switch_value to unsigned HOST_WIDE_INT. * config/microblaze/microblaze.c (microblaze_handle_option): Don't handle -G here. (microblaze_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/mips/mips.c (mips_handle_option): Don't handle -G here. (mips_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/rs6000/rs6000.c (rs6000_handle_option): Don't handle -G here. (rs6000_file_start): Format g_switch_value with %d. (small_data_operand, rs6000_elf_in_small_data_p): Remove casts in comparisons with g_switch_value. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/rs6000/vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/score/score.c (score_handle_option): Don't handle -G here. * config/score/score3.c (score3_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. * config/score/score7.c (score7_option_override): Check global_options_set.x_g_switch_value instead of g_switch_set. From-SVN: r164960
2010-10-04 22:48:39 +02:00
if (size > 0 && size <= g_switch_value)
hooks.c (hook_tree_bool_false): New. * hooks.c (hook_tree_bool_false): New. * hooks.h: Declare it. * target-def.h (TARGET_ASM_SELECT_SECTION): New. (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. * target.h (select_section, unique_section): New. (in_small_data_p): New. * varasm.c (resolve_unique_section): Use hooks instead of macros. (variable_section, output_constant_def_contents): Likewise. (default_select_section, default_unique_section): New. (categorize_decl_for_section, default_elf_select_section): New. * output.h: Declare them. * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/darwin.c (machopic_select_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/nextstep.c (nextstep_select_section): ... here. * config/nextstep-protos.h: Update. * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/svr3.h (SELECT_SECTION): Remove. * config/alpha/alpha.c (unicosmk_unique_section): Make static. (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. (alpha_encode_section_info): Use it. * config/alpha/alpha-protos.h: Update. * config/alpha/elf.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. * config/arm/pe.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. (avr_unique_section): Rename from unique_section; make static. * config/avr/avr-protos.h: Update. * config/avr/avr.h (UNIQUE_SECTION): Remove. * config/c4x/c4x.h (SELECT_SECTION): Remove. * config/i386/cygwin.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/i386/i386-interix.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/djgpp.h (UNIQUE_SECTION): Remove. * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. * config/i386/sco5.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/i386/svr3gas.h (SELECT_SECTION): Remove. * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION instead of SELECT_SECTION. * config/m68k/dpx2.h: Likewise. * config/rs6000/lynx.h: Likewise. * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. (ia64_in_small_data_p): New. (ia64_encode_section_info): Use it. Reorganize overlarge conditional. (ia64_aix_select_section, ia64_aix_unique_section): New. * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/m32r/m32r.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/m32r/m32r.c (m32r_select_section): Take align argument. * config/m32r/m32r-protos.h: Update. * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/m88k/m88k.c (m88k_select_section): ... here. * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. * config/mcore/mcore.h (UNIQUE_SECTION): Remove. * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. (mcore_unique_section): Make static. * config/mcore/mcore-protos.h: Update. * config/mips/elf.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/mips/elf64.h: Likewise. * config/mips/iris6gld.h: Likewise. * config/mips/linux.h: Likewise. * config/mips/mips-protos.h: Update. * config/mips/mips.c (mips_select_section): Add align argument. * config/mips/mips.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/mmix/mmix.c (mmix_select_section): Remove. (mmix_unique_section): Remove. * config/mmix/mmix-protos.h: Update. * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/pa/pa.c (pa_select_section): ... here. * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename from rs6000_select_section and make static. (rs6000_elf_unique_section): Similarly. (rs6000_xcoff_select_section): From xcoff.h. (rs6000_xcoff_unique_section): Likewise. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/rs6000/xcoff.h: Likewise. * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_section): ... here. * config/v850/v850.h (SELECT_SECTION): Move ... * config/v850/v850.c (v850_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * config/vax/vms.h (SELECT_SECTION): Move ... * config/vax/vax.c (vms_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs for the target hooks. From-SVN: r53550
2002-05-17 09:43:41 +02:00
return true;
}
return false;
}
#if TARGET_ABI_OPEN_VMS
static bool
vms_valid_pointer_mode (enum machine_mode mode)
{
return (mode == SImode || mode == DImode);
}
static bool
alpha_linkage_symbol_p (const char *symname)
{
int symlen = strlen (symname);
if (symlen > 4)
return strcmp (&symname [symlen - 4], "..lk") == 0;
return false;
}
#define LINKAGE_SYMBOL_REF_P(X) \
((GET_CODE (X) == SYMBOL_REF \
&& alpha_linkage_symbol_p (XSTR (X, 0))) \
|| (GET_CODE (X) == CONST \
&& GET_CODE (XEXP (X, 0)) == PLUS \
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF \
&& alpha_linkage_symbol_p (XSTR (XEXP (XEXP (X, 0), 0), 0))))
#endif
/* legitimate_address_p recognizes an RTL expression that is a valid
memory address for an instruction. The MODE argument is the
machine mode for the MEM expression that wants to use this address.
For Alpha, we have either a constant address or the sum of a
register and a constant address, or just a register. For DImode,
any of those forms can be surrounded with an AND that clear the
low-order three bits; this is an "unaligned" access. */
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
static bool
alpha_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
{
/* If this is an ldq_u type address, discard the outer AND. */
if (mode == DImode
&& GET_CODE (x) == AND
&& CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) == -8)
x = XEXP (x, 0);
/* Discard non-paradoxical subregs. */
if (GET_CODE (x) == SUBREG
&& (GET_MODE_SIZE (GET_MODE (x))
< GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
x = SUBREG_REG (x);
/* Unadorned general registers are valid. */
if (REG_P (x)
&& (strict
? STRICT_REG_OK_FOR_BASE_P (x)
: NONSTRICT_REG_OK_FOR_BASE_P (x)))
return true;
/* Constant addresses (i.e. +/- 32k) are valid. */
if (CONSTANT_ADDRESS_P (x))
return true;
#if TARGET_ABI_OPEN_VMS
if (LINKAGE_SYMBOL_REF_P (x))
return true;
#endif
/* Register plus a small constant offset is valid. */
if (GET_CODE (x) == PLUS)
{
rtx ofs = XEXP (x, 1);
x = XEXP (x, 0);
/* Discard non-paradoxical subregs. */
if (GET_CODE (x) == SUBREG
&& (GET_MODE_SIZE (GET_MODE (x))
< GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
x = SUBREG_REG (x);
if (REG_P (x))
{
if (! strict
&& NONSTRICT_REG_OK_FP_BASE_P (x)
&& CONST_INT_P (ofs))
return true;
if ((strict
? STRICT_REG_OK_FOR_BASE_P (x)
: NONSTRICT_REG_OK_FOR_BASE_P (x))
&& CONSTANT_ADDRESS_P (ofs))
return true;
}
}
/* If we're managing explicit relocations, LO_SUM is valid, as are small
data symbols. Avoid explicit relocations of modes larger than word
mode since i.e. $LC0+8($1) can fold around +/- 32k offset. */
else if (TARGET_EXPLICIT_RELOCS
&& GET_MODE_SIZE (mode) <= UNITS_PER_WORD)
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
{
if (small_symbolic_operand (x, Pmode))
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
return true;
if (GET_CODE (x) == LO_SUM)
{
rtx ofs = XEXP (x, 1);
x = XEXP (x, 0);
/* Discard non-paradoxical subregs. */
if (GET_CODE (x) == SUBREG
&& (GET_MODE_SIZE (GET_MODE (x))
< GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
x = SUBREG_REG (x);
/* Must have a valid base register. */
if (! (REG_P (x)
&& (strict
? STRICT_REG_OK_FOR_BASE_P (x)
: NONSTRICT_REG_OK_FOR_BASE_P (x))))
return false;
/* The symbol must be local. */
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
if (local_symbolic_operand (ofs, Pmode)
|| dtp32_symbolic_operand (ofs, Pmode)
|| tp32_symbolic_operand (ofs, Pmode))
return true;
}
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
}
return false;
}
/* Build the SYMBOL_REF for __tls_get_addr. */
static GTY(()) rtx tls_get_addr_libfunc;
static rtx
get_tls_get_addr (void)
{
if (!tls_get_addr_libfunc)
tls_get_addr_libfunc = init_one_libfunc ("__tls_get_addr");
return tls_get_addr_libfunc;
}
/* Try machine-dependent ways of modifying an illegitimate address
to be legitimate. If we find one, return the new, valid address. */
tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. 2009-05-04 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete. * gcc/explow.c (memory_address): Use target hook. * gcc/targhooks.c (default_legitimize_address): New. * gcc/targhooks.h (default_legitimize_address): New. * gcc/target.h (legitimize_address): New. * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New. (TARGET_INITIALIZER): Include it. * gcc/system.h (LEGITIMIZE_ADDRESS): Poison. * config/bfin/bfin-protos.h (legitimize_address): Remove. * config/bfin/bfin.c (legitimize_address): Remove. * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove. * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390-protos.h (legitimize_address): Delete. * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete. * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete. * gcc/config/i386/i386-protos.h (legitimize_address): Delete. * gcc/config/avr/avr-protos.h (legitimize_address): Delete. * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete. * gcc/config/score/score-protos.h (score_legitimize_address): Delete. * gcc/config/arm/arm-protos.h (arm_legitimize_address, (thumb_legitimize_address): Delete. * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete. * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete. * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete. * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete. * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete. * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete. * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete. * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version. * config/m32c/m32c.c (m32c_legitimize_address): Standardize. * config/m32r/m32r.c (m32r_legitimize_address): New. * config/m68k/m68k.c (m68k_legitimize_address): New. * config/score/score.c (score_legitimize_address): Standardize. * config/score/score3.c (score3_legitimize_address): Standardize. * config/score/score3.h (score3_legitimize_address): Adjust. * config/score/score7.c (score7_legitimize_address): Standardize. * config/score/score7.h (score7_legitimize_address): Adjust. * config/sh/sh.c (sh_legitimize_address): New. * config/iq2000/iq2000.c (iq2000_legitimize_address): New. * gcc/config/s390/s390.c (legitimize_address): Rename to... (s390_legitimize_address): ... this. * gcc/config/sparc/sparc.c (legitimize_address): Rename to... (sparc_legitimize_address): ... this. * gcc/config/i386/i386.c (legitimize_address): Rename to... (ix86_legitimize_address): ... this. * gcc/config/avr/avr.c (legitimize_address): Rename to... (avr_legitimize_address): ... this. * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to... (mn10300_legitimize_address): ... this. * config/alpha/alpha.c (alpha_legitimize_address): Wrap... (alpha_legitimize_address_1): ... the old alpha_legitimize_address. (alpha_expand_mov): Adjust call. * config/frv/frv.c (frv_legitimize_address): Return x on failure. * config/spu/spu.c (spu_legitimize_address): Likewise. * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. From-SVN: r147098
2009-05-04 14:52:41 +02:00
static rtx
alpha_legitimize_address_1 (rtx x, rtx scratch, enum machine_mode mode)
{
HOST_WIDE_INT addend;
/* If the address is (plus reg const_int) and the CONST_INT is not a
valid offset, compute the high part of the constant and add it to
the register. Then our address is (plus temp low-part-const). */
if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& CONST_INT_P (XEXP (x, 1))
&& ! CONSTANT_ADDRESS_P (XEXP (x, 1)))
{
addend = INTVAL (XEXP (x, 1));
x = XEXP (x, 0);
goto split_addend;
}
/* If the address is (const (plus FOO const_int)), find the low-order
part of the CONST_INT. Then load FOO plus any high-order part of the
CONST_INT into a register. Our address is (plus reg low-part-const).
This is done to reduce the number of GOT entries. */
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (can_create_pseudo_p ()
&& GET_CODE (x) == CONST
&& GET_CODE (XEXP (x, 0)) == PLUS
&& CONST_INT_P (XEXP (XEXP (x, 0), 1)))
{
addend = INTVAL (XEXP (XEXP (x, 0), 1));
x = force_reg (Pmode, XEXP (XEXP (x, 0), 0));
goto split_addend;
}
/* If we have a (plus reg const), emit the load as in (2), then add
the two registers, and finally generate (plus reg low-part-const) as
our address. */
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (can_create_pseudo_p ()
&& GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 1)) == CONST
&& GET_CODE (XEXP (XEXP (x, 1), 0)) == PLUS
&& CONST_INT_P (XEXP (XEXP (XEXP (x, 1), 0), 1)))
{
addend = INTVAL (XEXP (XEXP (XEXP (x, 1), 0), 1));
x = expand_simple_binop (Pmode, PLUS, XEXP (x, 0),
XEXP (XEXP (XEXP (x, 1), 0), 0),
NULL_RTX, 1, OPTAB_LIB_WIDEN);
goto split_addend;
}
/* If this is a local symbol, split the address into HIGH/LO_SUM parts.
Avoid modes larger than word mode since i.e. $LC0+8($1) can fold
around +/- 32k offset. */
if (TARGET_EXPLICIT_RELOCS
&& GET_MODE_SIZE (mode) <= UNITS_PER_WORD
&& symbolic_operand (x, Pmode))
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
{
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
rtx r0, r16, eqv, tga, tp, insn, dest, seq;
switch (tls_symbolic_operand_type (x))
{
case TLS_MODEL_NONE:
break;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
case TLS_MODEL_GLOBAL_DYNAMIC:
start_sequence ();
r0 = gen_rtx_REG (Pmode, 0);
r16 = gen_rtx_REG (Pmode, 16);
tga = get_tls_get_addr ();
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
dest = gen_reg_rtx (Pmode);
seq = GEN_INT (alpha_next_sequence_number++);
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
emit_insn (gen_movdi_er_tlsgd (r16, pic_offset_table_rtx, x, seq));
insn = gen_call_value_osf_tlsgd (r0, tga, seq);
insn = emit_call_insn (insn);
[multiple changes] 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> PATCH rtl/7335 PATCH rtl/33826 * see.c (see_copy_insn): Copy new pure const attributes for new call. * c-decl.c (merge_decls): Ditto. * postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree.c (define_local_buitin): Rename DECL_IS_PURE to DECL_PURE_P. Initialized DECL_LOOPING_CONST_PURE. (process_call_operands): Set tree_side_effects properly. * tree.h (TREE_READONLY_DECL_P): Removed. (DECL_IS_PURE): Renamed to DECL_PURE_P. (DECL_LOOPING_OR_CONST_P): New macro. (struct tree_function_decl): Added looping_const_or_pure_p. (ECF_*) Renumbered. (ECF_LOOPING_OR_CONST_P): New macro, * rtlanal.c (pure_const_p): Removed. * builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P. * reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * ipa-pure-const.c (pure_const_state_e): Added looping field. (check_decl, check_tree, check_call, scan_function): Initialize looping. (analyze_function): Rename DECL_IS_PURE to DECL_PURE_P. (static_execute): Set looping true for recursive functions. Undo setting state to IPA_NEITHER for recursive functions. * cse.c (cse_insn): * ifcvt.c (noce_can_store_speculate_p): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or RTL_CONST_OR_PURE_CALL_P. * dse.c (scan_insn): Ditto. * local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto. * gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. (store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P. * gimplify.c (gimplify_call_expr): Clear side effects for non-looping pure and constant calls. * calls.c (emit_call_1): Set rtl flags from ecf flags. (flags_from_decl_or_type): Set ecf flags from decl flags. (initialize_argument_information): Turn off ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST. Change const to pure if callee_copies is true rather than just turning off const. (expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old way of marking pure calls. (emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL. Remove hack that was supposed to fix pr7335 and remove old way of marking pure calls. * emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P. * cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree-ssa-pre.c (can_value_number_call): Fixed spacing. * loop-invariant.c (find_exits, find_invariant_bb): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * sched-deps.c (schedule_analyze): Ditto. * rtl.h (struct rtx_def): Use call field, unchanging field, and return_val field of calls to represent pure and const function info. (CONST_OR_PURE_CALL_P): Deleted macro. (RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros. * tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to TREE_READONLY. * tree-optimize.c (execute_fixup_cfg): Added test for ECF_LOOPING_CONST_OR_PURE. * c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to DECL_PURE_P. * tree-cfg.c (update_call_expr_flags): Do not clear tree side effects for looping pure or const calls. (verify_gimple_expr): Added verification code. * config/alpha/alpha.c (alpha_legitimize_address, alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * config/s390/s390.c (s390_emit_tls_call_insn): Ditto. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto. * config/mips/mips.c (mips_call_tls_get_addr): Ditto. * cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * dce.c (deletable_insn_p): Allow non looping, non sibling, pure and const calls to be deleted. java: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (java_init_decl_processing): Change DECL_IS_PURE to DECL_PURE_P. cp: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY, DECL_LOOPING_CONST_OR_PURE_P attributes. * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to DECL_PURE_P. gfortran: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * trans-decl.c (gfc_get_extern_function_decl, build_function_decl): Rename DECL_IS_PURE to DECL_PURE_P. From-SVN: r135053
2008-05-07 22:48:07 +02:00
RTL_CONST_CALL_P (insn) = 1;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
use_reg (&CALL_INSN_FUNCTION_USAGE (insn), r16);
insn = get_insns ();
end_sequence ();
emit_libcall_block (insn, dest, r0, x);
return dest;
case TLS_MODEL_LOCAL_DYNAMIC:
start_sequence ();
r0 = gen_rtx_REG (Pmode, 0);
r16 = gen_rtx_REG (Pmode, 16);
tga = get_tls_get_addr ();
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
scratch = gen_reg_rtx (Pmode);
seq = GEN_INT (alpha_next_sequence_number++);
emit_insn (gen_movdi_er_tlsldm (r16, pic_offset_table_rtx, seq));
insn = gen_call_value_osf_tlsldm (r0, tga, seq);
insn = emit_call_insn (insn);
[multiple changes] 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> PATCH rtl/7335 PATCH rtl/33826 * see.c (see_copy_insn): Copy new pure const attributes for new call. * c-decl.c (merge_decls): Ditto. * postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree.c (define_local_buitin): Rename DECL_IS_PURE to DECL_PURE_P. Initialized DECL_LOOPING_CONST_PURE. (process_call_operands): Set tree_side_effects properly. * tree.h (TREE_READONLY_DECL_P): Removed. (DECL_IS_PURE): Renamed to DECL_PURE_P. (DECL_LOOPING_OR_CONST_P): New macro. (struct tree_function_decl): Added looping_const_or_pure_p. (ECF_*) Renumbered. (ECF_LOOPING_OR_CONST_P): New macro, * rtlanal.c (pure_const_p): Removed. * builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P. * reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * ipa-pure-const.c (pure_const_state_e): Added looping field. (check_decl, check_tree, check_call, scan_function): Initialize looping. (analyze_function): Rename DECL_IS_PURE to DECL_PURE_P. (static_execute): Set looping true for recursive functions. Undo setting state to IPA_NEITHER for recursive functions. * cse.c (cse_insn): * ifcvt.c (noce_can_store_speculate_p): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or RTL_CONST_OR_PURE_CALL_P. * dse.c (scan_insn): Ditto. * local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto. * gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. (store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P. * gimplify.c (gimplify_call_expr): Clear side effects for non-looping pure and constant calls. * calls.c (emit_call_1): Set rtl flags from ecf flags. (flags_from_decl_or_type): Set ecf flags from decl flags. (initialize_argument_information): Turn off ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST. Change const to pure if callee_copies is true rather than just turning off const. (expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old way of marking pure calls. (emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL. Remove hack that was supposed to fix pr7335 and remove old way of marking pure calls. * emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P. * cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree-ssa-pre.c (can_value_number_call): Fixed spacing. * loop-invariant.c (find_exits, find_invariant_bb): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * sched-deps.c (schedule_analyze): Ditto. * rtl.h (struct rtx_def): Use call field, unchanging field, and return_val field of calls to represent pure and const function info. (CONST_OR_PURE_CALL_P): Deleted macro. (RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros. * tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to TREE_READONLY. * tree-optimize.c (execute_fixup_cfg): Added test for ECF_LOOPING_CONST_OR_PURE. * c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to DECL_PURE_P. * tree-cfg.c (update_call_expr_flags): Do not clear tree side effects for looping pure or const calls. (verify_gimple_expr): Added verification code. * config/alpha/alpha.c (alpha_legitimize_address, alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * config/s390/s390.c (s390_emit_tls_call_insn): Ditto. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto. * config/mips/mips.c (mips_call_tls_get_addr): Ditto. * cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * dce.c (deletable_insn_p): Allow non looping, non sibling, pure and const calls to be deleted. java: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (java_init_decl_processing): Change DECL_IS_PURE to DECL_PURE_P. cp: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY, DECL_LOOPING_CONST_OR_PURE_P attributes. * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to DECL_PURE_P. gfortran: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * trans-decl.c (gfc_get_extern_function_decl, build_function_decl): Rename DECL_IS_PURE to DECL_PURE_P. From-SVN: r135053
2008-05-07 22:48:07 +02:00
RTL_CONST_CALL_P (insn) = 1;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
use_reg (&CALL_INSN_FUNCTION_USAGE (insn), r16);
insn = get_insns ();
end_sequence ();
eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx),
UNSPEC_TLSLDM_CALL);
emit_libcall_block (insn, scratch, r0, eqv);
eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_DTPREL);
eqv = gen_rtx_CONST (Pmode, eqv);
if (alpha_tls_size == 64)
{
dest = gen_reg_rtx (Pmode);
emit_insn (gen_rtx_SET (VOIDmode, dest, eqv));
emit_insn (gen_adddi3 (dest, dest, scratch));
return dest;
}
if (alpha_tls_size == 32)
{
insn = gen_rtx_HIGH (Pmode, eqv);
insn = gen_rtx_PLUS (Pmode, scratch, insn);
scratch = gen_reg_rtx (Pmode);
emit_insn (gen_rtx_SET (VOIDmode, scratch, insn));
}
return gen_rtx_LO_SUM (Pmode, scratch, eqv);
case TLS_MODEL_INITIAL_EXEC:
eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_TPREL);
eqv = gen_rtx_CONST (Pmode, eqv);
tp = gen_reg_rtx (Pmode);
scratch = gen_reg_rtx (Pmode);
dest = gen_reg_rtx (Pmode);
emit_insn (gen_load_tp (tp));
emit_insn (gen_rtx_SET (VOIDmode, scratch, eqv));
emit_insn (gen_adddi3 (dest, tp, scratch));
return dest;
case TLS_MODEL_LOCAL_EXEC:
eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), UNSPEC_TPREL);
eqv = gen_rtx_CONST (Pmode, eqv);
tp = gen_reg_rtx (Pmode);
emit_insn (gen_load_tp (tp));
if (alpha_tls_size == 32)
{
insn = gen_rtx_HIGH (Pmode, eqv);
insn = gen_rtx_PLUS (Pmode, tp, insn);
tp = gen_reg_rtx (Pmode);
emit_insn (gen_rtx_SET (VOIDmode, tp, insn));
}
return gen_rtx_LO_SUM (Pmode, tp, eqv);
default:
gcc_unreachable ();
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
}
if (local_symbolic_operand (x, Pmode))
{
if (small_symbolic_operand (x, Pmode))
return x;
else
{
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (can_create_pseudo_p ())
scratch = gen_reg_rtx (Pmode);
emit_insn (gen_rtx_SET (VOIDmode, scratch,
gen_rtx_HIGH (Pmode, x)));
return gen_rtx_LO_SUM (Pmode, scratch, x);
}
}
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
}
return NULL;
split_addend:
{
HOST_WIDE_INT low, high;
low = ((addend & 0xffff) ^ 0x8000) - 0x8000;
addend -= low;
high = ((addend & 0xffffffff) ^ 0x80000000) - 0x80000000;
addend -= high;
if (addend)
x = expand_simple_binop (Pmode, PLUS, x, GEN_INT (addend),
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
(!can_create_pseudo_p () ? scratch : NULL_RTX),
1, OPTAB_LIB_WIDEN);
if (high)
x = expand_simple_binop (Pmode, PLUS, x, GEN_INT (high),
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
(!can_create_pseudo_p () ? scratch : NULL_RTX),
1, OPTAB_LIB_WIDEN);
return plus_constant (x, low);
}
}
tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. 2009-05-04 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete. * gcc/explow.c (memory_address): Use target hook. * gcc/targhooks.c (default_legitimize_address): New. * gcc/targhooks.h (default_legitimize_address): New. * gcc/target.h (legitimize_address): New. * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New. (TARGET_INITIALIZER): Include it. * gcc/system.h (LEGITIMIZE_ADDRESS): Poison. * config/bfin/bfin-protos.h (legitimize_address): Remove. * config/bfin/bfin.c (legitimize_address): Remove. * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove. * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390-protos.h (legitimize_address): Delete. * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete. * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete. * gcc/config/i386/i386-protos.h (legitimize_address): Delete. * gcc/config/avr/avr-protos.h (legitimize_address): Delete. * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete. * gcc/config/score/score-protos.h (score_legitimize_address): Delete. * gcc/config/arm/arm-protos.h (arm_legitimize_address, (thumb_legitimize_address): Delete. * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete. * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete. * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete. * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete. * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete. * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete. * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete. * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version. * config/m32c/m32c.c (m32c_legitimize_address): Standardize. * config/m32r/m32r.c (m32r_legitimize_address): New. * config/m68k/m68k.c (m68k_legitimize_address): New. * config/score/score.c (score_legitimize_address): Standardize. * config/score/score3.c (score3_legitimize_address): Standardize. * config/score/score3.h (score3_legitimize_address): Adjust. * config/score/score7.c (score7_legitimize_address): Standardize. * config/score/score7.h (score7_legitimize_address): Adjust. * config/sh/sh.c (sh_legitimize_address): New. * config/iq2000/iq2000.c (iq2000_legitimize_address): New. * gcc/config/s390/s390.c (legitimize_address): Rename to... (s390_legitimize_address): ... this. * gcc/config/sparc/sparc.c (legitimize_address): Rename to... (sparc_legitimize_address): ... this. * gcc/config/i386/i386.c (legitimize_address): Rename to... (ix86_legitimize_address): ... this. * gcc/config/avr/avr.c (legitimize_address): Rename to... (avr_legitimize_address): ... this. * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to... (mn10300_legitimize_address): ... this. * config/alpha/alpha.c (alpha_legitimize_address): Wrap... (alpha_legitimize_address_1): ... the old alpha_legitimize_address. (alpha_expand_mov): Adjust call. * config/frv/frv.c (frv_legitimize_address): Return x on failure. * config/spu/spu.c (spu_legitimize_address): Likewise. * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. From-SVN: r147098
2009-05-04 14:52:41 +02:00
/* Try machine-dependent ways of modifying an illegitimate address
to be legitimate. Return X or the new, valid address. */
static rtx
alpha_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
rtx new_x = alpha_legitimize_address_1 (x, NULL_RTX, mode);
return new_x ? new_x : x;
}
/* Primarily this is required for TLS symbols, but given that our move
patterns *ought* to be able to handle any symbol at any time, we
should never be spilling symbolic operands to the constant pool, ever. */
static bool
target.def (cannot_force_const_mem): Add a mode argument. gcc/ * target.def (cannot_force_const_mem): Add a mode argument. * doc/tm.texi.in (TARGET_CANNOT_FORCE_CONST_MEM): Update accordingly. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_false): Declare. * hooks.c (hook_bool_mode_const_rtx_false): Fix commentary. (hook_bool_mode_const_rtx_true): Likewise. (hook_bool_mode_rtx_false): New function. * reload.c (CONST_POOL_OK_P): Take a mode argument and require it to be non-VOID. Update call to cannot_force_const_mem. (find_reloads): Update accordingly. * varasm.c (force_const_mem): Update call to cannot_force_const_mem. * config/alpha/alpha.c (alpha_cannot_force_const_mem): Add a mode argument. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Likewise. * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Update call. * config/arm/arm.c (arm_cannot_force_const_mem): Add a mode argument. * config/bfin/bfin.c (bfin_cannot_force_const_mem): Likewise. * config/frv/frv.c (frv_cannot_force_const_mem): Likewise. * config/i386/i386.c (ix86_cannot_force_const_mem): Likewise. * config/ia64/ia64.c (ia64_cannot_force_const_mem): Likewise. * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (m68k_cannot_force_const_mem): ...this new function. * config/mips/mips.c (mips_cannot_force_const_mem): Add a mode argument. (mips_const_insns, mips_legitimize_const_move): Update calls. (mips_secondary_reload_class): Likewise. * config/pa/pa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (pa_cannot_force_const_mem): ...this new function. * config/rs6000/rs6000.c (TARGET_CANNOT_FORCE_CONST_MEM): Reefine to... (rs6000_cannot_force_const_mem): ...this new function. * config/s390/s390.c (s390_cannot_force_const_mem): Add a mode argument. * config/sparc/sparc.c (sparc_cannot_force_const_mem): Likewise. * config/xtensa/xtensa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (xtensa_cannot_force_const_mem): ...this new function. From-SVN: r172813
2011-04-21 11:37:44 +02:00
alpha_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
{
enum rtx_code code = GET_CODE (x);
return code == SYMBOL_REF || code == LABEL_REF || code == CONST;
}
/* We do not allow indirect calls to be optimized into sibling calls, nor
can we allow a call to a function with a different GP to be optimized
into a sibcall. */
static bool
alpha_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
{
/* Can't do indirect tail calls, since we don't know if the target
uses the same GP. */
if (!decl)
return false;
/* Otherwise, we can make a tail call if the target function shares
the same GP. */
return decl_has_samegp (decl);
}
int
some_small_symbolic_operand_int (rtx *px, void *data ATTRIBUTE_UNUSED)
{
rtx x = *px;
/* Don't re-split. */
if (GET_CODE (x) == LO_SUM)
return -1;
return small_symbolic_operand (x, Pmode) != 0;
}
static int
split_small_symbolic_operand_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
{
rtx x = *px;
/* Don't re-split. */
if (GET_CODE (x) == LO_SUM)
return -1;
if (small_symbolic_operand (x, Pmode))
{
x = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, x);
*px = x;
return -1;
}
return 0;
}
rtx
split_small_symbolic_operand (rtx x)
{
x = copy_insn (x);
for_each_rtx (&x, split_small_symbolic_operand_1, NULL);
return x;
}
/* Indicate that INSN cannot be duplicated. This is true for any insn
that we've marked with gpdisp relocs, since those have to stay in
1-1 correspondence with one another.
Technically we could copy them if we could set up a mapping from one
sequence number to another, across the set of insns to be duplicated.
This seems overly complicated and error-prone since interblock motion
from sched-ebb could move one of the pair of insns to a different block.
Also cannot allow jsr insns to be duplicated. If they throw exceptions,
then they'll be in a different block from their ldgp. Which could lead
the bb reorder code to think that it would be ok to copy just the block
containing the call and branch to the block containing the ldgp. */
static bool
alpha_cannot_copy_insn_p (rtx insn)
{
if (!reload_completed || !TARGET_EXPLICIT_RELOCS)
return false;
if (recog_memoized (insn) >= 0)
return get_attr_cannot_copy (insn);
else
return false;
}
/* Try a machine-dependent way of reloading an illegitimate address
operand. If we find one, push the reload and return the new rtx. */
rtx
alpha_legitimize_reload_address (rtx x,
enum machine_mode mode ATTRIBUTE_UNUSED,
int opnum, int type,
int ind_levels ATTRIBUTE_UNUSED)
{
/* We must recognize output that we have already generated ourselves. */
if (GET_CODE (x) == PLUS
&& GET_CODE (XEXP (x, 0)) == PLUS
&& REG_P (XEXP (XEXP (x, 0), 0))
&& CONST_INT_P (XEXP (XEXP (x, 0), 1))
&& CONST_INT_P (XEXP (x, 1)))
{
push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL,
BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
opnum, (enum reload_type) type);
return x;
}
/* We wish to handle large displacements off a base register by
splitting the addend across an ldah and the mem insn. This
cuts number of extra insns needed from 3 to 1. */
if (GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
&& REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER
&& REGNO_OK_FOR_BASE_P (REGNO (XEXP (x, 0)))
&& GET_CODE (XEXP (x, 1)) == CONST_INT)
{
HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000;
HOST_WIDE_INT high
= (((val - low) & 0xffffffff) ^ 0x80000000) - 0x80000000;
/* Check for 32-bit overflow. */
if (high + low != val)
return NULL_RTX;
/* Reload the high part into a base reg; leave the low part
in the mem directly. */
x = gen_rtx_PLUS (GET_MODE (x),
gen_rtx_PLUS (GET_MODE (x), XEXP (x, 0),
GEN_INT (high)),
GEN_INT (low));
push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL,
BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
opnum, (enum reload_type) type);
return x;
}
return NULL_RTX;
}
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
/* Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */
static bool
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
alpha_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
bool speed)
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
{
enum machine_mode mode = GET_MODE (x);
bool float_mode_p = FLOAT_MODE_P (mode);
const struct alpha_rtx_cost_data *cost_data;
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
if (!speed)
cost_data = &alpha_rtx_cost_size;
else
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
cost_data = &alpha_rtx_cost_data[alpha_tune];
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
switch (code)
{
case CONST_INT:
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
/* If this is an 8-bit constant, return zero since it can be used
nearly anywhere with no cost. If it is a valid operand for an
ADD or AND, likewise return 0 if we know it will be used in that
context. Otherwise, return 2 since it might be used there later.
All other constants take at least two insns. */
if (INTVAL (x) >= 0 && INTVAL (x) < 256)
{
*total = 0;
return true;
}
/* FALLTHRU */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
case CONST_DOUBLE:
if (x == CONST0_RTX (mode))
*total = 0;
else if ((outer_code == PLUS && add_operand (x, VOIDmode))
|| (outer_code == AND && and_operand (x, VOIDmode)))
*total = 0;
else if (add_operand (x, VOIDmode) || and_operand (x, VOIDmode))
*total = 2;
else
*total = COSTS_N_INSNS (2);
return true;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
case CONST:
case SYMBOL_REF:
case LABEL_REF:
if (TARGET_EXPLICIT_RELOCS && small_symbolic_operand (x, VOIDmode))
*total = COSTS_N_INSNS (outer_code != MEM);
else if (TARGET_EXPLICIT_RELOCS && local_symbolic_operand (x, VOIDmode))
*total = COSTS_N_INSNS (1 + (outer_code != MEM));
else if (tls_symbolic_operand_type (x))
/* Estimate of cost for call_pal rduniq. */
/* ??? How many insns do we emit here? More than one... */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
*total = COSTS_N_INSNS (15);
else
/* Otherwise we do a load from the GOT. */
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
*total = COSTS_N_INSNS (!speed ? 1 : alpha_memory_latency);
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return true;
case HIGH:
/* This is effectively an add_operand. */
*total = 2;
return true;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
case PLUS:
case MINUS:
if (float_mode_p)
*total = cost_data->fp_add;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
else if (GET_CODE (XEXP (x, 0)) == MULT
&& const48_operand (XEXP (XEXP (x, 0), 1), VOIDmode))
{
*total = (rtx_cost (XEXP (XEXP (x, 0), 0),
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
(enum rtx_code) outer_code, opno, speed)
+ rtx_cost (XEXP (x, 1),
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
(enum rtx_code) outer_code, opno, speed)
+ COSTS_N_INSNS (1));
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return true;
}
return false;
case MULT:
if (float_mode_p)
*total = cost_data->fp_mult;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
else if (mode == DImode)
*total = cost_data->int_mult_di;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
else
*total = cost_data->int_mult_si;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return false;
case ASHIFT:
if (CONST_INT_P (XEXP (x, 1))
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
&& INTVAL (XEXP (x, 1)) <= 3)
{
*total = COSTS_N_INSNS (1);
return false;
}
/* FALLTHRU */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
case ASHIFTRT:
case LSHIFTRT:
*total = cost_data->int_shift;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return false;
case IF_THEN_ELSE:
if (float_mode_p)
*total = cost_data->fp_add;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
else
*total = cost_data->int_cmov;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return false;
case DIV:
case UDIV:
case MOD:
case UMOD:
if (!float_mode_p)
*total = cost_data->int_div;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
else if (mode == SFmode)
*total = cost_data->fp_div_sf;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
else
*total = cost_data->fp_div_df;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return false;
case MEM:
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
*total = COSTS_N_INSNS (!speed ? 1 : alpha_memory_latency);
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return true;
case NEG:
if (! float_mode_p)
{
*total = COSTS_N_INSNS (1);
return false;
}
/* FALLTHRU */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
case ABS:
if (! float_mode_p)
{
*total = COSTS_N_INSNS (1) + cost_data->int_cmov;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return false;
}
/* FALLTHRU */
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
case FLOAT:
case UNSIGNED_FLOAT:
case FIX:
case UNSIGNED_FIX:
case FLOAT_TRUNCATE:
*total = cost_data->fp_add;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
return false;
case FLOAT_EXTEND:
if (MEM_P (XEXP (x, 0)))
*total = 0;
else
*total = cost_data->fp_add;
return false;
Makefile.in (cse.o): Depend on TARGET_H. * Makefile.in (cse.o): Depend on TARGET_H. * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. From-SVN: r61954
2003-01-28 05:46:33 +01:00
default:
return false;
}
}
1992-10-26 22:01:33 +01:00
/* REF is an alignable memory location. Place an aligned SImode
reference into *PALIGNED_MEM and the number of bits to shift into
*PBITNUM. SCRATCH is a free register for use in reloading out
of range stack slots. */
1992-10-26 22:01:33 +01:00
void
get_aligned_mem (rtx ref, rtx *paligned_mem, rtx *pbitnum)
1992-10-26 22:01:33 +01:00
{
rtx base;
HOST_WIDE_INT disp, offset;
1992-10-26 22:01:33 +01:00
gcc_assert (MEM_P (ref));
1992-10-26 22:01:33 +01:00
if (reload_in_progress
&& ! memory_address_p (GET_MODE (ref), XEXP (ref, 0)))
{
base = find_replacement (&XEXP (ref, 0));
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (memory_address_p (GET_MODE (ref), base));
}
1992-10-26 22:01:33 +01:00
else
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
base = XEXP (ref, 0);
1992-10-26 22:01:33 +01:00
if (GET_CODE (base) == PLUS)
disp = INTVAL (XEXP (base, 1)), base = XEXP (base, 0);
else
disp = 0;
/* Find the byte offset within an aligned word. If the memory itself is
claimed to be aligned, believe it. Otherwise, aligned_memory_operand
will have examined the base register and determined it is aligned, and
thus displacements from it are naturally alignable. */
if (MEM_ALIGN (ref) >= 32)
offset = 0;
else
offset = disp & 3;
1992-10-26 22:01:33 +01:00
/* The location should not cross aligned word boundary. */
gcc_assert (offset + GET_MODE_SIZE (GET_MODE (ref))
<= GET_MODE_SIZE (SImode));
/* Access the entire aligned word. */
*paligned_mem = widen_memory_access (ref, SImode, -offset);
1992-10-26 22:01:33 +01:00
/* Convert the byte offset within the word to a bit offset. */
offset *= BITS_PER_UNIT;
*pbitnum = GEN_INT (offset);
1992-10-26 22:01:33 +01:00
}
/* Similar, but just get the address. Handle the two reload cases.
Add EXTRA_OFFSET to the address we return. */
1992-10-26 22:01:33 +01:00
rtx
get_unaligned_address (rtx ref)
1992-10-26 22:01:33 +01:00
{
rtx base;
HOST_WIDE_INT offset = 0;
gcc_assert (MEM_P (ref));
1992-10-26 22:01:33 +01:00
if (reload_in_progress
&& ! memory_address_p (GET_MODE (ref), XEXP (ref, 0)))
{
base = find_replacement (&XEXP (ref, 0));
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (memory_address_p (GET_MODE (ref), base));
}
1992-10-26 22:01:33 +01:00
else
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
base = XEXP (ref, 0);
1992-10-26 22:01:33 +01:00
if (GET_CODE (base) == PLUS)
offset += INTVAL (XEXP (base, 1)), base = XEXP (base, 0);
return plus_constant (base, offset);
}
/* Compute a value X, such that X & 7 == (ADDR + OFS) & 7.
X is always returned in a register. */
rtx
get_unaligned_offset (rtx addr, HOST_WIDE_INT ofs)
{
if (GET_CODE (addr) == PLUS)
{
ofs += INTVAL (XEXP (addr, 1));
addr = XEXP (addr, 0);
}
return expand_simple_binop (Pmode, PLUS, addr, GEN_INT (ofs & 7),
NULL_RTX, 1, OPTAB_LIB_WIDEN);
1992-10-26 22:01:33 +01:00
}
/* On the Alpha, all (non-symbolic) constants except zero go into
a floating-point register via memory. Note that we cannot
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return anything that is not a subset of RCLASS, and that some
symbolic constants cannot be dropped to memory. */
enum reg_class
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
alpha_preferred_reload_class(rtx x, enum reg_class rclass)
{
/* Zero is present in any register class. */
if (x == CONST0_RTX (GET_MODE (x)))
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return rclass;
/* These sorts of constants we can easily drop to memory. */
if (CONST_INT_P (x)
|| GET_CODE (x) == CONST_DOUBLE
|| GET_CODE (x) == CONST_VECTOR)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
if (rclass == FLOAT_REGS)
return NO_REGS;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
if (rclass == ALL_REGS)
return GENERAL_REGS;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return rclass;
}
/* All other kinds of constants should not (and in the case of HIGH
cannot) be dropped to memory -- instead we use a GENERAL_REGS
secondary reload. */
if (CONSTANT_P (x))
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return (rclass == ALL_REGS ? GENERAL_REGS : rclass);
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return rclass;
}
/* Inform reload about cases where moving X with a mode MODE to a register in
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
RCLASS requires an extra scratch or immediate register. Return the class
needed for the immediate register. */
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
static reg_class_t
alpha_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
enum machine_mode mode, secondary_reload_info *sri)
{
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
enum reg_class rclass = (enum reg_class) rclass_i;
/* Loading and storing HImode or QImode values to and from memory
usually requires a scratch register. */
if (!TARGET_BWX && (mode == QImode || mode == HImode || mode == CQImode))
{
if (any_memory_operand (x, mode))
{
if (in_p)
{
if (!aligned_memory_operand (x, mode))
gcc/ * optabs.h (reload_in_optab, reload_out_optab, code_to_optab) (vcond_gen_code, vcondu_gen_code, movmem_optab, setmem_optab) (cmpstr_optab, cmpstrn_optab, cmpmem_optab, sync_add_optab) (sync_sub_optab, sync_ior_optab, sync_and_optab, sync_xor_optab) (sync_nand_optab, sync_old_add_optab, sync_old_sub_optab) (sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab) (sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab) (sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab) (sync_new_nand_optab): Redefine as macros. (sync_compare_and_swap, sync_lock_test_and_set, sync_lock_release): Delete. (direct_optab_index): New enum. (direct_optab_d): New structure. (direct_optab): New typedef. (direct_optab_table): Declare. (direct_optab_handler, set_direct_optab_handler): New functions. (sync_compare_and_swap_optab, sync_lock_test_and_set_optab) (sync_lock_release_optab): New macros. * optabs.c (direct_optab_table): New variable. (movcc_gen_code, vcond_gen_code, vcondu_gen_code): Delete. (prepare_cmp_insn): Use direct_optab_handler for cmpmem_optab, cmpstr_optab and cmpstrn_optab. (emit_conditional_move): Likewise for movcc_optab. (can_conditionally_move_p): Likewise for movcc_gen_code. (init_insn_codes): Clear direct_optab_table. (init_optabs): Don't initialize the new "direct optabs" here. (get_vcond_icode): Use direct_optab_handler for vcondu_gen_code and vcond_gen_code. (expand_val_compare_and_swap): Likewise sync_compare_and_swap_optab. (expand_bool_compare_and_swap): Likewise sync_compare_and_swap_optab. (expand_compare_and_swap_loop): Likewise sync_compare_and_swap_optab. (expand_sync_operation): Likewise other sync_*_optabs. (expand_sync_fetch_operation): Likewise. Rename sync_compare_and_swap to sync_compare_and_swap_optab. (expand_sync_lock_test_and_set): Use direct_optab_handler for sync_lock_test_and_set and sync_compare_and_swap, adding "_optab" to the names of both. * builtins.c (expand_builtin_strcmp): Use direct_optab_handler for cmpstr_optab and cmpstrn_optab. (expand_builtin_lock_release): Likewise sync_lock_release. * expr.c (movmem_optab, setmem_optab, cmpstr_optab, cmpstrn_optab) (cmpmem_optab, sync_add_optab, sync_sub_optab, sync_ior_optab) (sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab) (sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab) (sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab) (sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab) (sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap) (sync_lock_test_and_set, sync_lock_release): Delete. (emit_block_move_via_movmem): Use direct_optab_handler for movmem_optab. (emit_block_move_via_setmem): Use direct_optab_handler for setmem_optab. * genopinit.c (optabs): Use set_direct_optab_handler for the new macro optabs. * omp-low.c (expand_omp_atomic_fetch_op): Update the type of the "optab" local variable. Use direct_optab_handler for optab and sync_compare_and_swap_optab. * reload1.c (reload_in_optab, reload_out_optab): Delete. * targhooks.c (default_secondary_reload): Use direct_optab_handler for reload_in_optab and reload_out_optab. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_alloc_temp_reg): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * java/builtins.c (compareAndSwapInt_builtin): Use direct_optab_handler for sync_compare_and_swap, renaming it to sync_compare_and_swap_optab. (compareAndSwapLong_builtin, compareAndSwapObject_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. From-SVN: r161810
2010-07-05 00:14:56 +02:00
sri->icode = direct_optab_handler (reload_in_optab, mode);
}
else
gcc/ * optabs.h (reload_in_optab, reload_out_optab, code_to_optab) (vcond_gen_code, vcondu_gen_code, movmem_optab, setmem_optab) (cmpstr_optab, cmpstrn_optab, cmpmem_optab, sync_add_optab) (sync_sub_optab, sync_ior_optab, sync_and_optab, sync_xor_optab) (sync_nand_optab, sync_old_add_optab, sync_old_sub_optab) (sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab) (sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab) (sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab) (sync_new_nand_optab): Redefine as macros. (sync_compare_and_swap, sync_lock_test_and_set, sync_lock_release): Delete. (direct_optab_index): New enum. (direct_optab_d): New structure. (direct_optab): New typedef. (direct_optab_table): Declare. (direct_optab_handler, set_direct_optab_handler): New functions. (sync_compare_and_swap_optab, sync_lock_test_and_set_optab) (sync_lock_release_optab): New macros. * optabs.c (direct_optab_table): New variable. (movcc_gen_code, vcond_gen_code, vcondu_gen_code): Delete. (prepare_cmp_insn): Use direct_optab_handler for cmpmem_optab, cmpstr_optab and cmpstrn_optab. (emit_conditional_move): Likewise for movcc_optab. (can_conditionally_move_p): Likewise for movcc_gen_code. (init_insn_codes): Clear direct_optab_table. (init_optabs): Don't initialize the new "direct optabs" here. (get_vcond_icode): Use direct_optab_handler for vcondu_gen_code and vcond_gen_code. (expand_val_compare_and_swap): Likewise sync_compare_and_swap_optab. (expand_bool_compare_and_swap): Likewise sync_compare_and_swap_optab. (expand_compare_and_swap_loop): Likewise sync_compare_and_swap_optab. (expand_sync_operation): Likewise other sync_*_optabs. (expand_sync_fetch_operation): Likewise. Rename sync_compare_and_swap to sync_compare_and_swap_optab. (expand_sync_lock_test_and_set): Use direct_optab_handler for sync_lock_test_and_set and sync_compare_and_swap, adding "_optab" to the names of both. * builtins.c (expand_builtin_strcmp): Use direct_optab_handler for cmpstr_optab and cmpstrn_optab. (expand_builtin_lock_release): Likewise sync_lock_release. * expr.c (movmem_optab, setmem_optab, cmpstr_optab, cmpstrn_optab) (cmpmem_optab, sync_add_optab, sync_sub_optab, sync_ior_optab) (sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab) (sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab) (sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab) (sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab) (sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap) (sync_lock_test_and_set, sync_lock_release): Delete. (emit_block_move_via_movmem): Use direct_optab_handler for movmem_optab. (emit_block_move_via_setmem): Use direct_optab_handler for setmem_optab. * genopinit.c (optabs): Use set_direct_optab_handler for the new macro optabs. * omp-low.c (expand_omp_atomic_fetch_op): Update the type of the "optab" local variable. Use direct_optab_handler for optab and sync_compare_and_swap_optab. * reload1.c (reload_in_optab, reload_out_optab): Delete. * targhooks.c (default_secondary_reload): Use direct_optab_handler for reload_in_optab and reload_out_optab. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_alloc_temp_reg): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * java/builtins.c (compareAndSwapInt_builtin): Use direct_optab_handler for sync_compare_and_swap, renaming it to sync_compare_and_swap_optab. (compareAndSwapLong_builtin, compareAndSwapObject_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. From-SVN: r161810
2010-07-05 00:14:56 +02:00
sri->icode = direct_optab_handler (reload_out_optab, mode);
return NO_REGS;
}
}
/* We also cannot do integral arithmetic into FP regs, as might result
from register elimination into a DImode fp register. */
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
if (rclass == FLOAT_REGS)
{
if (MEM_P (x) && GET_CODE (XEXP (x, 0)) == AND)
return GENERAL_REGS;
if (in_p && INTEGRAL_MODE_P (mode)
&& !MEM_P (x) && !REG_P (x) && !CONST_INT_P (x))
return GENERAL_REGS;
}
return NO_REGS;
}
1992-10-26 22:01:33 +01:00
/* Subfunction of the following function. Update the flags of any MEM
found in part of X. */
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
static int
alpha_set_memflags_1 (rtx *xp, void *data)
1992-10-26 22:01:33 +01:00
{
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
rtx x = *xp, orig = (rtx) data;
1992-10-26 22:01:33 +01:00
if (!MEM_P (x))
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
return 0;
1992-10-26 22:01:33 +01:00
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
MEM_VOLATILE_P (x) = MEM_VOLATILE_P (orig);
MEM_NOTRAP_P (x) = MEM_NOTRAP_P (orig);
MEM_READONLY_P (x) = MEM_READONLY_P (orig);
1992-10-26 22:01:33 +01:00
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
/* Sadly, we cannot use alias sets because the extra aliasing
produced by the AND interferes. Given that two-byte quantities
are the only thing we would be able to differentiate anyway,
there does not seem to be any point in convoluting the early
out of the alias check. */
bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r17158
1997-12-20 12:31:54 +01:00
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
return -1;
1992-10-26 22:01:33 +01:00
}
/* Given SEQ, which is an INSN list, look for any MEMs in either
Delete SEQUENCE rtl usage outside of reorg and ssa passes. 2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-11 14:22:48 +02:00
a SET_DEST or a SET_SRC and copy the in-struct, unchanging, and
volatile flags from REF into each of the MEMs found. If REF is not
a MEM, don't do anything. */
1992-10-26 22:01:33 +01:00
void
alpha_set_memflags (rtx seq, rtx ref)
1992-10-26 22:01:33 +01:00
{
rtx insn;
if (!MEM_P (ref))
1992-10-26 22:01:33 +01:00
return;
/* This is only called from alpha.md, after having had something
generated from one of the insn patterns. So if everything is
zero, the pattern is already up-to-date. */
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
if (!MEM_VOLATILE_P (ref)
&& !MEM_NOTRAP_P (ref)
&& !MEM_READONLY_P (ref))
return;
for (insn = seq; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn))
for_each_rtx (&PATTERN (insn), alpha_set_memflags_1, (void *) ref);
else
gcc_unreachable ();
1992-10-26 22:01:33 +01:00
}
static rtx alpha_emit_set_const (rtx, enum machine_mode, HOST_WIDE_INT,
int, bool);
/* Internal routine for alpha_emit_set_const to check for N or below insns.
If NO_OUTPUT is true, then we only check to see if N insns are possible,
and return pc_rtx if successful. */
static rtx
alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
HOST_WIDE_INT c, int n, bool no_output)
1992-10-26 22:01:33 +01:00
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
HOST_WIDE_INT new_const;
1992-10-26 22:01:33 +01:00
int i, bits;
/* Use a pseudo if highly optimizing and still generating RTL. */
rtx subtarget
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
= (flag_expensive_optimizations && can_create_pseudo_p () ? 0 : target);
rtx temp, insn;
1992-10-26 22:01:33 +01:00
/* If this is a sign-extended 32-bit constant, we can do this in at most
three insns, so do it if we have enough insns left. We always have
a sign-extended 32-bit constant when compiling on a narrow machine. */
1992-10-26 22:01:33 +01:00
if (HOST_BITS_PER_WIDE_INT != 64
|| c >> 31 == -1 || c >> 31 == 0)
1992-10-26 22:01:33 +01:00
{
HOST_WIDE_INT low = ((c & 0xffff) ^ 0x8000) - 0x8000;
1992-10-26 22:01:33 +01:00
HOST_WIDE_INT tmp1 = c - low;
HOST_WIDE_INT high = (((tmp1 >> 16) & 0xffff) ^ 0x8000) - 0x8000;
1992-10-26 22:01:33 +01:00
HOST_WIDE_INT extra = 0;
/* If HIGH will be interpreted as negative but the constant is
positive, we must adjust it to do two ldha insns. */
if ((high & 0x8000) != 0 && c >= 0)
1992-10-26 22:01:33 +01:00
{
extra = 0x4000;
tmp1 -= 0x40000000;
high = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000);
}
if (c == low || (low == 0 && extra == 0))
{
/* We used to use copy_to_suggested_reg (GEN_INT (c), target, mode)
but that meant that we can't handle INT_MIN on 32-bit machines
(like NT/Alpha), because we recurse indefinitely through
emit_move_insn to gen_movdi. So instead, since we know exactly
what we want, create it explicitly. */
if (no_output)
return pc_rtx;
if (target == NULL)
target = gen_reg_rtx (mode);
emit_insn (gen_rtx_SET (VOIDmode, target, GEN_INT (c)));
return target;
}
else if (n >= 2 + (extra != 0))
1992-10-26 22:01:33 +01:00
{
if (no_output)
return pc_rtx;
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (!can_create_pseudo_p ())
{
emit_insn (gen_rtx_SET (VOIDmode, target, GEN_INT (high << 16)));
temp = target;
}
else
temp = copy_to_suggested_reg (GEN_INT (high << 16),
subtarget, mode);
/* As of 2002-02-23, addsi3 is only available when not optimizing.
This means that if we go through expand_binop, we'll try to
generate extensions, etc, which will require new pseudos, which
will fail during some split phases. The SImode add patterns
still exist, but are not named. So build the insns by hand. */
1992-10-26 22:01:33 +01:00
if (extra != 0)
{
if (! subtarget)
subtarget = gen_reg_rtx (mode);
insn = gen_rtx_PLUS (mode, temp, GEN_INT (extra << 16));
insn = gen_rtx_SET (VOIDmode, subtarget, insn);
emit_insn (insn);
temp = subtarget;
}
1992-10-26 22:01:33 +01:00
if (target == NULL)
target = gen_reg_rtx (mode);
insn = gen_rtx_PLUS (mode, temp, GEN_INT (low));
insn = gen_rtx_SET (VOIDmode, target, insn);
emit_insn (insn);
return target;
1992-10-26 22:01:33 +01:00
}
}
/* If we couldn't do it that way, try some other methods. But if we have
no instructions left, don't bother. Likewise, if this is SImode and
we can't make pseudos, we can't do anything since the expand_binop
and expand_unop calls will widen and try to make pseudos. */
1992-10-26 22:01:33 +01:00
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (n == 1 || (mode == SImode && !can_create_pseudo_p ()))
1992-10-26 22:01:33 +01:00
return 0;
/* Next, see if we can load a related constant and then shift and possibly
1992-10-26 22:01:33 +01:00
negate it to get the constant we want. Try this once each increasing
numbers of insns. */
for (i = 1; i < n; i++)
{
/* First, see if minus some low bits, we've an easy load of
high bits. */
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = ((c & 0xffff) ^ 0x8000) - 0x8000;
if (new_const != 0)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
temp = alpha_emit_set_const (subtarget, mode, c - new_const, i, no_output);
if (temp)
{
if (no_output)
return temp;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return expand_binop (mode, add_optab, temp, GEN_INT (new_const),
target, 0, OPTAB_WIDEN);
}
}
/* Next try complementing. */
temp = alpha_emit_set_const (subtarget, mode, ~c, i, no_output);
if (temp)
{
if (no_output)
return temp;
return expand_unop (mode, one_cmpl_optab, temp, target, 0);
}
1992-10-26 22:01:33 +01:00
/* Next try to form a constant and do a left shift. We can do this
1992-10-26 22:01:33 +01:00
if some low-order bits are zero; the exact_log2 call below tells
us that information. The bits we are shifting out could be any
value, but here we'll just try the 0- and sign-extended forms of
the constant. To try to increase the chance of having the same
constant in more than one insn, start at the highest number of
bits to shift, but try all possibilities in case a ZAPNOT will
be useful. */
bits = exact_log2 (c & -c);
if (bits > 0)
1992-10-26 22:01:33 +01:00
for (; bits > 0; bits--)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = c >> bits;
temp = alpha_emit_set_const (subtarget, mode, new_const, i, no_output);
if (!temp && c < 0)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = (unsigned HOST_WIDE_INT)c >> bits;
temp = alpha_emit_set_const (subtarget, mode, new_const,
i, no_output);
}
if (temp)
{
if (no_output)
return temp;
return expand_binop (mode, ashl_optab, temp, GEN_INT (bits),
target, 0, OPTAB_WIDEN);
}
}
1992-10-26 22:01:33 +01:00
/* Now try high-order zero bits. Here we try the shifted-in bits as
all zero and all ones. Be careful to avoid shifting outside the
mode and to avoid shifting outside the host wide int size. */
/* On narrow hosts, don't shift a 1 into the high bit, since we'll
confuse the recursive call and set all of the high 32 bits. */
1992-10-26 22:01:33 +01:00
bits = (MIN (HOST_BITS_PER_WIDE_INT, GET_MODE_SIZE (mode) * 8)
- floor_log2 (c) - 1 - (HOST_BITS_PER_WIDE_INT < 64));
if (bits > 0)
1992-10-26 22:01:33 +01:00
for (; bits > 0; bits--)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = c << bits;
temp = alpha_emit_set_const (subtarget, mode, new_const, i, no_output);
if (!temp)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = (c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1);
temp = alpha_emit_set_const (subtarget, mode, new_const,
i, no_output);
}
if (temp)
{
if (no_output)
return temp;
return expand_binop (mode, lshr_optab, temp, GEN_INT (bits),
target, 1, OPTAB_WIDEN);
}
}
1992-10-26 22:01:33 +01:00
/* Now try high-order 1 bits. We get that with a sign-extension.
But one bit isn't enough here. Be careful to avoid shifting outside
the mode and to avoid shifting outside the host wide int size. */
2001-09-11 10:52:39 +02:00
bits = (MIN (HOST_BITS_PER_WIDE_INT, GET_MODE_SIZE (mode) * 8)
- floor_log2 (~ c) - 2);
if (bits > 0)
1992-10-26 22:01:33 +01:00
for (; bits > 0; bits--)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = c << bits;
temp = alpha_emit_set_const (subtarget, mode, new_const, i, no_output);
if (!temp)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = (c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1);
temp = alpha_emit_set_const (subtarget, mode, new_const,
i, no_output);
}
if (temp)
{
if (no_output)
return temp;
return expand_binop (mode, ashr_optab, temp, GEN_INT (bits),
target, 0, OPTAB_WIDEN);
}
}
1992-10-26 22:01:33 +01:00
}
#if HOST_BITS_PER_WIDE_INT == 64
/* Finally, see if can load a value into the target that is the same as the
constant except that all bytes that are 0 are changed to be 0xff. If we
can, then we can do a ZAPNOT to obtain the desired constant. */
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = c;
for (i = 0; i < 64; i += 8)
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
if ((new_const & ((HOST_WIDE_INT) 0xff << i)) == 0)
new_const |= (HOST_WIDE_INT) 0xff << i;
/* We are only called for SImode and DImode. If this is SImode, ensure that
we are sign extended to a full word. */
if (mode == SImode)
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
new_const = ((new_const & 0xffffffff) ^ 0x80000000) - 0x80000000;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
if (new_const != c)
{
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
temp = alpha_emit_set_const (subtarget, mode, new_const, n - 1, no_output);
if (temp)
{
if (no_output)
return temp;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
return expand_binop (mode, and_optab, temp, GEN_INT (c | ~ new_const),
target, 0, OPTAB_WIDEN);
}
}
#endif
1992-10-26 22:01:33 +01:00
return 0;
}
/* Try to output insns to set TARGET equal to the constant C if it can be
done in less than N insns. Do all computations in MODE. Returns the place
where the output has been placed if it can be done and the insns have been
emitted. If it would take more than N insns, zero is returned and no
insns and emitted. */
static rtx
alpha_emit_set_const (rtx target, enum machine_mode mode,
HOST_WIDE_INT c, int n, bool no_output)
{
enum machine_mode orig_mode = mode;
rtx orig_target = target;
rtx result = 0;
int i;
/* If we can't make any pseudos, TARGET is an SImode hard register, we
can't load this constant in one insn, do this in DImode. */
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (!can_create_pseudo_p () && mode == SImode
&& REG_P (target) && REGNO (target) < FIRST_PSEUDO_REGISTER)
{
result = alpha_emit_set_const_1 (target, mode, c, 1, no_output);
if (result)
return result;
target = no_output ? NULL : gen_lowpart (DImode, target);
mode = DImode;
}
else if (mode == V8QImode || mode == V4HImode || mode == V2SImode)
{
target = no_output ? NULL : gen_lowpart (DImode, target);
mode = DImode;
}
/* Try 1 insn, then 2, then up to N. */
for (i = 1; i <= n; i++)
{
result = alpha_emit_set_const_1 (target, mode, c, i, no_output);
if (result)
{
rtx insn, set;
if (no_output)
return result;
insn = get_last_insn ();
set = single_set (insn);
if (! CONSTANT_P (SET_SRC (set)))
set_unique_reg_note (get_last_insn (), REG_EQUAL, GEN_INT (c));
break;
}
}
/* Allow for the case where we changed the mode of TARGET. */
if (result)
{
if (result == target)
result = orig_target;
else if (mode != orig_mode)
result = gen_lowpart (orig_mode, result);
}
return result;
}
/* Having failed to find a 3 insn sequence in alpha_emit_set_const,
fall back to a straight forward decomposition. We do this to avoid
exponential run times encountered when looking for longer sequences
with alpha_emit_set_const. */
static rtx
alpha_emit_set_long_const (rtx target, HOST_WIDE_INT c1, HOST_WIDE_INT c2)
{
HOST_WIDE_INT d1, d2, d3, d4;
/* Decompose the entire word */
#if HOST_BITS_PER_WIDE_INT >= 64
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (c2 == -(c1 < 0));
d1 = ((c1 & 0xffff) ^ 0x8000) - 0x8000;
c1 -= d1;
d2 = ((c1 & 0xffffffff) ^ 0x80000000) - 0x80000000;
c1 = (c1 - d2) >> 32;
d3 = ((c1 & 0xffff) ^ 0x8000) - 0x8000;
c1 -= d3;
d4 = ((c1 & 0xffffffff) ^ 0x80000000) - 0x80000000;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (c1 == d4);
#else
d1 = ((c1 & 0xffff) ^ 0x8000) - 0x8000;
c1 -= d1;
d2 = ((c1 & 0xffffffff) ^ 0x80000000) - 0x80000000;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (c1 == d2);
c2 += (d2 < 0);
d3 = ((c2 & 0xffff) ^ 0x8000) - 0x8000;
c2 -= d3;
d4 = ((c2 & 0xffffffff) ^ 0x80000000) - 0x80000000;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (c2 == d4);
#endif
/* Construct the high word */
if (d4)
{
emit_move_insn (target, GEN_INT (d4));
if (d3)
emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT (d3)));
}
else
emit_move_insn (target, GEN_INT (d3));
/* Shift it into place */
emit_move_insn (target, gen_rtx_ASHIFT (DImode, target, GEN_INT (32)));
/* Add in the low bits. */
if (d2)
emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT (d2)));
if (d1)
emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT (d1)));
return target;
}
/* Given an integral CONST_INT, CONST_DOUBLE, or CONST_VECTOR, return
the low 64 bits. */
static void
alpha_extract_integer (rtx x, HOST_WIDE_INT *p0, HOST_WIDE_INT *p1)
{
HOST_WIDE_INT i0, i1;
if (GET_CODE (x) == CONST_VECTOR)
x = simplify_subreg (DImode, x, GET_MODE (x), 0);
if (CONST_INT_P (x))
{
i0 = INTVAL (x);
i1 = -(i0 < 0);
}
else if (HOST_BITS_PER_WIDE_INT >= 64)
{
i0 = CONST_DOUBLE_LOW (x);
i1 = -(i0 < 0);
}
else
{
i0 = CONST_DOUBLE_LOW (x);
i1 = CONST_DOUBLE_HIGH (x);
}
*p0 = i0;
*p1 = i1;
}
target.def (legitimate_constant_p): New hook. gcc/ * target.def (legitimate_constant_p): New hook. * doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with... (TARGET_LEGITIMATE_CONSTANT_P): ...this. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_true): Declare. * hooks.c (hook_bool_mode_rtx_true): Define. * system.h (LEGITIMATE_CONSTANT_P): Poison. * calls.c (precompute_register_parameters): Replace uses of LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p. (emit_library_call_value_1): Likewise. * expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn) (compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise. * ira-costs.c (scan_one_insn): Likewise. * recog.c (general_operand, immediate_operand): Likewise. * reload.c (find_reloads_toplev, find_reloads_address_part): Likewise. * reload1.c (init_eliminable_invariants): Likewise. * config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a mode argument. * config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete. * config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/alpha/predicates.md (input_operand): Update call to alpha_legitimate_constant_p. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete. * config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise. (THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise. * config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (arm_legitimate_constant_p_1, thumb_legitimate_constant_p) (arm_legitimate_constant_p): New functions. (arm_cannot_force_const_mem): Make static. * config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete. * config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p instead of bfin_legitimate_constant_p. (bfin_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete. * config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_constant_p): Delete. * config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (frv_legitimate_constant_p): Make static. Add a mode argument. * config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete. * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise. * config/i386/i386-protos.h (legitimate_constant_p): Delete. * config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise. * config/i386/i386.c (legitimate_constant_p): Rename to... (ix86_legitimate_constant_p): ...this. Make static. Add a mode argument. (ix86_cannot_force_const_mem): Update accordingly. (ix86_legitimate_address_p): Likewise. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/i386/i386.md: Update commentary. * config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete. * config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise. * config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (ia64_legitimate_constant_p): Make static. Add a mode argument. * config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete. * config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete. * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise. * config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (lm32_legitimate_constant_p): Make static. Add a mode argument. * config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete. * config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise. * config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise. * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete. * config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (m32r_legitimate_constant_p): New function. * config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare. * config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of LEGITIMATE_CONSTANT_P. (LEGITIMATE_CONSTANT_P): Delete. * config/m68k/m68k.c (m68k_expand_prologue): Call m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P. (m68k_legitimate_constant_p): New function. * config/m68k/m68k.md: Update comments. * config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete. * config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mcore_legitimate_constant_p): New function. * config/mep/mep-protos.h (mep_legitimate_constant_p): Delete. * config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mep/mep.c (mep_legitimate_constant_p): Make static. Add a mode argument. (mep_legitimate_address): Update accordingly. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/microblaze/microblaze-protos.h (microblaze_const_double_ok): Delete. * config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise. * config/microblaze/microblaze.c (microblaze_const_double_ok): Make static. Check OP's mode for VOIDmode. (microblaze_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete. * config/mips/mips.c (mips_legitimate_constant_p): New function. (mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/predicates.md: Update comments. * config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete. * config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mmix_legitimate_constant_p): Make static, return a bool, and take a mode argument. (mmix_print_operand_address): Update accordingly. * config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p): Delete. * config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mn10300/mn10300.c (mn10300_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pa_legitimate_constant_p): New function. * config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pdp11_legitimate_constant_p): New function. * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (rs6000_legitimate_constant_p): New function. * config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. * config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete. * config/rx/rx.c (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/rx/rx.md (mov<register_modes:mode>): Update accordingly. * config/s390/s390-protos.h (legitimate_constant_p): Delete. * config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise. * config/s390/s390.c (legitimate_constant_p): Rename to... (s390_legitimate_constant_p): ...this. Make static, return a bool, and add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/score/score.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (sh_legitimate_constant_p): New function. * config/sparc/sparc-protos.h (legitimate_constant_p): Delete. * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete. * config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (legitimate_constant_p): Rename to... (sparc_legitimate_constant_p): ...this. Make static. Add a mode argument. (constant_address_p): Update accordingly. * config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode argument and return a bool. * config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete. * config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (spu_legitimate_constant_p): Add a mode argument and return a bool. (spu_rtx_costs): Update accordingly. * config/spu/predicates.md (vec_imm_operand): Likewise. * config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.c (v850_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/vax/vax-protos.h (legitimate_constant_p): Delete. * config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise. * config/vax/vax.c (legitimate_constant_p): Likewise. * config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete. * config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (xtensa_legitimate_constant_p): New function. From-SVN: r172814
2011-04-21 11:38:43 +02:00
/* Implement TARGET_LEGITIMATE_CONSTANT_P. This is all constants for which
we are willing to load the value into a register via a move pattern.
Normally this is all symbolic constants, integral constants that
take three or fewer instructions, and floating-point zero. */
bool
target.def (legitimate_constant_p): New hook. gcc/ * target.def (legitimate_constant_p): New hook. * doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with... (TARGET_LEGITIMATE_CONSTANT_P): ...this. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_true): Declare. * hooks.c (hook_bool_mode_rtx_true): Define. * system.h (LEGITIMATE_CONSTANT_P): Poison. * calls.c (precompute_register_parameters): Replace uses of LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p. (emit_library_call_value_1): Likewise. * expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn) (compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise. * ira-costs.c (scan_one_insn): Likewise. * recog.c (general_operand, immediate_operand): Likewise. * reload.c (find_reloads_toplev, find_reloads_address_part): Likewise. * reload1.c (init_eliminable_invariants): Likewise. * config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a mode argument. * config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete. * config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/alpha/predicates.md (input_operand): Update call to alpha_legitimate_constant_p. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete. * config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise. (THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise. * config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (arm_legitimate_constant_p_1, thumb_legitimate_constant_p) (arm_legitimate_constant_p): New functions. (arm_cannot_force_const_mem): Make static. * config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete. * config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p instead of bfin_legitimate_constant_p. (bfin_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete. * config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_constant_p): Delete. * config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (frv_legitimate_constant_p): Make static. Add a mode argument. * config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete. * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise. * config/i386/i386-protos.h (legitimate_constant_p): Delete. * config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise. * config/i386/i386.c (legitimate_constant_p): Rename to... (ix86_legitimate_constant_p): ...this. Make static. Add a mode argument. (ix86_cannot_force_const_mem): Update accordingly. (ix86_legitimate_address_p): Likewise. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/i386/i386.md: Update commentary. * config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete. * config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise. * config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (ia64_legitimate_constant_p): Make static. Add a mode argument. * config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete. * config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete. * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise. * config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (lm32_legitimate_constant_p): Make static. Add a mode argument. * config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete. * config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise. * config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise. * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete. * config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (m32r_legitimate_constant_p): New function. * config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare. * config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of LEGITIMATE_CONSTANT_P. (LEGITIMATE_CONSTANT_P): Delete. * config/m68k/m68k.c (m68k_expand_prologue): Call m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P. (m68k_legitimate_constant_p): New function. * config/m68k/m68k.md: Update comments. * config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete. * config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mcore_legitimate_constant_p): New function. * config/mep/mep-protos.h (mep_legitimate_constant_p): Delete. * config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mep/mep.c (mep_legitimate_constant_p): Make static. Add a mode argument. (mep_legitimate_address): Update accordingly. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/microblaze/microblaze-protos.h (microblaze_const_double_ok): Delete. * config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise. * config/microblaze/microblaze.c (microblaze_const_double_ok): Make static. Check OP's mode for VOIDmode. (microblaze_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete. * config/mips/mips.c (mips_legitimate_constant_p): New function. (mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/predicates.md: Update comments. * config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete. * config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mmix_legitimate_constant_p): Make static, return a bool, and take a mode argument. (mmix_print_operand_address): Update accordingly. * config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p): Delete. * config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mn10300/mn10300.c (mn10300_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pa_legitimate_constant_p): New function. * config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pdp11_legitimate_constant_p): New function. * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (rs6000_legitimate_constant_p): New function. * config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. * config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete. * config/rx/rx.c (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/rx/rx.md (mov<register_modes:mode>): Update accordingly. * config/s390/s390-protos.h (legitimate_constant_p): Delete. * config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise. * config/s390/s390.c (legitimate_constant_p): Rename to... (s390_legitimate_constant_p): ...this. Make static, return a bool, and add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/score/score.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (sh_legitimate_constant_p): New function. * config/sparc/sparc-protos.h (legitimate_constant_p): Delete. * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete. * config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (legitimate_constant_p): Rename to... (sparc_legitimate_constant_p): ...this. Make static. Add a mode argument. (constant_address_p): Update accordingly. * config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode argument and return a bool. * config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete. * config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (spu_legitimate_constant_p): Add a mode argument and return a bool. (spu_rtx_costs): Update accordingly. * config/spu/predicates.md (vec_imm_operand): Likewise. * config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.c (v850_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/vax/vax-protos.h (legitimate_constant_p): Delete. * config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise. * config/vax/vax.c (legitimate_constant_p): Likewise. * config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete. * config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (xtensa_legitimate_constant_p): New function. From-SVN: r172814
2011-04-21 11:38:43 +02:00
alpha_legitimate_constant_p (enum machine_mode mode, rtx x)
{
HOST_WIDE_INT i0, i1;
switch (GET_CODE (x))
{
case LABEL_REF:
case HIGH:
return true;
case CONST:
if (GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
x = XEXP (XEXP (x, 0), 0);
else
return true;
if (GET_CODE (x) != SYMBOL_REF)
return true;
/* FALLTHRU */
case SYMBOL_REF:
/* TLS symbols are never valid. */
return SYMBOL_REF_TLS_MODEL (x) == 0;
case CONST_DOUBLE:
if (x == CONST0_RTX (mode))
return true;
if (FLOAT_MODE_P (mode))
return false;
goto do_integer;
case CONST_VECTOR:
if (x == CONST0_RTX (mode))
return true;
if (GET_MODE_CLASS (mode) != MODE_VECTOR_INT)
return false;
if (GET_MODE_SIZE (mode) != 8)
return false;
goto do_integer;
case CONST_INT:
do_integer:
if (TARGET_BUILD_CONSTANTS)
return true;
alpha_extract_integer (x, &i0, &i1);
if (HOST_BITS_PER_WIDE_INT >= 64 || i1 == (-i0 < 0))
return alpha_emit_set_const_1 (x, mode, i0, 3, true) != NULL;
return false;
default:
return false;
}
}
/* Operand 1 is known to be a constant, and should require more than one
instruction to load. Emit that multi-part load. */
bool
alpha_split_const_mov (enum machine_mode mode, rtx *operands)
{
HOST_WIDE_INT i0, i1;
rtx temp = NULL_RTX;
alpha_extract_integer (operands[1], &i0, &i1);
if (HOST_BITS_PER_WIDE_INT >= 64 || i1 == -(i0 < 0))
temp = alpha_emit_set_const (operands[0], mode, i0, 3, false);
if (!temp && TARGET_BUILD_CONSTANTS)
temp = alpha_emit_set_long_const (operands[0], i0, i1);
if (temp)
{
if (!rtx_equal_p (operands[0], temp))
emit_move_insn (operands[0], temp);
return true;
}
return false;
}
/* Expand a move instruction; return true if all work is done.
We don't handle non-bwx subword loads here. */
bool
alpha_expand_mov (enum machine_mode mode, rtx *operands)
{
rtx tmp;
/* If the output is not a register, the input must be. */
if (MEM_P (operands[0])
&& ! reg_or_0_operand (operands[1], mode))
operands[1] = force_reg (mode, operands[1]);
/* Allow legitimize_address to perform some simplifications. */
if (mode == Pmode && symbolic_operand (operands[1], mode))
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
{
tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. 2009-05-04 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete. * gcc/explow.c (memory_address): Use target hook. * gcc/targhooks.c (default_legitimize_address): New. * gcc/targhooks.h (default_legitimize_address): New. * gcc/target.h (legitimize_address): New. * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New. (TARGET_INITIALIZER): Include it. * gcc/system.h (LEGITIMIZE_ADDRESS): Poison. * config/bfin/bfin-protos.h (legitimize_address): Remove. * config/bfin/bfin.c (legitimize_address): Remove. * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove. * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390-protos.h (legitimize_address): Delete. * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete. * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete. * gcc/config/i386/i386-protos.h (legitimize_address): Delete. * gcc/config/avr/avr-protos.h (legitimize_address): Delete. * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete. * gcc/config/score/score-protos.h (score_legitimize_address): Delete. * gcc/config/arm/arm-protos.h (arm_legitimize_address, (thumb_legitimize_address): Delete. * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete. * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete. * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete. * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete. * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete. * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete. * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete. * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version. * config/m32c/m32c.c (m32c_legitimize_address): Standardize. * config/m32r/m32r.c (m32r_legitimize_address): New. * config/m68k/m68k.c (m68k_legitimize_address): New. * config/score/score.c (score_legitimize_address): Standardize. * config/score/score3.c (score3_legitimize_address): Standardize. * config/score/score3.h (score3_legitimize_address): Adjust. * config/score/score7.c (score7_legitimize_address): Standardize. * config/score/score7.h (score7_legitimize_address): Adjust. * config/sh/sh.c (sh_legitimize_address): New. * config/iq2000/iq2000.c (iq2000_legitimize_address): New. * gcc/config/s390/s390.c (legitimize_address): Rename to... (s390_legitimize_address): ... this. * gcc/config/sparc/sparc.c (legitimize_address): Rename to... (sparc_legitimize_address): ... this. * gcc/config/i386/i386.c (legitimize_address): Rename to... (ix86_legitimize_address): ... this. * gcc/config/avr/avr.c (legitimize_address): Rename to... (avr_legitimize_address): ... this. * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to... (mn10300_legitimize_address): ... this. * config/alpha/alpha.c (alpha_legitimize_address): Wrap... (alpha_legitimize_address_1): ... the old alpha_legitimize_address. (alpha_expand_mov): Adjust call. * config/frv/frv.c (frv_legitimize_address): Return x on failure. * config/spu/spu.c (spu_legitimize_address): Likewise. * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. From-SVN: r147098
2009-05-04 14:52:41 +02:00
tmp = alpha_legitimize_address_1 (operands[1], operands[0], mode);
if (tmp)
{
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
if (tmp == operands[0])
return true;
operands[1] = tmp;
return false;
}
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
}
/* Early out for non-constants and valid constants. */
if (! CONSTANT_P (operands[1]) || input_operand (operands[1], mode))
return false;
/* Split large integers. */
if (CONST_INT_P (operands[1])
|| GET_CODE (operands[1]) == CONST_DOUBLE
|| GET_CODE (operands[1]) == CONST_VECTOR)
{
if (alpha_split_const_mov (mode, operands))
return true;
}
/* Otherwise we've nothing left but to drop the thing to memory. */
tmp = force_const_mem (mode, operands[1]);
if (tmp == NULL_RTX)
return false;
if (reload_in_progress)
{
emit_move_insn (operands[0], XEXP (tmp, 0));
operands[1] = replace_equiv_address (tmp, operands[0]);
}
else
operands[1] = validize_mem (tmp);
return false;
}
/* Expand a non-bwx QImode or HImode move instruction;
return true if all work is done. */
bool
alpha_expand_mov_nobwx (enum machine_mode mode, rtx *operands)
{
rtx seq;
/* If the output is not a register, the input must be. */
if (MEM_P (operands[0]))
operands[1] = force_reg (mode, operands[1]);
/* Handle four memory cases, unaligned and aligned for either the input
or the output. The only case where we can be called during reload is
for aligned loads; all other cases require temporaries. */
if (any_memory_operand (operands[1], mode))
{
if (aligned_memory_operand (operands[1], mode))
{
if (reload_in_progress)
{
if (mode == QImode)
seq = gen_reload_inqi_aligned (operands[0], operands[1]);
else
seq = gen_reload_inhi_aligned (operands[0], operands[1]);
emit_insn (seq);
}
else
{
rtx aligned_mem, bitnum;
rtx scratch = gen_reg_rtx (SImode);
rtx subtarget;
bool copyout;
get_aligned_mem (operands[1], &aligned_mem, &bitnum);
subtarget = operands[0];
if (REG_P (subtarget))
subtarget = gen_lowpart (DImode, subtarget), copyout = false;
else
subtarget = gen_reg_rtx (DImode), copyout = true;
if (mode == QImode)
seq = gen_aligned_loadqi (subtarget, aligned_mem,
bitnum, scratch);
else
seq = gen_aligned_loadhi (subtarget, aligned_mem,
bitnum, scratch);
emit_insn (seq);
if (copyout)
emit_move_insn (operands[0], gen_lowpart (mode, subtarget));
}
}
else
{
/* Don't pass these as parameters since that makes the generated
code depend on parameter evaluation order which will cause
bootstrap failures. */
rtx temp1, temp2, subtarget, ua;
bool copyout;
temp1 = gen_reg_rtx (DImode);
temp2 = gen_reg_rtx (DImode);
subtarget = operands[0];
if (REG_P (subtarget))
subtarget = gen_lowpart (DImode, subtarget), copyout = false;
else
subtarget = gen_reg_rtx (DImode), copyout = true;
ua = get_unaligned_address (operands[1]);
if (mode == QImode)
seq = gen_unaligned_loadqi (subtarget, ua, temp1, temp2);
else
seq = gen_unaligned_loadhi (subtarget, ua, temp1, temp2);
alpha_set_memflags (seq, operands[1]);
emit_insn (seq);
if (copyout)
emit_move_insn (operands[0], gen_lowpart (mode, subtarget));
}
return true;
}
if (any_memory_operand (operands[0], mode))
{
if (aligned_memory_operand (operands[0], mode))
{
rtx aligned_mem, bitnum;
rtx temp1 = gen_reg_rtx (SImode);
rtx temp2 = gen_reg_rtx (SImode);
get_aligned_mem (operands[0], &aligned_mem, &bitnum);
emit_insn (gen_aligned_store (aligned_mem, operands[1], bitnum,
temp1, temp2));
}
else
{
rtx temp1 = gen_reg_rtx (DImode);
rtx temp2 = gen_reg_rtx (DImode);
rtx temp3 = gen_reg_rtx (DImode);
rtx ua = get_unaligned_address (operands[0]);
if (mode == QImode)
seq = gen_unaligned_storeqi (ua, operands[1], temp1, temp2, temp3);
else
seq = gen_unaligned_storehi (ua, operands[1], temp1, temp2, temp3);
alpha_set_memflags (seq, operands[0]);
emit_insn (seq);
}
return true;
}
return false;
}
/* Implement the movmisalign patterns. One of the operands is a memory
that is not naturally aligned. Emit instructions to load it. */
void
alpha_expand_movmisalign (enum machine_mode mode, rtx *operands)
{
/* Honor misaligned loads, for those we promised to do so. */
if (MEM_P (operands[1]))
{
rtx tmp;
if (register_operand (operands[0], mode))
tmp = operands[0];
else
tmp = gen_reg_rtx (mode);
alpha_expand_unaligned_load (tmp, operands[1], 8, 0, 0);
if (tmp != operands[0])
emit_move_insn (operands[0], tmp);
}
else if (MEM_P (operands[0]))
{
if (!reg_or_0_operand (operands[1], mode))
operands[1] = force_reg (mode, operands[1]);
alpha_expand_unaligned_store (operands[0], operands[1], 8, 0);
}
else
gcc_unreachable ();
}
/* Generate an unsigned DImode to FP conversion. This is the same code
optabs would emit if we didn't have TFmode patterns.
For SFmode, this is the only construction I've found that can pass
gcc.c-torture/execute/ieee/rbug.c. No scenario that uses DFmode
intermediates will work, because you'll get intermediate rounding
that ruins the end result. Some of this could be fixed by turning
on round-to-positive-infinity, but that requires diddling the fpsr,
which kills performance. I tried turning this around and converting
to a negative number, so that I could turn on /m, but either I did
it wrong or there's something else cause I wound up with the exact
same single-bit error. There is a branch-less form of this same code:
srl $16,1,$1
and $16,1,$2
cmplt $16,0,$3
or $1,$2,$2
cmovge $16,$16,$2
itoft $3,$f10
itoft $2,$f11
cvtqs $f11,$f11
adds $f11,$f11,$f0
fcmoveq $f10,$f11,$f0
I'm not using it because it's the same number of instructions as
this branch-full form, and it has more serialized long latency
instructions on the critical path.
For DFmode, we can avoid rounding errors by breaking up the word
into two pieces, converting them separately, and adding them back:
LC0: .long 0,0x5f800000
itoft $16,$f11
lda $2,LC0
cmplt $16,0,$1
cpyse $f11,$f31,$f10
cpyse $f31,$f11,$f11
s4addq $1,$2,$1
lds $f12,0($1)
cvtqt $f10,$f10
cvtqt $f11,$f11
addt $f12,$f10,$f0
addt $f0,$f11,$f0
This doesn't seem to be a clear-cut win over the optabs form.
It probably all depends on the distribution of numbers being
converted -- in the optabs form, all but high-bit-set has a
much lower minimum execution time. */
void
alpha_emit_floatuns (rtx operands[2])
{
rtx neglab, donelab, i0, i1, f0, in, out;
enum machine_mode mode;
out = operands[0];
in = force_reg (DImode, operands[1]);
mode = GET_MODE (out);
neglab = gen_label_rtx ();
donelab = gen_label_rtx ();
i0 = gen_reg_rtx (DImode);
i1 = gen_reg_rtx (DImode);
f0 = gen_reg_rtx (mode);
expr.c (store_field): Pass tree instead of max size; callers changed. * expr.c (store_field): Pass tree instead of max size; callers changed. Change handling of alignment. Only copy to_rtx if is TARGET. (expand_expr_unaligned): Delete; callers now use expand_expr. (emit_cmp_insn): No longer take ALIGN parm; all callers changed. (expand_assignment): Change handling of alignment. Only copy to_rtx if was original. (get_inner_reference): No longer return alginment; callers changed. (expand_expr, case COMPONENT_REF): Change handling of alignment. (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. (compare_from_rtx): Delete ALIGN parm; all callers changed. (do_compare_rtx_and_jump): Likewise. * expr.h: Reflect above changes. * tree.h: Likewise. * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter to get_inner_reference. * builtins.c: Remove ALIGN parm in call to emit_cmp_and_jump_insns. * doloop.c, except.c, explow.c, loop.c, stmt.c, unroll.c: Likewise. * optabs.c: Likewise. (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. * expmed.c: Remove ALIGN arg from calls to compare_from_rtx, compare_rtx_and_jump, and emit_cmp_jump_insns. * fold-const.c: Remove PALIGN in calls to get_inner_reference. * function.c (assign_stack_temp_for_type): No longer static. * optabs.h (emit_cmp_insn): Remove ALIGN parm. (prepare_cmp_insn): Delete declaration. * rtl.h (assign_stack_temp_for_type): Add declaration. * config/alpha/alpha.c, config/d30v/d30v.c: Reflect above changes. * config/clipper/clipper.c, config/h8300/h8300.c: Likewise. * config/i386/i386.c,config/mips/mips.c: Likewise. * config/i860/i860.c, config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. * alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * emit-rtl.c (change_address): Fix typo in default alignment. (adjust_address_1): Use mode of NEW, not MODE, when setting size. * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case. * rtl.h (REGNO_PTR_FRAME_P): New macro. * expr.c (store_field): Pass tree instead of max size; callers changed. Change handling of alignment. Only copy to_rtx if is TARGET. (expand_expr_unaligned): Delete; callers now use expand_expr. (emit_cmp_insn): No longer take ALIGN parm; all callers changed. (expand_assignment): Change handling of alignment. Only copy to_rtx if was original. (get_inner_reference): No longer return alginment; callers changed. (expand_expr, case COMPONENT_REF): Change handling of alignment. (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. (compare_from_rtx): Delete ALIGN parm; all callers changed. (do_compare_rtx_and_jump): Likewise. * expr.h: Reflect above changes. * tree.h: Likewise. * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter to get_inner_reference. * except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns. * explow.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. * fold-const.c: Remove PALIGN in calls to get_inner_reference. * function.c (assign_stack_temp_for_type): No longer static. * optabs.h (emit_cmp_insn): Remove ALIGN parm. (prepare_cmp_insn): Delete declaration. * rtl.h (assign_stack_temp_for_type): Add declaration. * config/d30v/d30v.c: Reflect above changes. * config/i860/i860.c, config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. * ada/trans.c, ada/utils2.c: Remove PALIGN parameter to get_inner_reference. From-SVN: r47078
2001-11-16 03:26:42 +01:00
emit_cmp_and_jump_insns (in, const0_rtx, LT, const0_rtx, DImode, 0, neglab);
emit_insn (gen_rtx_SET (VOIDmode, out, gen_rtx_FLOAT (mode, in)));
emit_jump_insn (gen_jump (donelab));
emit_barrier ();
emit_label (neglab);
emit_insn (gen_lshrdi3 (i0, in, const1_rtx));
emit_insn (gen_anddi3 (i1, in, const1_rtx));
emit_insn (gen_iordi3 (i0, i0, i1));
emit_insn (gen_rtx_SET (VOIDmode, f0, gen_rtx_FLOAT (mode, i0)));
emit_insn (gen_rtx_SET (VOIDmode, out, gen_rtx_PLUS (mode, f0, f0)));
emit_label (donelab);
}
/* Generate the comparison for a conditional branch. */
void
alpha_emit_conditional_branch (rtx operands[], enum machine_mode cmp_mode)
{
enum rtx_code cmp_code, branch_code;
enum machine_mode branch_mode = VOIDmode;
enum rtx_code code = GET_CODE (operands[0]);
rtx op0 = operands[1], op1 = operands[2];
rtx tem;
if (cmp_mode == TFmode)
{
op0 = alpha_emit_xfloating_compare (&code, op0, op1);
op1 = const0_rtx;
cmp_mode = DImode;
}
/* The general case: fold the comparison code to the types of compares
that we have, choosing the branch as necessary. */
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
rtl.def: Add unordered fp comparisions. * rtl.def: Add unordered fp comparisions. * tree.def: Likewise. * tree.h: Add ISO C 9x unordered fp comparision builtins. * builtins.c (expand_tree_builtin): New function. * c-typeck.c (build_function_call): Use it. (build_binary_op): Support unordered compares. * c-common.c (c_common_nodes_and_builtins): Add unordered compares. * combine.c (known_cond): Handle reverse_condition returning UNKNOWN. (reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed. * cse.c (fold_rtx): Check FLOAT_MODE_P before reversing. (record_jump_equiv): Handle reverse_condition returning UNKNOWN. * jump.c (reverse_condition): Don't abort for UNLE etc, but return UNKNOWN. (swap_condition): Handle unordered compares. (thread_jumps): Check can_reverse before reversing. * loop.c (get_condition): Likewise. Allow UNORERED/ORDERED to be reversed for FP. * optabs.c (can_compare_p): New argument CODE. Verify branch or setcc is present before acking for cmp_optab. Update all callers. (prepare_float_lib_cmp, init_optabs): Handle UNORDERED. * expmed.c (do_cmp_and_jump): Update for can_compare_p. * expr.c (expand_expr): Likewise. Support unordered compares. (do_jump, do_store_flag): Likewise. * expr.h (enum libfunc_index): Add unordered compares. * Makefile.in (FPBIT_FUNCS): Add _unord_sf. (DPBIT_FUNCS): Add _unord_df. * config/fp-bit.c (_unord_f2): New. * fp-test.c (main): Try unordered compare builtins. * alpha-protos.h (alpha_fp_comparison_operator): Declare. * alpha.c (alpha_comparison_operator): Check mode properly. (alpha_swapped_comparison_operator): Likewise. (signed_comparison_operator): Likewise. (alpha_fp_comparison_operator): New. (alpha_emit_conditional_branch): Handle unordered compares. * alpha.h (PREDICATE_CODES): Update. * alpha.md (fp compares): Use alpha_fp_comparison_operator. (bunordered, bordered): New. * cp/call.c (build_over_call): Use expand_tree_builtin. * cp/typeck.c (build_function_call_real): Likewise. (build_binary_op_nodefault): Handle unordered compares. * gcc.c-torture/execute/ieee/fp-cmp-4.c: New. From-SVN: r31591
2000-01-24 21:10:04 +01:00
case UNORDERED:
/* We have these compares: */
cmp_code = code, branch_code = NE;
break;
case NE:
rtl.def: Add unordered fp comparisions. * rtl.def: Add unordered fp comparisions. * tree.def: Likewise. * tree.h: Add ISO C 9x unordered fp comparision builtins. * builtins.c (expand_tree_builtin): New function. * c-typeck.c (build_function_call): Use it. (build_binary_op): Support unordered compares. * c-common.c (c_common_nodes_and_builtins): Add unordered compares. * combine.c (known_cond): Handle reverse_condition returning UNKNOWN. (reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed. * cse.c (fold_rtx): Check FLOAT_MODE_P before reversing. (record_jump_equiv): Handle reverse_condition returning UNKNOWN. * jump.c (reverse_condition): Don't abort for UNLE etc, but return UNKNOWN. (swap_condition): Handle unordered compares. (thread_jumps): Check can_reverse before reversing. * loop.c (get_condition): Likewise. Allow UNORERED/ORDERED to be reversed for FP. * optabs.c (can_compare_p): New argument CODE. Verify branch or setcc is present before acking for cmp_optab. Update all callers. (prepare_float_lib_cmp, init_optabs): Handle UNORDERED. * expmed.c (do_cmp_and_jump): Update for can_compare_p. * expr.c (expand_expr): Likewise. Support unordered compares. (do_jump, do_store_flag): Likewise. * expr.h (enum libfunc_index): Add unordered compares. * Makefile.in (FPBIT_FUNCS): Add _unord_sf. (DPBIT_FUNCS): Add _unord_df. * config/fp-bit.c (_unord_f2): New. * fp-test.c (main): Try unordered compare builtins. * alpha-protos.h (alpha_fp_comparison_operator): Declare. * alpha.c (alpha_comparison_operator): Check mode properly. (alpha_swapped_comparison_operator): Likewise. (signed_comparison_operator): Likewise. (alpha_fp_comparison_operator): New. (alpha_emit_conditional_branch): Handle unordered compares. * alpha.h (PREDICATE_CODES): Update. * alpha.md (fp compares): Use alpha_fp_comparison_operator. (bunordered, bordered): New. * cp/call.c (build_over_call): Use expand_tree_builtin. * cp/typeck.c (build_function_call_real): Likewise. (build_binary_op_nodefault): Handle unordered compares. * gcc.c-torture/execute/ieee/fp-cmp-4.c: New. From-SVN: r31591
2000-01-24 21:10:04 +01:00
case ORDERED:
/* These must be reversed. */
rtl.def: Add unordered fp comparisions. * rtl.def: Add unordered fp comparisions. * tree.def: Likewise. * tree.h: Add ISO C 9x unordered fp comparision builtins. * builtins.c (expand_tree_builtin): New function. * c-typeck.c (build_function_call): Use it. (build_binary_op): Support unordered compares. * c-common.c (c_common_nodes_and_builtins): Add unordered compares. * combine.c (known_cond): Handle reverse_condition returning UNKNOWN. (reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed. * cse.c (fold_rtx): Check FLOAT_MODE_P before reversing. (record_jump_equiv): Handle reverse_condition returning UNKNOWN. * jump.c (reverse_condition): Don't abort for UNLE etc, but return UNKNOWN. (swap_condition): Handle unordered compares. (thread_jumps): Check can_reverse before reversing. * loop.c (get_condition): Likewise. Allow UNORERED/ORDERED to be reversed for FP. * optabs.c (can_compare_p): New argument CODE. Verify branch or setcc is present before acking for cmp_optab. Update all callers. (prepare_float_lib_cmp, init_optabs): Handle UNORDERED. * expmed.c (do_cmp_and_jump): Update for can_compare_p. * expr.c (expand_expr): Likewise. Support unordered compares. (do_jump, do_store_flag): Likewise. * expr.h (enum libfunc_index): Add unordered compares. * Makefile.in (FPBIT_FUNCS): Add _unord_sf. (DPBIT_FUNCS): Add _unord_df. * config/fp-bit.c (_unord_f2): New. * fp-test.c (main): Try unordered compare builtins. * alpha-protos.h (alpha_fp_comparison_operator): Declare. * alpha.c (alpha_comparison_operator): Check mode properly. (alpha_swapped_comparison_operator): Likewise. (signed_comparison_operator): Likewise. (alpha_fp_comparison_operator): New. (alpha_emit_conditional_branch): Handle unordered compares. * alpha.h (PREDICATE_CODES): Update. * alpha.md (fp compares): Use alpha_fp_comparison_operator. (bunordered, bordered): New. * cp/call.c (build_over_call): Use expand_tree_builtin. * cp/typeck.c (build_function_call_real): Likewise. (build_binary_op_nodefault): Handle unordered compares. * gcc.c-torture/execute/ieee/fp-cmp-4.c: New. From-SVN: r31591
2000-01-24 21:10:04 +01:00
cmp_code = reverse_condition (code), branch_code = EQ;
break;
case GE: case GT: case GEU: case GTU:
/* For FP, we swap them, for INT, we reverse them. */
if (cmp_mode == DFmode)
{
cmp_code = swap_condition (code);
branch_code = NE;
tem = op0, op0 = op1, op1 = tem;
}
else
{
cmp_code = reverse_condition (code);
branch_code = EQ;
}
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
if (cmp_mode == DFmode)
{
if (flag_unsafe_math_optimizations && cmp_code != UNORDERED)
{
/* When we are not as concerned about non-finite values, and we
are comparing against zero, we can branch directly. */
if (op1 == CONST0_RTX (DFmode))
cmp_code = UNKNOWN, branch_code = code;
else if (op0 == CONST0_RTX (DFmode))
{
/* Undo the swap we probably did just above. */
tem = op0, op0 = op1, op1 = tem;
branch_code = swap_condition (cmp_code);
cmp_code = UNKNOWN;
}
}
else
{
/* ??? We mark the branch mode to be CCmode to prevent the
compare and branch from being combined, since the compare
insn follows IEEE rules that the branch does not. */
branch_mode = CCmode;
}
}
else
{
/* The following optimizations are only for signed compares. */
if (code != LEU && code != LTU && code != GEU && code != GTU)
{
/* Whee. Compare and branch against 0 directly. */
if (op1 == const0_rtx)
cmp_code = UNKNOWN, branch_code = code;
/* If the constants doesn't fit into an immediate, but can
be generated by lda/ldah, we adjust the argument and
compare against zero, so we can use beq/bne directly. */
/* ??? Don't do this when comparing against symbols, otherwise
we'll reduce (&x == 0x1234) to (&x-0x1234 == 0), which will
be declared false out of hand (at least for non-weak). */
else if (CONST_INT_P (op1)
&& (code == EQ || code == NE)
&& !(symbolic_operand (op0, VOIDmode)
|| (REG_P (op0) && REG_POINTER (op0))))
{
rtx n_op1 = GEN_INT (-INTVAL (op1));
if (! satisfies_constraint_I (op1)
&& (satisfies_constraint_K (n_op1)
|| satisfies_constraint_L (n_op1)))
cmp_code = PLUS, branch_code = code, op1 = n_op1;
}
}
if (!reg_or_0_operand (op0, DImode))
op0 = force_reg (DImode, op0);
if (cmp_code != PLUS && !reg_or_8bit_operand (op1, DImode))
op1 = force_reg (DImode, op1);
}
/* Emit an initial compare instruction, if necessary. */
tem = op0;
if (cmp_code != UNKNOWN)
{
tem = gen_reg_rtx (cmp_mode);
emit_move_insn (tem, gen_rtx_fmt_ee (cmp_code, cmp_mode, op0, op1));
}
/* Emit the branch instruction. */
tem = gen_rtx_SET (VOIDmode, pc_rtx,
gen_rtx_IF_THEN_ELSE (VOIDmode,
gen_rtx_fmt_ee (branch_code,
branch_mode, tem,
CONST0_RTX (cmp_mode)),
gen_rtx_LABEL_REF (VOIDmode,
operands[3]),
pc_rtx));
emit_jump_insn (tem);
}
/* Certain simplifications can be done to make invalid setcc operations
valid. Return the final comparison, or NULL if we can't work. */
bool
alpha_emit_setcc (rtx operands[], enum machine_mode cmp_mode)
{
enum rtx_code cmp_code;
enum rtx_code code = GET_CODE (operands[1]);
rtx op0 = operands[2], op1 = operands[3];
rtx tmp;
if (cmp_mode == TFmode)
{
op0 = alpha_emit_xfloating_compare (&code, op0, op1);
op1 = const0_rtx;
cmp_mode = DImode;
}
if (cmp_mode == DFmode && !TARGET_FIX)
return 0;
/* The general case: fold the comparison code to the types of compares
that we have, choosing the branch as necessary. */
cmp_code = UNKNOWN;
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
case UNORDERED:
/* We have these compares. */
if (cmp_mode == DFmode)
cmp_code = code, code = NE;
break;
case NE:
if (cmp_mode == DImode && op1 == const0_rtx)
break;
/* FALLTHRU */
case ORDERED:
cmp_code = reverse_condition (code);
code = EQ;
break;
case GE: case GT: case GEU: case GTU:
/* These normally need swapping, but for integer zero we have
special patterns that recognize swapped operands. */
if (cmp_mode == DImode && op1 == const0_rtx)
break;
code = swap_condition (code);
if (cmp_mode == DFmode)
cmp_code = code, code = NE;
tmp = op0, op0 = op1, op1 = tmp;
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
if (cmp_mode == DImode)
{
if (!register_operand (op0, DImode))
op0 = force_reg (DImode, op0);
if (!reg_or_8bit_operand (op1, DImode))
op1 = force_reg (DImode, op1);
}
/* Emit an initial compare instruction, if necessary. */
if (cmp_code != UNKNOWN)
{
tmp = gen_reg_rtx (cmp_mode);
emit_insn (gen_rtx_SET (VOIDmode, tmp,
gen_rtx_fmt_ee (cmp_code, cmp_mode, op0, op1)));
op0 = cmp_mode != DImode ? gen_lowpart (DImode, tmp) : tmp;
op1 = const0_rtx;
}
/* Emit the setcc instruction. */
emit_insn (gen_rtx_SET (VOIDmode, operands[0],
gen_rtx_fmt_ee (code, DImode, op0, op1)));
return true;
}
/* Rewrite a comparison against zero CMP of the form
(CODE (cc0) (const_int 0)) so it can be written validly in
a conditional move (if_then_else CMP ...).
If both of the operands that set cc0 are nonzero we must emit
an insn to perform the compare (it can't be done within
the conditional move). */
rtx
alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
{
enum rtx_code code = GET_CODE (cmp);
enum rtx_code cmov_code = NE;
rtx op0 = XEXP (cmp, 0);
rtx op1 = XEXP (cmp, 1);
enum machine_mode cmp_mode
= (GET_MODE (op0) == VOIDmode ? DImode : GET_MODE (op0));
enum machine_mode cmov_mode = VOIDmode;
int local_fast_math = flag_unsafe_math_optimizations;
rtx tem;
if (cmp_mode == TFmode)
{
op0 = alpha_emit_xfloating_compare (&code, op0, op1);
op1 = const0_rtx;
cmp_mode = DImode;
}
gcc_assert (cmp_mode == DFmode || cmp_mode == DImode);
if (FLOAT_MODE_P (cmp_mode) != FLOAT_MODE_P (mode))
{
enum rtx_code cmp_code;
if (! TARGET_FIX)
return 0;
/* If we have fp<->int register move instructions, do a cmov by
performing the comparison in fp registers, and move the
zero/nonzero value to integer registers, where we can then
use a normal cmov, or vice-versa. */
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
/* We have these compares. */
cmp_code = code, code = NE;
break;
case NE:
/* This must be reversed. */
cmp_code = EQ, code = EQ;
break;
case GE: case GT: case GEU: case GTU:
/* These normally need swapping, but for integer zero we have
special patterns that recognize swapped operands. */
if (cmp_mode == DImode && op1 == const0_rtx)
cmp_code = code, code = NE;
else
{
cmp_code = swap_condition (code);
code = NE;
tem = op0, op0 = op1, op1 = tem;
}
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
tem = gen_reg_rtx (cmp_mode);
emit_insn (gen_rtx_SET (VOIDmode, tem,
gen_rtx_fmt_ee (cmp_code, cmp_mode,
op0, op1)));
cmp_mode = cmp_mode == DImode ? DFmode : DImode;
op0 = gen_lowpart (cmp_mode, tem);
op1 = CONST0_RTX (cmp_mode);
local_fast_math = 1;
}
/* We may be able to use a conditional move directly.
This avoids emitting spurious compares. */
if (signed_comparison_operator (cmp, VOIDmode)
&& (cmp_mode == DImode || local_fast_math)
&& (op0 == CONST0_RTX (cmp_mode) || op1 == CONST0_RTX (cmp_mode)))
return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
/* We can't put the comparison inside the conditional move;
emit a compare instruction and put that inside the
conditional move. Make sure we emit only comparisons we have;
swap or reverse as necessary. */
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (!can_create_pseudo_p ())
return NULL_RTX;
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
/* We have these compares: */
break;
case NE:
/* This must be reversed. */
code = reverse_condition (code);
cmov_code = EQ;
break;
case GE: case GT: case GEU: case GTU:
/* These must be swapped. */
if (op1 != CONST0_RTX (cmp_mode))
{
code = swap_condition (code);
tem = op0, op0 = op1, op1 = tem;
}
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
if (cmp_mode == DImode)
{
if (!reg_or_0_operand (op0, DImode))
op0 = force_reg (DImode, op0);
if (!reg_or_8bit_operand (op1, DImode))
op1 = force_reg (DImode, op1);
}
/* ??? We mark the branch mode to be CCmode to prevent the compare
and cmov from being combined, since the compare insn follows IEEE
rules that the cmov does not. */
if (cmp_mode == DFmode && !local_fast_math)
cmov_mode = CCmode;
tem = gen_reg_rtx (cmp_mode);
emit_move_insn (tem, gen_rtx_fmt_ee (code, cmp_mode, op0, op1));
return gen_rtx_fmt_ee (cmov_code, cmov_mode, tem, CONST0_RTX (cmp_mode));
}
/* Simplify a conditional move of two constants into a setcc with
arithmetic. This is done with a splitter since combine would
just undo the work if done during code generation. It also catches
cases we wouldn't have before cse. */
int
alpha_split_conditional_move (enum rtx_code code, rtx dest, rtx cond,
rtx t_rtx, rtx f_rtx)
{
HOST_WIDE_INT t, f, diff;
enum machine_mode mode;
rtx target, subtarget, tmp;
mode = GET_MODE (dest);
t = INTVAL (t_rtx);
f = INTVAL (f_rtx);
diff = t - f;
if (((code == NE || code == EQ) && diff < 0)
|| (code == GE || code == GT))
{
code = reverse_condition (code);
diff = t, t = f, f = diff;
diff = t - f;
}
subtarget = target = dest;
if (mode != DImode)
{
target = gen_lowpart (DImode, dest);
Replace no_new_pseudos in backends. * rtl.h (can_create_pseudo_p): Define. * config/darwin.c (machopic_indirect_data_reference): Use can_create_pseudo_p () instead of no_new_pseudos. (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/alpha/alpha.c (alpha_legitimize_address): Likewise. (alpha_emit_set_const_1): Likewise. (alpha_emit_set_const): Likewise. (alpha_emit_conditional_move): Likewise. (alpha_split_conditional_move): Likewise. * config/alpha/alpha.md (various splitters): Likewise. (movti): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. (arm_load_pic_register): Likewise. * config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise. (movdi, movsi, movhi, movqi, movsf, movdf): Likewise. * config/bfin/bfin.c (legitimize_pic_address): Likewise. * config/cris/cris.c (cris_expand_pic_call_address): Likewise. * config/cris/cris.md (movsi): Likewise. * config/frv/frv.md (symGOT2reg_hilo): Likewise. (symGOTOFF2reg_hilo): Likewise. (symGPREL2reg, symGPREL2reg_hilo): Likewise. * config/h8300/h8300.md (insv, extzv): Likewise. * config/i386/i386.c (ix86_expand_move): Likewise. (ix86_expand_vector_move): Likewise. (ix86_prepare_fp_compare_args): Likewise. (ix86_expand_carry_flag_compare): Likewise. * config/i386/i386.md (tls_dynamic_gnu2_32): Likewise. (tls_dynamic_gnu2_combine_32): Likewise. (tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise. * config/ia64/ia64.c (ia64_expand_move): Likewise. (ia64_expand_movxf_movrf): Likewise. * config/m32c/m32c.c (m32c_prepare_move): Likewise. (m32c_split_move): Likewise. (m32c_expand_insv): Likewise. * config/m68k/m68k.md (movsi): Likewise. * config/mips/mips.c (mips_force_temporary): Likewise. (mips_split_symbol): Likewise. (mips_move_integer): Likewise. (mips_legitimize_const_move): Likewise. * config/mn10300/mn10300.md (movsi): Likewise. * config/pa/pa.c (emit_move_sequence): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (rs6000_got_register): Likewise. (create_TOC_reference): Likewise. (rs6000_machopic_legitimize_pic_address): Likewise. * config/rs6000/rs6000.md (add<mode>3): Likewise. (various splitters): Likewise. (iorsi3, xorsi3, iordi3, xordi3): Likewise. (movsi_got): Likewise. * config/s390/s390.c (emit_symbolic_move): Likewise. * config/s390/s390.md (movhi, movqi): Likewise. (load_multiple, store_multiple): Likewise. * config/score/score.c (score_force_temporary): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (prepare_cbranch_operands): Likewise. (emit_fpu_switch): Likewise. (fpscr_set_from_mem): Likewise. * config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise. (adddi3, subsi3): Likewise. (various splitters): Likewise. (divsi_inv_fp_combine): Likewise. (symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise. (seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise. (sne): Likewise. * config/sh/predicates.md (xor_operand): Likewise. * config/sparc/sparc.c (legitimize_tls_address): Likewise. * config/sparc/sparc.md (movsi_pic_label_ref): Likewise. (movdi_pic_label_ref): Likewise. * config/spu/spu.c (spu_split_immediate): Likewise. * config/alpha/alpha.md (various splitters): Remove test !no_new_pseudos || reload_completed. * config/ia64/ia64.c (ia64_output_mi_thunk): Don't set no_new_pseudos. * config/m68k/m68k.c (m68k_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. From-SVN: r126517
2007-07-10 19:23:11 +02:00
if (can_create_pseudo_p ())
subtarget = gen_reg_rtx (DImode);
else
subtarget = target;
}
/* Below, we must be careful to use copy_rtx on target and subtarget
in intermediate insns, as they may be a subreg rtx, which may not
be shared. */
if (f == 0 && exact_log2 (diff) > 0
/* On EV6, we've got enough shifters to make non-arithmetic shifts
viable over a longer latency cmove. On EV5, the E0 slot is a
scarce resource, and on EV4 shift has the same latency as a cmove. */
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
&& (diff <= 8 || alpha_tune == PROCESSOR_EV6))
{
tmp = gen_rtx_fmt_ee (code, DImode, cond, const0_rtx);
emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (subtarget), tmp));
tmp = gen_rtx_ASHIFT (DImode, copy_rtx (subtarget),
GEN_INT (exact_log2 (t)));
emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
}
else if (f == 0 && t == -1)
{
tmp = gen_rtx_fmt_ee (code, DImode, cond, const0_rtx);
emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (subtarget), tmp));
emit_insn (gen_negdi2 (target, copy_rtx (subtarget)));
}
else if (diff == 1 || diff == 4 || diff == 8)
{
rtx add_op;
tmp = gen_rtx_fmt_ee (code, DImode, cond, const0_rtx);
emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (subtarget), tmp));
if (diff == 1)
emit_insn (gen_adddi3 (target, copy_rtx (subtarget), GEN_INT (f)));
else
{
add_op = GEN_INT (f);
if (sext_add_operand (add_op, mode))
{
tmp = gen_rtx_MULT (DImode, copy_rtx (subtarget),
GEN_INT (diff));
tmp = gen_rtx_PLUS (DImode, tmp, add_op);
emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
}
else
return 0;
}
}
else
return 0;
return 1;
}
/* Look up the function X_floating library function name for the
given operation. */
hashtab.h: Update GTY annotations to new syntax 2009-04-21 Taras Glek <tglek@mozilla.com> * include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise From-SVN: r146607
2009-04-22 20:29:36 +02:00
struct GTY(()) xfloating_op
{
const enum rtx_code code;
const char *const GTY((skip)) osf_func;
const char *const GTY((skip)) vms_func;
rtx libcall;
};
static GTY(()) struct xfloating_op xfloating_ops[] =
{
{ PLUS, "_OtsAddX", "OTS$ADD_X", 0 },
{ MINUS, "_OtsSubX", "OTS$SUB_X", 0 },
{ MULT, "_OtsMulX", "OTS$MUL_X", 0 },
{ DIV, "_OtsDivX", "OTS$DIV_X", 0 },
{ EQ, "_OtsEqlX", "OTS$EQL_X", 0 },
{ NE, "_OtsNeqX", "OTS$NEQ_X", 0 },
{ LT, "_OtsLssX", "OTS$LSS_X", 0 },
{ LE, "_OtsLeqX", "OTS$LEQ_X", 0 },
{ GT, "_OtsGtrX", "OTS$GTR_X", 0 },
{ GE, "_OtsGeqX", "OTS$GEQ_X", 0 },
{ FIX, "_OtsCvtXQ", "OTS$CVTXQ", 0 },
{ FLOAT, "_OtsCvtQX", "OTS$CVTQX", 0 },
{ UNSIGNED_FLOAT, "_OtsCvtQUX", "OTS$CVTQUX", 0 },
{ FLOAT_EXTEND, "_OtsConvertFloatTX", "OTS$CVT_FLOAT_T_X", 0 },
{ FLOAT_TRUNCATE, "_OtsConvertFloatXT", "OTS$CVT_FLOAT_X_T", 0 }
};
static GTY(()) struct xfloating_op vax_cvt_ops[] =
{
{ FLOAT_EXTEND, "_OtsConvertFloatGX", "OTS$CVT_FLOAT_G_X", 0 },
{ FLOAT_TRUNCATE, "_OtsConvertFloatXG", "OTS$CVT_FLOAT_X_G", 0 }
};
static rtx
alpha_lookup_xfloating_lib_func (enum rtx_code code)
{
struct xfloating_op *ops = xfloating_ops;
long n = ARRAY_SIZE (xfloating_ops);
long i;
gcc_assert (TARGET_HAS_XFLOATING_LIBS);
/* How irritating. Nothing to key off for the main table. */
if (TARGET_FLOAT_VAX && (code == FLOAT_EXTEND || code == FLOAT_TRUNCATE))
{
ops = vax_cvt_ops;
n = ARRAY_SIZE (vax_cvt_ops);
}
for (i = 0; i < n; ++i, ++ops)
if (ops->code == code)
{
rtx func = ops->libcall;
if (!func)
{
func = init_one_libfunc (TARGET_ABI_OPEN_VMS
? ops->vms_func : ops->osf_func);
ops->libcall = func;
}
return func;
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
/* Most X_floating operations take the rounding mode as an argument.
Compute that here. */
static int
alpha_compute_xfloating_mode_arg (enum rtx_code code,
enum alpha_fp_rounding_mode round)
{
int mode;
switch (round)
{
case ALPHA_FPRM_NORM:
mode = 2;
break;
case ALPHA_FPRM_MINF:
mode = 1;
break;
case ALPHA_FPRM_CHOP:
mode = 0;
break;
case ALPHA_FPRM_DYN:
mode = 4;
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
/* XXX For reference, round to +inf is mode = 3. */
}
if (code == FLOAT_TRUNCATE && alpha_fptm == ALPHA_FPTM_N)
mode |= 0x10000;
return mode;
}
/* Emit an X_floating library function call.
Note that these functions do not follow normal calling conventions:
TFmode arguments are passed in two integer registers (as opposed to
indirect); TFmode return values appear in R16+R17.
FUNC is the function to call.
TARGET is where the output belongs.
OPERANDS are the inputs.
NOPERANDS is the count of inputs.
EQUIV is the expression equivalent for the function.
*/
static void
alpha_emit_xfloating_libcall (rtx func, rtx target, rtx operands[],
int noperands, rtx equiv)
{
rtx usage = NULL_RTX, tmp, reg;
int regno = 16, i;
start_sequence ();
for (i = 0; i < noperands; ++i)
{
switch (GET_MODE (operands[i]))
{
case TFmode:
reg = gen_rtx_REG (TFmode, regno);
regno += 2;
break;
case DFmode:
reg = gen_rtx_REG (DFmode, regno + 32);
regno += 1;
break;
case VOIDmode:
gcc_assert (CONST_INT_P (operands[i]));
/* FALLTHRU */
case DImode:
reg = gen_rtx_REG (DImode, regno);
regno += 1;
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
emit_move_insn (reg, operands[i]);
use_reg (&usage, reg);
}
switch (GET_MODE (target))
{
case TFmode:
reg = gen_rtx_REG (TFmode, 16);
break;
case DFmode:
reg = gen_rtx_REG (DFmode, 32);
break;
case DImode:
reg = gen_rtx_REG (DImode, 0);
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
tmp = gen_rtx_MEM (QImode, func);
tmp = emit_call_insn (GEN_CALL_VALUE (reg, tmp, const0_rtx,
const0_rtx, const0_rtx));
CALL_INSN_FUNCTION_USAGE (tmp) = usage;
[multiple changes] 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> PATCH rtl/7335 PATCH rtl/33826 * see.c (see_copy_insn): Copy new pure const attributes for new call. * c-decl.c (merge_decls): Ditto. * postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree.c (define_local_buitin): Rename DECL_IS_PURE to DECL_PURE_P. Initialized DECL_LOOPING_CONST_PURE. (process_call_operands): Set tree_side_effects properly. * tree.h (TREE_READONLY_DECL_P): Removed. (DECL_IS_PURE): Renamed to DECL_PURE_P. (DECL_LOOPING_OR_CONST_P): New macro. (struct tree_function_decl): Added looping_const_or_pure_p. (ECF_*) Renumbered. (ECF_LOOPING_OR_CONST_P): New macro, * rtlanal.c (pure_const_p): Removed. * builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P. * reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * ipa-pure-const.c (pure_const_state_e): Added looping field. (check_decl, check_tree, check_call, scan_function): Initialize looping. (analyze_function): Rename DECL_IS_PURE to DECL_PURE_P. (static_execute): Set looping true for recursive functions. Undo setting state to IPA_NEITHER for recursive functions. * cse.c (cse_insn): * ifcvt.c (noce_can_store_speculate_p): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or RTL_CONST_OR_PURE_CALL_P. * dse.c (scan_insn): Ditto. * local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto. * gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. (store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P. * gimplify.c (gimplify_call_expr): Clear side effects for non-looping pure and constant calls. * calls.c (emit_call_1): Set rtl flags from ecf flags. (flags_from_decl_or_type): Set ecf flags from decl flags. (initialize_argument_information): Turn off ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST. Change const to pure if callee_copies is true rather than just turning off const. (expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old way of marking pure calls. (emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL. Remove hack that was supposed to fix pr7335 and remove old way of marking pure calls. * emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P. * cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * tree-ssa-pre.c (can_value_number_call): Fixed spacing. * loop-invariant.c (find_exits, find_invariant_bb): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * sched-deps.c (schedule_analyze): Ditto. * rtl.h (struct rtx_def): Use call field, unchanging field, and return_val field of calls to represent pure and const function info. (CONST_OR_PURE_CALL_P): Deleted macro. (RTL_CONST_CALL_P, RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros. * tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to TREE_READONLY. * tree-optimize.c (execute_fixup_cfg): Added test for ECF_LOOPING_CONST_OR_PURE. * c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to DECL_PURE_P. * tree-cfg.c (update_call_expr_flags): Do not clear tree side effects for looping pure or const calls. (verify_gimple_expr): Added verification code. * config/alpha/alpha.c (alpha_legitimize_address, alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to RTL_CONST_CALL_P. * config/s390/s390.c (s390_emit_tls_call_insn): Ditto. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto. * config/mips/mips.c (mips_call_tls_get_addr): Ditto. * cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P. * dce.c (deletable_insn_p): Allow non looping, non sibling, pure and const calls to be deleted. java: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (java_init_decl_processing): Change DECL_IS_PURE to DECL_PURE_P. cp: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY, DECL_LOOPING_CONST_OR_PURE_P attributes. * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to DECL_PURE_P. gfortran: 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> * trans-decl.c (gfc_get_extern_function_decl, build_function_decl): Rename DECL_IS_PURE to DECL_PURE_P. From-SVN: r135053
2008-05-07 22:48:07 +02:00
RTL_CONST_CALL_P (tmp) = 1;
tmp = get_insns ();
end_sequence ();
emit_libcall_block (tmp, target, reg, equiv);
}
/* Emit an X_floating library function call for arithmetic (+,-,*,/). */
void
alpha_emit_xfloating_arith (enum rtx_code code, rtx operands[])
{
rtx func;
int mode;
rtx out_operands[3];
func = alpha_lookup_xfloating_lib_func (code);
mode = alpha_compute_xfloating_mode_arg (code, alpha_fprm);
out_operands[0] = operands[1];
out_operands[1] = operands[2];
out_operands[2] = GEN_INT (mode);
alpha_emit_xfloating_libcall (func, operands[0], out_operands, 3,
gen_rtx_fmt_ee (code, TFmode, operands[1],
operands[2]));
}
/* Emit an X_floating library function call for a comparison. */
static rtx
alpha_emit_xfloating_compare (enum rtx_code *pcode, rtx op0, rtx op1)
{
enum rtx_code cmp_code, res_code;
rtx func, out, operands[2], note;
/* X_floating library comparison functions return
-1 unordered
0 false
1 true
Convert the compare against the raw return value. */
cmp_code = *pcode;
switch (cmp_code)
{
case UNORDERED:
cmp_code = EQ;
res_code = LT;
break;
case ORDERED:
cmp_code = EQ;
res_code = GE;
break;
case NE:
res_code = NE;
break;
case EQ:
case LT:
case GT:
case LE:
case GE:
res_code = GT;
break;
default:
gcc_unreachable ();
}
*pcode = res_code;
func = alpha_lookup_xfloating_lib_func (cmp_code);
operands[0] = op0;
operands[1] = op1;
out = gen_reg_rtx (DImode);
/* What's actually returned is -1,0,1, not a proper boolean value,
so use an EXPR_LIST as with a generic libcall instead of a
comparison type expression. */
note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX);
note = gen_rtx_EXPR_LIST (VOIDmode, op0, note);
note = gen_rtx_EXPR_LIST (VOIDmode, func, note);
alpha_emit_xfloating_libcall (func, out, operands, 2, note);
return out;
}
/* Emit an X_floating library function call for a conversion. */
void
alpha_emit_xfloating_cvt (enum rtx_code orig_code, rtx operands[])
{
int noperands = 1, mode;
rtx out_operands[2];
rtx func;
enum rtx_code code = orig_code;
if (code == UNSIGNED_FIX)
code = FIX;
func = alpha_lookup_xfloating_lib_func (code);
out_operands[0] = operands[1];
switch (code)
{
case FIX:
mode = alpha_compute_xfloating_mode_arg (code, ALPHA_FPRM_CHOP);
out_operands[1] = GEN_INT (mode);
noperands = 2;
break;
case FLOAT_TRUNCATE:
mode = alpha_compute_xfloating_mode_arg (code, alpha_fprm);
out_operands[1] = GEN_INT (mode);
noperands = 2;
break;
default:
break;
}
alpha_emit_xfloating_libcall (func, operands[0], out_operands, noperands,
gen_rtx_fmt_e (orig_code,
GET_MODE (operands[0]),
operands[1]));
}
/* Split a TImode or TFmode move from OP[1] to OP[0] into a pair of
DImode moves from OP[2,3] to OP[0,1]. If FIXUP_OVERLAP is true,
guarantee that the sequence
set (OP[0] OP[2])
set (OP[1] OP[3])
is valid. Naturally, output operand ordering is little-endian.
This is used by *movtf_internal and *movti_internal. */
void
alpha_split_tmode_pair (rtx operands[4], enum machine_mode mode,
bool fixup_overlap)
{
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
switch (GET_CODE (operands[1]))
{
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
case REG:
operands[3] = gen_rtx_REG (DImode, REGNO (operands[1]) + 1);
operands[2] = gen_rtx_REG (DImode, REGNO (operands[1]));
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
break;
case MEM:
operands[3] = adjust_address (operands[1], DImode, 8);
operands[2] = adjust_address (operands[1], DImode, 0);
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
break;
case CONST_INT:
case CONST_DOUBLE:
gcc_assert (operands[1] == CONST0_RTX (mode));
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
operands[2] = operands[3] = const0_rtx;
break;
default:
gcc_unreachable ();
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
switch (GET_CODE (operands[0]))
{
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
case REG:
operands[1] = gen_rtx_REG (DImode, REGNO (operands[0]) + 1);
operands[0] = gen_rtx_REG (DImode, REGNO (operands[0]));
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
break;
case MEM:
operands[1] = adjust_address (operands[0], DImode, 8);
operands[0] = adjust_address (operands[0], DImode, 0);
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
break;
default:
gcc_unreachable ();
}
if (fixup_overlap && reg_overlap_mentioned_p (operands[0], operands[3]))
{
rtx tmp;
tmp = operands[0], operands[0] = operands[1], operands[1] = tmp;
tmp = operands[2], operands[2] = operands[3], operands[3] = tmp;
}
}
/* Implement negtf2 or abstf2. Op0 is destination, op1 is source,
op2 is a register containing the sign bit, operation is the
logical operation to be performed. */
void
alpha_split_tfmode_frobsign (rtx operands[3], rtx (*operation) (rtx, rtx, rtx))
{
rtx high_bit = operands[2];
rtx scratch;
int move;
alpha_split_tmode_pair (operands, TFmode, false);
/* Detect three flavors of operand overlap. */
move = 1;
if (rtx_equal_p (operands[0], operands[2]))
move = 0;
else if (rtx_equal_p (operands[1], operands[2]))
{
if (rtx_equal_p (operands[0], high_bit))
move = 2;
else
move = -1;
}
if (move < 0)
emit_move_insn (operands[0], operands[2]);
/* ??? If the destination overlaps both source tf and high_bit, then
assume source tf is dead in its entirety and use the other half
for a scratch register. Otherwise "scratch" is just the proper
destination register. */
scratch = operands[move < 2 ? 1 : 3];
emit_insn ((*operation) (scratch, high_bit, operands[3]));
if (move > 0)
{
emit_move_insn (operands[0], operands[2]);
if (move > 1)
emit_move_insn (operands[1], scratch);
}
}
/* Use ext[wlq][lh] as the Architecture Handbook describes for extracting
unaligned data:
unsigned: signed:
word: ldq_u r1,X(r11) ldq_u r1,X(r11)
ldq_u r2,X+1(r11) ldq_u r2,X+1(r11)
lda r3,X(r11) lda r3,X+2(r11)
extwl r1,r3,r1 extql r1,r3,r1
extwh r2,r3,r2 extqh r2,r3,r2
or r1.r2.r1 or r1,r2,r1
sra r1,48,r1
long: ldq_u r1,X(r11) ldq_u r1,X(r11)
ldq_u r2,X+3(r11) ldq_u r2,X+3(r11)
lda r3,X(r11) lda r3,X(r11)
extll r1,r3,r1 extll r1,r3,r1
extlh r2,r3,r2 extlh r2,r3,r2
or r1.r2.r1 addl r1,r2,r1
quad: ldq_u r1,X(r11)
ldq_u r2,X+7(r11)
lda r3,X(r11)
extql r1,r3,r1
extqh r2,r3,r2
or r1.r2.r1
*/
void
alpha_expand_unaligned_load (rtx tgt, rtx mem, HOST_WIDE_INT size,
HOST_WIDE_INT ofs, int sign)
{
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
rtx meml, memh, addr, extl, exth, tmp, mema;
enum machine_mode mode;
if (TARGET_BWX && size == 2)
{
meml = adjust_address (mem, QImode, ofs);
memh = adjust_address (mem, QImode, ofs+1);
extl = gen_reg_rtx (DImode);
exth = gen_reg_rtx (DImode);
emit_insn (gen_zero_extendqidi2 (extl, meml));
emit_insn (gen_zero_extendqidi2 (exth, memh));
exth = expand_simple_binop (DImode, ASHIFT, exth, GEN_INT (8),
NULL, 1, OPTAB_LIB_WIDEN);
addr = expand_simple_binop (DImode, IOR, extl, exth,
NULL, 1, OPTAB_LIB_WIDEN);
if (sign && GET_MODE (tgt) != HImode)
{
addr = gen_lowpart (HImode, addr);
emit_insn (gen_extend_insn (tgt, addr, GET_MODE (tgt), HImode, 0));
}
else
{
if (GET_MODE (tgt) != DImode)
addr = gen_lowpart (GET_MODE (tgt), addr);
emit_move_insn (tgt, addr);
}
return;
}
meml = gen_reg_rtx (DImode);
memh = gen_reg_rtx (DImode);
addr = gen_reg_rtx (DImode);
extl = gen_reg_rtx (DImode);
exth = gen_reg_rtx (DImode);
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
mema = XEXP (mem, 0);
if (GET_CODE (mema) == LO_SUM)
mema = force_reg (Pmode, mema);
/* AND addresses cannot be in any alias set, since they may implicitly
alias surrounding code. Ideally we'd have some alias set that
covered all types except those with alignment 8 or higher. */
tmp = change_address (mem, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (mema, ofs),
GEN_INT (-8)));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (tmp, 0);
emit_move_insn (meml, tmp);
tmp = change_address (mem, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (mema, ofs + size - 1),
GEN_INT (-8)));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (tmp, 0);
emit_move_insn (memh, tmp);
if (sign && size == 2)
{
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
emit_move_insn (addr, plus_constant (mema, ofs+2));
emit_insn (gen_extql (extl, meml, addr));
emit_insn (gen_extqh (exth, memh, addr));
/* We must use tgt here for the target. Alpha-vms port fails if we use
addr for the target, because addr is marked as a pointer and combine
knows that pointers are always sign-extended 32-bit values. */
addr = expand_binop (DImode, ior_optab, extl, exth, tgt, 1, OPTAB_WIDEN);
addr = expand_binop (DImode, ashr_optab, addr, GEN_INT (48),
addr, 1, OPTAB_WIDEN);
}
else
{
emit_move_insn (addr, plus_constant (mema, ofs));
emit_insn (gen_extxl (extl, meml, GEN_INT (size*8), addr));
switch ((int) size)
2001-09-11 10:52:39 +02:00
{
case 2:
emit_insn (gen_extwh (exth, memh, addr));
mode = HImode;
break;
case 4:
emit_insn (gen_extlh (exth, memh, addr));
mode = SImode;
break;
case 8:
emit_insn (gen_extqh (exth, memh, addr));
mode = DImode;
break;
default:
gcc_unreachable ();
}
addr = expand_binop (mode, ior_optab, gen_lowpart (mode, extl),
gen_lowpart (mode, exth), gen_lowpart (mode, tgt),
sign, OPTAB_WIDEN);
}
if (addr != tgt)
emit_move_insn (tgt, gen_lowpart (GET_MODE (tgt), addr));
}
/* Similarly, use ins and msk instructions to perform unaligned stores. */
void
alpha_expand_unaligned_store (rtx dst, rtx src,
HOST_WIDE_INT size, HOST_WIDE_INT ofs)
{
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
rtx dstl, dsth, addr, insl, insh, meml, memh, dsta;
if (TARGET_BWX && size == 2)
{
if (src != const0_rtx)
{
dstl = gen_lowpart (QImode, src);
dsth = expand_simple_binop (DImode, LSHIFTRT, src, GEN_INT (8),
NULL, 1, OPTAB_LIB_WIDEN);
dsth = gen_lowpart (QImode, dsth);
}
else
dstl = dsth = const0_rtx;
meml = adjust_address (dst, QImode, ofs);
memh = adjust_address (dst, QImode, ofs+1);
emit_move_insn (meml, dstl);
emit_move_insn (memh, dsth);
return;
}
dstl = gen_reg_rtx (DImode);
dsth = gen_reg_rtx (DImode);
insl = gen_reg_rtx (DImode);
insh = gen_reg_rtx (DImode);
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
dsta = XEXP (dst, 0);
if (GET_CODE (dsta) == LO_SUM)
dsta = force_reg (Pmode, dsta);
/* AND addresses cannot be in any alias set, since they may implicitly
alias surrounding code. Ideally we'd have some alias set that
covered all types except those with alignment 8 or higher. */
meml = change_address (dst, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (dsta, ofs),
GEN_INT (-8)));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (meml, 0);
memh = change_address (dst, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (dsta, ofs + size - 1),
GEN_INT (-8)));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (memh, 0);
emit_move_insn (dsth, memh);
emit_move_insn (dstl, meml);
2001-09-11 10:52:39 +02:00
addr = copy_addr_to_reg (plus_constant (dsta, ofs));
if (src != CONST0_RTX (GET_MODE (src)))
{
emit_insn (gen_insxh (insh, gen_lowpart (DImode, src),
GEN_INT (size*8), addr));
switch ((int) size)
{
case 2:
emit_insn (gen_inswl (insl, gen_lowpart (HImode, src), addr));
break;
case 4:
emit_insn (gen_insll (insl, gen_lowpart (SImode, src), addr));
break;
case 8:
emit_insn (gen_insql (insl, gen_lowpart (DImode, src), addr));
break;
default:
gcc_unreachable ();
}
}
2001-09-11 10:52:39 +02:00
emit_insn (gen_mskxh (dsth, dsth, GEN_INT (size*8), addr));
2001-09-11 10:52:39 +02:00
switch ((int) size)
{
case 2:
emit_insn (gen_mskwl (dstl, dstl, addr));
break;
case 4:
emit_insn (gen_mskll (dstl, dstl, addr));
break;
case 8:
emit_insn (gen_mskql (dstl, dstl, addr));
break;
default:
gcc_unreachable ();
}
if (src != CONST0_RTX (GET_MODE (src)))
{
dsth = expand_binop (DImode, ior_optab, insh, dsth, dsth, 0, OPTAB_WIDEN);
dstl = expand_binop (DImode, ior_optab, insl, dstl, dstl, 0, OPTAB_WIDEN);
}
/* Must store high before low for degenerate case of aligned. */
emit_move_insn (memh, dsth);
emit_move_insn (meml, dstl);
}
/* The block move code tries to maximize speed by separating loads and
stores at the expense of register pressure: we load all of the data
before we store it back out. There are two secondary effects worth
mentioning, that this speeds copying to/from aligned and unaligned
buffers, and that it makes the code significantly easier to write. */
#define MAX_MOVE_WORDS 8
/* Load an integral number of consecutive unaligned quadwords. */
static void
alpha_expand_unaligned_load_words (rtx *out_regs, rtx smem,
HOST_WIDE_INT words, HOST_WIDE_INT ofs)
{
rtx const im8 = GEN_INT (-8);
rtx ext_tmps[MAX_MOVE_WORDS], data_regs[MAX_MOVE_WORDS+1];
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
rtx sreg, areg, tmp, smema;
HOST_WIDE_INT i;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
smema = XEXP (smem, 0);
if (GET_CODE (smema) == LO_SUM)
smema = force_reg (Pmode, smema);
/* Generate all the tmp registers we need. */
for (i = 0; i < words; ++i)
{
data_regs[i] = out_regs[i];
ext_tmps[i] = gen_reg_rtx (DImode);
}
data_regs[words] = gen_reg_rtx (DImode);
if (ofs != 0)
smem = adjust_address (smem, GET_MODE (smem), ofs);
/* Load up all of the source data. */
for (i = 0; i < words; ++i)
{
tmp = change_address (smem, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (smema, 8*i),
im8));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (tmp, 0);
emit_move_insn (data_regs[i], tmp);
}
tmp = change_address (smem, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (smema, 8*words - 1),
im8));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (tmp, 0);
emit_move_insn (data_regs[words], tmp);
/* Extract the half-word fragments. Unfortunately DEC decided to make
extxh with offset zero a noop instead of zeroing the register, so
we must take care of that edge condition ourselves with cmov. */
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
sreg = copy_addr_to_reg (smema);
areg = expand_binop (DImode, and_optab, sreg, GEN_INT (7), NULL,
1, OPTAB_WIDEN);
for (i = 0; i < words; ++i)
{
emit_insn (gen_extql (data_regs[i], data_regs[i], sreg));
emit_insn (gen_extqh (ext_tmps[i], data_regs[i+1], sreg));
emit_insn (gen_rtx_SET (VOIDmode, ext_tmps[i],
gen_rtx_IF_THEN_ELSE (DImode,
gen_rtx_EQ (DImode, areg,
const0_rtx),
const0_rtx, ext_tmps[i])));
}
/* Merge the half-words into whole words. */
for (i = 0; i < words; ++i)
{
out_regs[i] = expand_binop (DImode, ior_optab, data_regs[i],
ext_tmps[i], data_regs[i], 1, OPTAB_WIDEN);
}
}
/* Store an integral number of consecutive unaligned quadwords. DATA_REGS
may be NULL to store zeros. */
static void
alpha_expand_unaligned_store_words (rtx *data_regs, rtx dmem,
HOST_WIDE_INT words, HOST_WIDE_INT ofs)
{
rtx const im8 = GEN_INT (-8);
rtx ins_tmps[MAX_MOVE_WORDS];
rtx st_tmp_1, st_tmp_2, dreg;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
rtx st_addr_1, st_addr_2, dmema;
HOST_WIDE_INT i;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
dmema = XEXP (dmem, 0);
if (GET_CODE (dmema) == LO_SUM)
dmema = force_reg (Pmode, dmema);
/* Generate all the tmp registers we need. */
if (data_regs != NULL)
for (i = 0; i < words; ++i)
ins_tmps[i] = gen_reg_rtx(DImode);
st_tmp_1 = gen_reg_rtx(DImode);
st_tmp_2 = gen_reg_rtx(DImode);
if (ofs != 0)
dmem = adjust_address (dmem, GET_MODE (dmem), ofs);
st_addr_2 = change_address (dmem, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (dmema, words*8 - 1),
im8));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (st_addr_2, 0);
st_addr_1 = change_address (dmem, DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
gen_rtx_AND (DImode, dmema, im8));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (st_addr_1, 0);
/* Load up the destination end bits. */
emit_move_insn (st_tmp_2, st_addr_2);
emit_move_insn (st_tmp_1, st_addr_1);
/* Shift the input data into place. */
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
dreg = copy_addr_to_reg (dmema);
if (data_regs != NULL)
{
for (i = words-1; i >= 0; --i)
{
emit_insn (gen_insqh (ins_tmps[i], data_regs[i], dreg));
emit_insn (gen_insql (data_regs[i], data_regs[i], dreg));
}
for (i = words-1; i > 0; --i)
{
ins_tmps[i-1] = expand_binop (DImode, ior_optab, data_regs[i],
ins_tmps[i-1], ins_tmps[i-1], 1,
OPTAB_WIDEN);
}
}
/* Split and merge the ends with the destination data. */
emit_insn (gen_mskqh (st_tmp_2, st_tmp_2, dreg));
emit_insn (gen_mskql (st_tmp_1, st_tmp_1, dreg));
if (data_regs != NULL)
{
st_tmp_2 = expand_binop (DImode, ior_optab, st_tmp_2, ins_tmps[words-1],
st_tmp_2, 1, OPTAB_WIDEN);
st_tmp_1 = expand_binop (DImode, ior_optab, st_tmp_1, data_regs[0],
st_tmp_1, 1, OPTAB_WIDEN);
}
/* Store it all. */
emit_move_insn (st_addr_2, st_tmp_2);
for (i = words-1; i > 0; --i)
{
rtx tmp = change_address (dmem, DImode,
gen_rtx_AND (DImode,
plus_constant (dmema, i*8),
im8));
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (tmp, 0);
emit_move_insn (tmp, data_regs ? ins_tmps[i-1] : const0_rtx);
}
emit_move_insn (st_addr_1, st_tmp_1);
}
/* Expand string/block move operations.
operands[0] is the pointer to the destination.
operands[1] is the pointer to the source.
operands[2] is the number of bytes to move.
operands[3] is the alignment. */
int
alpha_expand_block_move (rtx operands[])
{
rtx bytes_rtx = operands[2];
rtx align_rtx = operands[3];
HOST_WIDE_INT orig_bytes = INTVAL (bytes_rtx);
HOST_WIDE_INT bytes = orig_bytes;
HOST_WIDE_INT src_align = INTVAL (align_rtx) * BITS_PER_UNIT;
HOST_WIDE_INT dst_align = src_align;
rtx orig_src = operands[1];
rtx orig_dst = operands[0];
rtx data_regs[2 * MAX_MOVE_WORDS + 16];
rtx tmp;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
unsigned int i, words, ofs, nregs = 0;
if (orig_bytes <= 0)
return 1;
else if (orig_bytes > MAX_MOVE_WORDS * UNITS_PER_WORD)
return 0;
/* Look for additional alignment information from recorded register info. */
tmp = XEXP (orig_src, 0);
if (REG_P (tmp))
src_align = MAX (src_align, REGNO_POINTER_ALIGN (REGNO (tmp)));
else if (GET_CODE (tmp) == PLUS
&& REG_P (XEXP (tmp, 0))
&& CONST_INT_P (XEXP (tmp, 1)))
{
unsigned HOST_WIDE_INT c = INTVAL (XEXP (tmp, 1));
unsigned int a = REGNO_POINTER_ALIGN (REGNO (XEXP (tmp, 0)));
if (a > src_align)
{
if (a >= 64 && c % 8 == 0)
src_align = 64;
else if (a >= 32 && c % 4 == 0)
src_align = 32;
else if (a >= 16 && c % 2 == 0)
src_align = 16;
}
}
tmp = XEXP (orig_dst, 0);
if (REG_P (tmp))
dst_align = MAX (dst_align, REGNO_POINTER_ALIGN (REGNO (tmp)));
else if (GET_CODE (tmp) == PLUS
&& REG_P (XEXP (tmp, 0))
&& CONST_INT_P (XEXP (tmp, 1)))
{
unsigned HOST_WIDE_INT c = INTVAL (XEXP (tmp, 1));
unsigned int a = REGNO_POINTER_ALIGN (REGNO (XEXP (tmp, 0)));
if (a > dst_align)
{
if (a >= 64 && c % 8 == 0)
dst_align = 64;
else if (a >= 32 && c % 4 == 0)
dst_align = 32;
else if (a >= 16 && c % 2 == 0)
dst_align = 16;
}
}
ofs = 0;
if (src_align >= 64 && bytes >= 8)
{
words = bytes / 8;
for (i = 0; i < words; ++i)
data_regs[nregs + i] = gen_reg_rtx (DImode);
for (i = 0; i < words; ++i)
emit_move_insn (data_regs[nregs + i],
adjust_address (orig_src, DImode, ofs + i * 8));
nregs += words;
bytes -= words * 8;
ofs += words * 8;
}
if (src_align >= 32 && bytes >= 4)
{
words = bytes / 4;
for (i = 0; i < words; ++i)
data_regs[nregs + i] = gen_reg_rtx (SImode);
for (i = 0; i < words; ++i)
emit_move_insn (data_regs[nregs + i],
adjust_address (orig_src, SImode, ofs + i * 4));
nregs += words;
bytes -= words * 4;
ofs += words * 4;
}
if (bytes >= 8)
{
words = bytes / 8;
for (i = 0; i < words+1; ++i)
data_regs[nregs + i] = gen_reg_rtx (DImode);
alpha_expand_unaligned_load_words (data_regs + nregs, orig_src,
words, ofs);
nregs += words;
bytes -= words * 8;
ofs += words * 8;
}
if (! TARGET_BWX && bytes >= 4)
{
data_regs[nregs++] = tmp = gen_reg_rtx (SImode);
alpha_expand_unaligned_load (tmp, orig_src, 4, ofs, 0);
bytes -= 4;
ofs += 4;
}
if (bytes >= 2)
{
if (src_align >= 16)
{
do {
data_regs[nregs++] = tmp = gen_reg_rtx (HImode);
emit_move_insn (tmp, adjust_address (orig_src, HImode, ofs));
bytes -= 2;
ofs += 2;
} while (bytes >= 2);
}
else if (! TARGET_BWX)
{
data_regs[nregs++] = tmp = gen_reg_rtx (HImode);
alpha_expand_unaligned_load (tmp, orig_src, 2, ofs, 0);
bytes -= 2;
ofs += 2;
}
}
while (bytes > 0)
{
data_regs[nregs++] = tmp = gen_reg_rtx (QImode);
emit_move_insn (tmp, adjust_address (orig_src, QImode, ofs));
bytes -= 1;
ofs += 1;
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (nregs <= ARRAY_SIZE (data_regs));
/* Now save it back out again. */
i = 0, ofs = 0;
/* Write out the data in whatever chunks reading the source allowed. */
if (dst_align >= 64)
{
while (i < nregs && GET_MODE (data_regs[i]) == DImode)
{
emit_move_insn (adjust_address (orig_dst, DImode, ofs),
data_regs[i]);
ofs += 8;
i++;
}
}
if (dst_align >= 32)
{
/* If the source has remaining DImode regs, write them out in
two pieces. */
while (i < nregs && GET_MODE (data_regs[i]) == DImode)
{
tmp = expand_binop (DImode, lshr_optab, data_regs[i], GEN_INT (32),
NULL_RTX, 1, OPTAB_WIDEN);
emit_move_insn (adjust_address (orig_dst, SImode, ofs),
gen_lowpart (SImode, data_regs[i]));
emit_move_insn (adjust_address (orig_dst, SImode, ofs + 4),
gen_lowpart (SImode, tmp));
ofs += 8;
i++;
}
while (i < nregs && GET_MODE (data_regs[i]) == SImode)
{
emit_move_insn (adjust_address (orig_dst, SImode, ofs),
data_regs[i]);
ofs += 4;
i++;
}
}
if (i < nregs && GET_MODE (data_regs[i]) == DImode)
{
/* Write out a remaining block of words using unaligned methods. */
for (words = 1; i + words < nregs; words++)
if (GET_MODE (data_regs[i + words]) != DImode)
break;
if (words == 1)
alpha_expand_unaligned_store (orig_dst, data_regs[i], 8, ofs);
else
alpha_expand_unaligned_store_words (data_regs + i, orig_dst,
words, ofs);
i += words;
ofs += words * 8;
}
/* Due to the above, this won't be aligned. */
/* ??? If we have more than one of these, consider constructing full
words in registers and using alpha_expand_unaligned_store_words. */
while (i < nregs && GET_MODE (data_regs[i]) == SImode)
{
alpha_expand_unaligned_store (orig_dst, data_regs[i], 4, ofs);
ofs += 4;
i++;
}
if (dst_align >= 16)
while (i < nregs && GET_MODE (data_regs[i]) == HImode)
{
emit_move_insn (adjust_address (orig_dst, HImode, ofs), data_regs[i]);
i++;
ofs += 2;
}
else
while (i < nregs && GET_MODE (data_regs[i]) == HImode)
{
alpha_expand_unaligned_store (orig_dst, data_regs[i], 2, ofs);
i++;
ofs += 2;
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
/* The remainder must be byte copies. */
while (i < nregs)
{
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (GET_MODE (data_regs[i]) == QImode);
emit_move_insn (adjust_address (orig_dst, QImode, ofs), data_regs[i]);
i++;
ofs += 1;
}
return 1;
}
int
alpha_expand_block_clear (rtx operands[])
{
rtx bytes_rtx = operands[1];
builtins.c: (expand_builtin_memset): Rewrite to support 'set_storage_via_setmem'. 2006-06-28 Adrian Straetling <straetling@de.ibm.com> * builtins.c: (expand_builtin_memset): Rewrite to support 'set_storage_via_setmem'. * expr.c: (enum insn_code setmem_optab): Define. (enum insn_code clrmem_optab): Remove. (set_storage_via_setmem): New function. (clear_storage_via_setmem): Remove. (clear_storage): Replace call to "clear_storage_via_clrmem" with "set_storage_via_setmem". * expr.h: (set_storage_via_setmem): Declare. (CLEAR_RATIO): Redefine using HAVE_setmemM. * optabs.h: (enum insn_code setmem_optab): Declare. (enum insn_code clrmem_optab): Remove. * optabs.c: (init_optabs): Initialize setmem_optab. (enum insn_code clrmem_optab): Remove. * genopinit.c: (otabs): Likewise. * doc/md.texi: Document new standard pattern 'setmem'. Remove 'clrmem'. * config/alpha/alpha.c: (alpha_expand_block_clear): Adjust 'operands' ordering. * config/frv/frv.c: (frv_expand_block_clear): Likewise. * config/rs6000/rs6000.c: (expand_block_clear): Likewise. * config/alpha/alpha.md: ("clrmemqi", "clrmemdi"): Rename to "setmemM". FAIL on operands[2]!=const0_rtx. Adjust 'operands' ordering. * config/avr/avr.md: ("clrmemhi"): Likewise. * config/frv/frv.md: ("clrmemsi"): Likewise. * config/i386/i386.md: ("clrmemsi", "clrmemdi"): Likewise. * config/pa/pa.md: ("clrmemsi", "clrmemdi"): Likewise. * config/rs6000/rs6000.md: ("clrmemsi"): Likewise. * config/s390/s390.md: ("clrmem<mode>"): Likewise. From-SVN: r101386
2005-06-28 21:56:23 +02:00
rtx align_rtx = operands[3];
HOST_WIDE_INT orig_bytes = INTVAL (bytes_rtx);
HOST_WIDE_INT bytes = orig_bytes;
HOST_WIDE_INT align = INTVAL (align_rtx) * BITS_PER_UNIT;
HOST_WIDE_INT alignofs = 0;
rtx orig_dst = operands[0];
rtx tmp;
int i, words, ofs = 0;
if (orig_bytes <= 0)
return 1;
if (orig_bytes > MAX_MOVE_WORDS * UNITS_PER_WORD)
return 0;
/* Look for stricter alignment. */
tmp = XEXP (orig_dst, 0);
if (REG_P (tmp))
align = MAX (align, REGNO_POINTER_ALIGN (REGNO (tmp)));
else if (GET_CODE (tmp) == PLUS
&& REG_P (XEXP (tmp, 0))
&& CONST_INT_P (XEXP (tmp, 1)))
{
HOST_WIDE_INT c = INTVAL (XEXP (tmp, 1));
int a = REGNO_POINTER_ALIGN (REGNO (XEXP (tmp, 0)));
if (a > align)
{
if (a >= 64)
align = a, alignofs = 8 - c % 8;
else if (a >= 32)
align = a, alignofs = 4 - c % 4;
else if (a >= 16)
align = a, alignofs = 2 - c % 2;
}
}
/* Handle an unaligned prefix first. */
if (alignofs > 0)
{
#if HOST_BITS_PER_WIDE_INT >= 64
/* Given that alignofs is bounded by align, the only time BWX could
generate three stores is for a 7 byte fill. Prefer two individual
stores over a load/mask/store sequence. */
if ((!TARGET_BWX || alignofs == 7)
&& align >= 32
&& !(alignofs == 4 && bytes >= 4))
{
enum machine_mode mode = (align >= 64 ? DImode : SImode);
int inv_alignofs = (align >= 64 ? 8 : 4) - alignofs;
rtx mem, tmp;
HOST_WIDE_INT mask;
mem = adjust_address (orig_dst, mode, ofs - inv_alignofs);
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (mem, 0);
mask = ~(~(HOST_WIDE_INT)0 << (inv_alignofs * 8));
if (bytes < alignofs)
{
mask |= ~(HOST_WIDE_INT)0 << ((inv_alignofs + bytes) * 8);
ofs += bytes;
bytes = 0;
}
else
{
bytes -= alignofs;
ofs += alignofs;
}
alignofs = 0;
tmp = expand_binop (mode, and_optab, mem, GEN_INT (mask),
NULL_RTX, 1, OPTAB_WIDEN);
emit_move_insn (mem, tmp);
}
#endif
if (TARGET_BWX && (alignofs & 1) && bytes >= 1)
{
emit_move_insn (adjust_address (orig_dst, QImode, ofs), const0_rtx);
bytes -= 1;
ofs += 1;
alignofs -= 1;
}
if (TARGET_BWX && align >= 16 && (alignofs & 3) == 2 && bytes >= 2)
{
emit_move_insn (adjust_address (orig_dst, HImode, ofs), const0_rtx);
bytes -= 2;
ofs += 2;
alignofs -= 2;
}
if (alignofs == 4 && bytes >= 4)
{
emit_move_insn (adjust_address (orig_dst, SImode, ofs), const0_rtx);
bytes -= 4;
ofs += 4;
alignofs = 0;
}
/* If we've not used the extra lead alignment information by now,
we won't be able to. Downgrade align to match what's left over. */
if (alignofs > 0)
{
alignofs = alignofs & -alignofs;
align = MIN (align, alignofs * BITS_PER_UNIT);
}
}
/* Handle a block of contiguous long-words. */
if (align >= 64 && bytes >= 8)
{
words = bytes / 8;
for (i = 0; i < words; ++i)
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
emit_move_insn (adjust_address (orig_dst, DImode, ofs + i * 8),
const0_rtx);
bytes -= words * 8;
ofs += words * 8;
}
/* If the block is large and appropriately aligned, emit a single
store followed by a sequence of stq_u insns. */
if (align >= 32 && bytes > 16)
{
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
rtx orig_dsta;
emit_move_insn (adjust_address (orig_dst, SImode, ofs), const0_rtx);
bytes -= 4;
ofs += 4;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
orig_dsta = XEXP (orig_dst, 0);
if (GET_CODE (orig_dsta) == LO_SUM)
orig_dsta = force_reg (Pmode, orig_dsta);
words = bytes / 8;
for (i = 0; i < words; ++i)
{
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
rtx mem
= change_address (orig_dst, DImode,
gen_rtx_AND (DImode,
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
plus_constant (orig_dsta, ofs + i*8),
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
GEN_INT (-8)));
set_mem_alias_set (mem, 0);
emit_move_insn (mem, const0_rtx);
}
/* Depending on the alignment, the first stq_u may have overlapped
with the initial stl, which means that the last stq_u didn't
write as much as it would appear. Leave those questionable bytes
unaccounted for. */
bytes -= words * 8 - 4;
ofs += words * 8 - 4;
}
/* Handle a smaller block of aligned words. */
if ((align >= 64 && bytes == 4)
|| (align == 32 && bytes >= 4))
{
words = bytes / 4;
for (i = 0; i < words; ++i)
emit_move_insn (adjust_address (orig_dst, SImode, ofs + i * 4),
const0_rtx);
bytes -= words * 4;
ofs += words * 4;
}
/* An unaligned block uses stq_u stores for as many as possible. */
if (bytes >= 8)
{
words = bytes / 8;
alpha_expand_unaligned_store_words (NULL, orig_dst, words, ofs);
bytes -= words * 8;
ofs += words * 8;
}
/* Next clean up any trailing pieces. */
#if HOST_BITS_PER_WIDE_INT >= 64
/* Count the number of bits in BYTES for which aligned stores could
be emitted. */
words = 0;
for (i = (TARGET_BWX ? 1 : 4); i * BITS_PER_UNIT <= align ; i <<= 1)
if (bytes & i)
words += 1;
/* If we have appropriate alignment (and it wouldn't take too many
instructions otherwise), mask out the bytes we need. */
if (TARGET_BWX ? words > 2 : bytes > 0)
{
if (align >= 64)
{
rtx mem, tmp;
HOST_WIDE_INT mask;
mem = adjust_address (orig_dst, DImode, ofs);
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (mem, 0);
mask = ~(HOST_WIDE_INT)0 << (bytes * 8);
tmp = expand_binop (DImode, and_optab, mem, GEN_INT (mask),
NULL_RTX, 1, OPTAB_WIDEN);
emit_move_insn (mem, tmp);
return 1;
}
else if (align >= 32 && bytes < 4)
{
rtx mem, tmp;
HOST_WIDE_INT mask;
mem = adjust_address (orig_dst, SImode, ofs);
alias.c (set_mem_alias_set): New function. * alias.c (set_mem_alias_set): New function. * rtl.h (set_mem_alias_set): Declare it. * builtins.c (expand_builtin_return_addr): Call it instead of using MEM_ALIAS_SET accessor. (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. (get_memory_rtx, expand_builtin_va_arg): Likewise. (expand_builtin_va_copy):Likewise. * caller-save.c (setup_save_areas): Likewise. * calls.c (compute_argument_addresses): Likewise. * explow.c (set_mem_attributes): Likewise. * expr.c (emit_single_push_insn, emit_push_insn): Likewise. (expand_assignment, store_constructor_field, store_field): Likewise. (expand_expr_unaligned): Likewise. * function.c (assign_stack_temp_for_type): Likewise. (put_reg_into_stack, gen_mem_addressof): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload, alter_reg): Likewise. * config/alpha/alpha.c (get_aligned_mem): Likewise. (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. (alpha_expand_unaligned_store): Likewise (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear, alpha_expand_prologue): Likewise. (alpha_expand_epilogue): Likewise. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. * config/i386/i386.c (legitimize_pic_address): Likewise. * config/i960/i960.c (setup_incoming_varargs): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. * config/mips/mips.c (mips_va_arg): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. (setup_incoming_varargs, rs6000_va_arg): Likewise. (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. (rs6000_emit_epilogue): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/v850/v850.c (v850_va_arg): Likewise. From-SVN: r43951
2001-07-11 22:35:55 +02:00
set_mem_alias_set (mem, 0);
mask = ~(HOST_WIDE_INT)0 << (bytes * 8);
tmp = expand_binop (SImode, and_optab, mem, GEN_INT (mask),
NULL_RTX, 1, OPTAB_WIDEN);
emit_move_insn (mem, tmp);
return 1;
}
}
#endif
if (!TARGET_BWX && bytes >= 4)
{
alpha_expand_unaligned_store (orig_dst, const0_rtx, 4, ofs);
bytes -= 4;
ofs += 4;
}
if (bytes >= 2)
{
if (align >= 16)
{
do {
emit_move_insn (adjust_address (orig_dst, HImode, ofs),
const0_rtx);
bytes -= 2;
ofs += 2;
} while (bytes >= 2);
}
else if (! TARGET_BWX)
{
alpha_expand_unaligned_store (orig_dst, const0_rtx, 2, ofs);
bytes -= 2;
ofs += 2;
}
}
while (bytes > 0)
{
emit_move_insn (adjust_address (orig_dst, QImode, ofs), const0_rtx);
bytes -= 1;
ofs += 1;
}
return 1;
}
2002-06-04 06:06:38 +02:00
/* Returns a mask so that zap(x, value) == x & mask. */
rtx
alpha_expand_zap_mask (HOST_WIDE_INT value)
2002-06-04 06:06:38 +02:00
{
rtx result;
int i;
if (HOST_BITS_PER_WIDE_INT >= 64)
{
HOST_WIDE_INT mask = 0;
for (i = 7; i >= 0; --i)
{
mask <<= 8;
if (!((value >> i) & 1))
mask |= 0xff;
}
result = gen_int_mode (mask, DImode);
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
else
2002-06-04 06:06:38 +02:00
{
HOST_WIDE_INT mask_lo = 0, mask_hi = 0;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (HOST_BITS_PER_WIDE_INT == 32);
2002-06-04 06:06:38 +02:00
for (i = 7; i >= 4; --i)
{
mask_hi <<= 8;
if (!((value >> i) & 1))
mask_hi |= 0xff;
}
for (i = 3; i >= 0; --i)
{
mask_lo <<= 8;
if (!((value >> i) & 1))
mask_lo |= 0xff;
}
result = immed_double_const (mask_lo, mask_hi, DImode);
}
return result;
}
void
alpha_expand_builtin_vector_binop (rtx (*gen) (rtx, rtx, rtx),
enum machine_mode mode,
rtx op0, rtx op1, rtx op2)
2002-06-04 06:06:38 +02:00
{
op0 = gen_lowpart (mode, op0);
if (op1 == const0_rtx)
op1 = CONST0_RTX (mode);
else
op1 = gen_lowpart (mode, op1);
if (op2 == const0_rtx)
2002-06-04 06:06:38 +02:00
op2 = CONST0_RTX (mode);
else
op2 = gen_lowpart (mode, op2);
emit_insn ((*gen) (op0, op1, op2));
}
/* A subroutine of the atomic operation splitters. Jump to LABEL if
COND is true. Mark the jump as unlikely to be taken. */
static void
emit_unlikely_jump (rtx cond, rtx label)
{
rtx very_unlikely = GEN_INT (REG_BR_PROB_BASE / 100 - 1);
rtx x;
x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx);
x = emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
add_reg_note (x, REG_BR_PROB, very_unlikely);
}
/* A subroutine of the atomic operation splitters. Emit a load-locked
instruction in MODE. */
static void
emit_load_locked (enum machine_mode mode, rtx reg, rtx mem)
{
rtx (*fn) (rtx, rtx) = NULL;
if (mode == SImode)
fn = gen_load_locked_si;
else if (mode == DImode)
fn = gen_load_locked_di;
emit_insn (fn (reg, mem));
}
/* A subroutine of the atomic operation splitters. Emit a store-conditional
instruction in MODE. */
static void
emit_store_conditional (enum machine_mode mode, rtx res, rtx mem, rtx val)
{
rtx (*fn) (rtx, rtx, rtx) = NULL;
if (mode == SImode)
fn = gen_store_conditional_si;
else if (mode == DImode)
fn = gen_store_conditional_di;
emit_insn (fn (res, mem, val));
}
/* Subroutines of the atomic operation splitters. Emit barriers
as needed for the memory MODEL. */
static void
alpha_pre_atomic_barrier (enum memmodel model)
{
switch (model)
{
case MEMMODEL_RELAXED:
case MEMMODEL_CONSUME:
case MEMMODEL_ACQUIRE:
break;
case MEMMODEL_RELEASE:
case MEMMODEL_ACQ_REL:
case MEMMODEL_SEQ_CST:
emit_insn (gen_memory_barrier ());
break;
default:
gcc_unreachable ();
}
}
static void
alpha_post_atomic_barrier (enum memmodel model)
{
switch (model)
{
case MEMMODEL_RELAXED:
case MEMMODEL_CONSUME:
case MEMMODEL_RELEASE:
break;
case MEMMODEL_ACQUIRE:
case MEMMODEL_ACQ_REL:
case MEMMODEL_SEQ_CST:
emit_insn (gen_memory_barrier ());
break;
default:
gcc_unreachable ();
}
}
/* A subroutine of the atomic operation splitters. Emit an insxl
instruction in MODE. */
static rtx
emit_insxl (enum machine_mode mode, rtx op1, rtx op2)
{
rtx ret = gen_reg_rtx (DImode);
rtx (*fn) (rtx, rtx, rtx);
switch (mode)
{
case QImode:
fn = gen_insbl;
break;
case HImode:
fn = gen_inswl;
break;
case SImode:
fn = gen_insll;
break;
case DImode:
fn = gen_insql;
break;
default:
gcc_unreachable ();
}
op1 = force_reg (mode, op1);
emit_insn (fn (ret, op1, op2));
return ret;
}
/* Expand an atomic fetch-and-operate pattern. CODE is the binary operation
to perform. MEM is the memory on which to operate. VAL is the second
operand of the binary operator. BEFORE and AFTER are optional locations to
return the value of MEM either before of after the operation. SCRATCH is
a scratch register. */
void
alpha_split_atomic_op (enum rtx_code code, rtx mem, rtx val, rtx before,
rtx after, rtx scratch, enum memmodel model)
{
enum machine_mode mode = GET_MODE (mem);
rtx label, x, cond = gen_rtx_REG (DImode, REGNO (scratch));
alpha_pre_atomic_barrier (model);
label = gen_label_rtx ();
emit_label (label);
label = gen_rtx_LABEL_REF (DImode, label);
if (before == NULL)
before = scratch;
emit_load_locked (mode, before, mem);
if (code == NOT)
{
x = gen_rtx_AND (mode, before, val);
emit_insn (gen_rtx_SET (VOIDmode, val, x));
x = gen_rtx_NOT (mode, val);
}
else
x = gen_rtx_fmt_ee (code, mode, before, val);
if (after)
emit_insn (gen_rtx_SET (VOIDmode, after, copy_rtx (x)));
emit_insn (gen_rtx_SET (VOIDmode, scratch, x));
emit_store_conditional (mode, cond, mem, scratch);
x = gen_rtx_EQ (DImode, cond, const0_rtx);
emit_unlikely_jump (x, label);
alpha_post_atomic_barrier (model);
}
/* Expand a compare and swap operation. */
void
alpha_split_compare_and_swap (rtx operands[])
{
rtx cond, retval, mem, oldval, newval;
bool is_weak;
enum memmodel mod_s, mod_f;
enum machine_mode mode;
rtx label1, label2, x;
cond = operands[0];
retval = operands[1];
mem = operands[2];
oldval = operands[3];
newval = operands[4];
is_weak = (operands[5] != const0_rtx);
mod_s = (enum memmodel) INTVAL (operands[6]);
mod_f = (enum memmodel) INTVAL (operands[7]);
mode = GET_MODE (mem);
alpha_pre_atomic_barrier (mod_s);
label1 = NULL_RTX;
if (!is_weak)
{
label1 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_label (XEXP (label1, 0));
}
label2 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_load_locked (mode, retval, mem);
x = gen_lowpart (DImode, retval);
if (oldval == const0_rtx)
{
emit_move_insn (cond, const0_rtx);
x = gen_rtx_NE (DImode, x, const0_rtx);
}
else
{
x = gen_rtx_EQ (DImode, x, oldval);
emit_insn (gen_rtx_SET (VOIDmode, cond, x));
x = gen_rtx_EQ (DImode, cond, const0_rtx);
}
emit_unlikely_jump (x, label2);
emit_move_insn (cond, newval);
emit_store_conditional (mode, cond, mem, gen_lowpart (mode, cond));
if (!is_weak)
{
x = gen_rtx_EQ (DImode, cond, const0_rtx);
emit_unlikely_jump (x, label1);
}
if (mod_f != MEMMODEL_RELAXED)
emit_label (XEXP (label2, 0));
alpha_post_atomic_barrier (mod_s);
if (mod_f == MEMMODEL_RELAXED)
emit_label (XEXP (label2, 0));
}
void
alpha_expand_compare_and_swap_12 (rtx operands[])
{
rtx cond, dst, mem, oldval, newval, is_weak, mod_s, mod_f;
enum machine_mode mode;
rtx addr, align, wdst;
rtx (*gen) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
cond = operands[0];
dst = operands[1];
mem = operands[2];
oldval = operands[3];
newval = operands[4];
is_weak = operands[5];
mod_s = operands[6];
mod_f = operands[7];
mode = GET_MODE (mem);
/* We forced the address into a register via mem_noofs_operand. */
addr = XEXP (mem, 0);
gcc_assert (register_operand (addr, DImode));
align = expand_simple_binop (Pmode, AND, addr, GEN_INT (-8),
NULL_RTX, 1, OPTAB_DIRECT);
oldval = convert_modes (DImode, mode, oldval, 1);
if (newval != const0_rtx)
newval = emit_insxl (mode, newval, addr);
wdst = gen_reg_rtx (DImode);
if (mode == QImode)
gen = gen_atomic_compare_and_swapqi_1;
else
gen = gen_atomic_compare_and_swaphi_1;
emit_insn (gen (cond, wdst, mem, oldval, newval, align,
is_weak, mod_s, mod_f));
emit_move_insn (dst, gen_lowpart (mode, wdst));
}
void
alpha_split_compare_and_swap_12 (rtx operands[])
{
rtx cond, dest, orig_mem, oldval, newval, align, scratch;
enum machine_mode mode;
bool is_weak;
enum memmodel mod_s, mod_f;
rtx label1, label2, mem, addr, width, mask, x;
cond = operands[0];
dest = operands[1];
orig_mem = operands[2];
oldval = operands[3];
newval = operands[4];
align = operands[5];
is_weak = (operands[6] != const0_rtx);
mod_s = (enum memmodel) INTVAL (operands[7]);
mod_f = (enum memmodel) INTVAL (operands[8]);
scratch = operands[9];
mode = GET_MODE (orig_mem);
addr = XEXP (orig_mem, 0);
mem = gen_rtx_MEM (DImode, align);
MEM_VOLATILE_P (mem) = MEM_VOLATILE_P (orig_mem);
if (MEM_ALIAS_SET (orig_mem) == ALIAS_SET_MEMORY_BARRIER)
set_mem_alias_set (mem, ALIAS_SET_MEMORY_BARRIER);
alpha_pre_atomic_barrier (mod_s);
label1 = NULL_RTX;
if (!is_weak)
{
label1 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_label (XEXP (label1, 0));
}
label2 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_load_locked (DImode, scratch, mem);
width = GEN_INT (GET_MODE_BITSIZE (mode));
mask = GEN_INT (mode == QImode ? 0xff : 0xffff);
emit_insn (gen_extxl (dest, scratch, width, addr));
if (oldval == const0_rtx)
{
emit_move_insn (cond, const0_rtx);
x = gen_rtx_NE (DImode, dest, const0_rtx);
}
else
{
x = gen_rtx_EQ (DImode, dest, oldval);
emit_insn (gen_rtx_SET (VOIDmode, cond, x));
x = gen_rtx_EQ (DImode, cond, const0_rtx);
}
emit_unlikely_jump (x, label2);
emit_insn (gen_mskxl (cond, scratch, mask, addr));
if (newval != const0_rtx)
emit_insn (gen_iordi3 (cond, cond, newval));
emit_store_conditional (DImode, cond, mem, cond);
if (!is_weak)
{
x = gen_rtx_EQ (DImode, cond, const0_rtx);
emit_unlikely_jump (x, label1);
}
if (mod_f != MEMMODEL_RELAXED)
emit_label (XEXP (label2, 0));
alpha_post_atomic_barrier (mod_s);
if (mod_f == MEMMODEL_RELAXED)
emit_label (XEXP (label2, 0));
}
/* Expand an atomic exchange operation. */
void
alpha_split_atomic_exchange (rtx operands[])
{
rtx retval, mem, val, scratch;
enum memmodel model;
enum machine_mode mode;
rtx label, x, cond;
retval = operands[0];
mem = operands[1];
val = operands[2];
model = (enum memmodel) INTVAL (operands[3]);
scratch = operands[4];
mode = GET_MODE (mem);
cond = gen_lowpart (DImode, scratch);
alpha_pre_atomic_barrier (model);
label = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_label (XEXP (label, 0));
emit_load_locked (mode, retval, mem);
emit_move_insn (scratch, val);
emit_store_conditional (mode, cond, mem, scratch);
x = gen_rtx_EQ (DImode, cond, const0_rtx);
emit_unlikely_jump (x, label);
alpha_post_atomic_barrier (model);
}
void
alpha_expand_atomic_exchange_12 (rtx operands[])
{
rtx dst, mem, val, model;
enum machine_mode mode;
rtx addr, align, wdst;
rtx (*gen) (rtx, rtx, rtx, rtx, rtx);
dst = operands[0];
mem = operands[1];
val = operands[2];
model = operands[3];
mode = GET_MODE (mem);
/* We forced the address into a register via mem_noofs_operand. */
addr = XEXP (mem, 0);
gcc_assert (register_operand (addr, DImode));
align = expand_simple_binop (Pmode, AND, addr, GEN_INT (-8),
NULL_RTX, 1, OPTAB_DIRECT);
/* Insert val into the correct byte location within the word. */
if (val != const0_rtx)
val = emit_insxl (mode, val, addr);
wdst = gen_reg_rtx (DImode);
if (mode == QImode)
gen = gen_atomic_exchangeqi_1;
else
gen = gen_atomic_exchangehi_1;
emit_insn (gen (wdst, mem, val, align, model));
emit_move_insn (dst, gen_lowpart (mode, wdst));
}
void
alpha_split_atomic_exchange_12 (rtx operands[])
{
rtx dest, orig_mem, addr, val, align, scratch;
rtx label, mem, width, mask, x;
enum machine_mode mode;
enum memmodel model;
dest = operands[0];
orig_mem = operands[1];
val = operands[2];
align = operands[3];
model = (enum memmodel) INTVAL (operands[4]);
scratch = operands[5];
mode = GET_MODE (orig_mem);
addr = XEXP (orig_mem, 0);
mem = gen_rtx_MEM (DImode, align);
MEM_VOLATILE_P (mem) = MEM_VOLATILE_P (orig_mem);
if (MEM_ALIAS_SET (orig_mem) == ALIAS_SET_MEMORY_BARRIER)
set_mem_alias_set (mem, ALIAS_SET_MEMORY_BARRIER);
alpha_pre_atomic_barrier (model);
label = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_label (XEXP (label, 0));
emit_load_locked (DImode, scratch, mem);
width = GEN_INT (GET_MODE_BITSIZE (mode));
mask = GEN_INT (mode == QImode ? 0xff : 0xffff);
emit_insn (gen_extxl (dest, scratch, width, addr));
emit_insn (gen_mskxl (scratch, scratch, mask, addr));
if (val != const0_rtx)
emit_insn (gen_iordi3 (scratch, scratch, val));
emit_store_conditional (DImode, scratch, mem, scratch);
x = gen_rtx_EQ (DImode, scratch, const0_rtx);
emit_unlikely_jump (x, label);
alpha_post_atomic_barrier (model);
}
1992-10-26 22:01:33 +01:00
/* Adjust the cost of a scheduling dependency. Return the new cost of
a dependency LINK or INSN on DEP_INSN. COST is the current cost. */
haifa-sched.c: Convert to target hooks. * haifa-sched.c: Convert to target hooks. Macros replaced are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_FINISH, and HAVE_cycle_display. * target-def.h (TARGET_SCHED_ADJUST_COST, TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): New hook #defines to be overridden. (TARGET_SCHED): Bring them all together. (TARGET_INITIALIZER): Update. * target.h: Don't forward declare struct rtx_def. Use 'rtx' instead of 'struct rtx_def *' throughout. (struct sched): New set of hooks for the scheduler. * Makefile.in (haifa-sched.o): Depend on target.h. * doc/tm.texi: Document the new scheduler hooks, together in their own section, instead of scattered around. Fix a bunch of underfull/overfull hboxes. * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, sparc.h: Don't define any of the old scheduler macros. * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, sparc.c: Create hook functions from code extracted from corresponding target header, or make existing hooks static, as appropriate. Set the appropriate entries in targetm. * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, rs6000-protos.h, s390-protos.h, sparc-protos.h: Remove prototypes for functions which are now static. * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and related gunk; the Haifa scheduler is now the only choice. From-SVN: r45009
2001-08-18 22:25:54 +02:00
static int
alpha_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
1992-10-26 22:01:33 +01:00
{
enum attr_type dep_insn_type;
1992-10-26 22:01:33 +01:00
/* If the dependence is an anti-dependence, there is no cost. For an
output dependence, there is sometimes a cost, but it doesn't seem
worth handling those few cases. */
if (REG_NOTE_KIND (link) != 0)
return cost;
1992-10-26 22:01:33 +01:00
/* If we can't recognize the insns, we can't really do anything. */
if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0)
return cost;
dep_insn_type = get_attr_type (dep_insn);
/* Bring in the user-defined memory latency. */
genattrtab.c (expand_units): For large nr opclasses, expand function_units_used with ORX to prevent blowups. * genattrtab.c (expand_units): For large nr opclasses, expand function_units_used with ORX to prevent blowups. Tag with FFS. (num_unit_opclasses): New variable. (gen_unit): Update it. (enum operator): Add ORX_OP. (operate_exp): Treat ORX as or, except don't expand across an if. Reuse number rtx's after operating on them. (check_attr_value): Accept IOR, AND, & FFS. (write_test_expr): Transmute `in_comparison' to `flags'. Allow for attribute value caching. Handle CONST_STRING, IF_THEN_ELSE. (write_expr_attr_cache, write_toplevel_expr): New functions. (write_attr_get): Handle FFS-tagged expressions. (make_canonical): Don't expand const attributes. (convert_const_symbol_ref): Dike out. (evaluate_eq_attr): Handle SYMBOL_REF. (main): Don't emit get_attr_foo for const attributes. * alpha.c (override_options): Reinstate PROCESSOR_EV6. (alpha_adjust_cost): Add EV6 tuning; streamline EV5 tests. * alpha.h (REGISTER_MOVE_COST): Increase ftoi/itof cost slightly. * alpha.md: Redo all of the scheduling, adding EV6 support, and combining function units where possible. (attr "type"): Split loads, stores, cmov into int/fp. Combine multiplies and divides. Add EV6 sqrt, ftoi, itof. (attr "opsize"): New attribute. (sqrtsf2-1, sqrtdf2-1): Provide proper TP_INSN patterns. (movsf2-[12], movdf2-[12]): Provide CIX varients; don't allow CIX to control register allocation. (movsi2-1, movdi2-1): Likewise. From-SVN: r17212
1997-12-23 06:34:27 +01:00
if (dep_insn_type == TYPE_ILD
|| dep_insn_type == TYPE_FLD
|| dep_insn_type == TYPE_LDSYM)
cost += alpha_memory_latency-1;
/* Everything else handled in DFA bypasses now. */
1992-10-26 22:01:33 +01:00
return cost;
}
haifa-sched.c: Convert to target hooks. * haifa-sched.c: Convert to target hooks. Macros replaced are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_FINISH, and HAVE_cycle_display. * target-def.h (TARGET_SCHED_ADJUST_COST, TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): New hook #defines to be overridden. (TARGET_SCHED): Bring them all together. (TARGET_INITIALIZER): Update. * target.h: Don't forward declare struct rtx_def. Use 'rtx' instead of 'struct rtx_def *' throughout. (struct sched): New set of hooks for the scheduler. * Makefile.in (haifa-sched.o): Depend on target.h. * doc/tm.texi: Document the new scheduler hooks, together in their own section, instead of scattered around. Fix a bunch of underfull/overfull hboxes. * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, sparc.h: Don't define any of the old scheduler macros. * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, sparc.c: Create hook functions from code extracted from corresponding target header, or make existing hooks static, as appropriate. Set the appropriate entries in targetm. * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, rs6000-protos.h, s390-protos.h, sparc-protos.h: Remove prototypes for functions which are now static. * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and related gunk; the Haifa scheduler is now the only choice. From-SVN: r45009
2001-08-18 22:25:54 +02:00
/* The number of instructions that can be issued per cycle. */
haifa-sched.c: Convert to target hooks. * haifa-sched.c: Convert to target hooks. Macros replaced are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_FINISH, and HAVE_cycle_display. * target-def.h (TARGET_SCHED_ADJUST_COST, TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): New hook #defines to be overridden. (TARGET_SCHED): Bring them all together. (TARGET_INITIALIZER): Update. * target.h: Don't forward declare struct rtx_def. Use 'rtx' instead of 'struct rtx_def *' throughout. (struct sched): New set of hooks for the scheduler. * Makefile.in (haifa-sched.o): Depend on target.h. * doc/tm.texi: Document the new scheduler hooks, together in their own section, instead of scattered around. Fix a bunch of underfull/overfull hboxes. * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, sparc.h: Don't define any of the old scheduler macros. * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, sparc.c: Create hook functions from code extracted from corresponding target header, or make existing hooks static, as appropriate. Set the appropriate entries in targetm. * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, rs6000-protos.h, s390-protos.h, sparc-protos.h: Remove prototypes for functions which are now static. * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and related gunk; the Haifa scheduler is now the only choice. From-SVN: r45009
2001-08-18 22:25:54 +02:00
static int
alpha_issue_rate (void)
haifa-sched.c: Convert to target hooks. * haifa-sched.c: Convert to target hooks. Macros replaced are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_FINISH, and HAVE_cycle_display. * target-def.h (TARGET_SCHED_ADJUST_COST, TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): New hook #defines to be overridden. (TARGET_SCHED): Bring them all together. (TARGET_INITIALIZER): Update. * target.h: Don't forward declare struct rtx_def. Use 'rtx' instead of 'struct rtx_def *' throughout. (struct sched): New set of hooks for the scheduler. * Makefile.in (haifa-sched.o): Depend on target.h. * doc/tm.texi: Document the new scheduler hooks, together in their own section, instead of scattered around. Fix a bunch of underfull/overfull hboxes. * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, sparc.h: Don't define any of the old scheduler macros. * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, sparc.c: Create hook functions from code extracted from corresponding target header, or make existing hooks static, as appropriate. Set the appropriate entries in targetm. * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, rs6000-protos.h, s390-protos.h, sparc-protos.h: Remove prototypes for functions which are now static. * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and related gunk; the Haifa scheduler is now the only choice. From-SVN: r45009
2001-08-18 22:25:54 +02:00
{
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
return (alpha_tune == PROCESSOR_EV4 ? 2 : 4);
haifa-sched.c: Convert to target hooks. * haifa-sched.c: Convert to target hooks. Macros replaced are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_FINISH, and HAVE_cycle_display. * target-def.h (TARGET_SCHED_ADJUST_COST, TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): New hook #defines to be overridden. (TARGET_SCHED): Bring them all together. (TARGET_INITIALIZER): Update. * target.h: Don't forward declare struct rtx_def. Use 'rtx' instead of 'struct rtx_def *' throughout. (struct sched): New set of hooks for the scheduler. * Makefile.in (haifa-sched.o): Depend on target.h. * doc/tm.texi: Document the new scheduler hooks, together in their own section, instead of scattered around. Fix a bunch of underfull/overfull hboxes. * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, sparc.h: Don't define any of the old scheduler macros. * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, sparc.c: Create hook functions from code extracted from corresponding target header, or make existing hooks static, as appropriate. Set the appropriate entries in targetm. * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, rs6000-protos.h, s390-protos.h, sparc-protos.h: Remove prototypes for functions which are now static. * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and related gunk; the Haifa scheduler is now the only choice. From-SVN: r45009
2001-08-18 22:25:54 +02:00
}
/* How many alternative schedules to try. This should be as wide as the
scheduling freedom in the DFA, but no wider. Making this value too
large results extra work for the scheduler.
For EV4, loads can be issued to either IB0 or IB1, thus we have 2
alternative schedules. For EV5, we can choose between E0/E1 and
FA/FM. For EV6, an arithmetic insn can be issued to U0/U1/L0/L1. */
static int
alpha_multipass_dfa_lookahead (void)
{
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
return (alpha_tune == PROCESSOR_EV6 ? 4 : 2);
}
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
/* Machine-specific function data. */
struct GTY(()) alpha_links;
hashtab.h: Update GTY annotations to new syntax 2009-04-21 Taras Glek <tglek@mozilla.com> * include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise From-SVN: r146607
2009-04-22 20:29:36 +02:00
struct GTY(()) machine_function
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
{
/* For OSF. */
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
const char *some_ld_name;
Remove obsolete Tru64 UNIX V5.1B support libstdc++-v3: * configure.host: Remove osf* handling. * config/os/osf: Remove. * doc/xml/manual/using.xml: Remove OSF reference. * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* handling. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. libobjc: * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. * configure: Regenerate. * thr.c (_XOPEN_SOURCE): Define unconditionally. libjava: * configure.ac (alpha*-dec-osf*): Remove. * configure: Regenerate. * configure.host (alpha*-dec-osf*): Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use IPV6_MULTICAST_IF unconditionally. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of _Jv_accept. * include/posix-signal.h [__alpha__ && __osf__]: Remove. * include/posix.h (_POSIX_PII_SOCKET): Don't define. (_Jv_accept): Remove. * java/io/File.java (File._access): Rename to access. Change callers. (File._stat): Likewise. * java/io/File.h: Regenerate. * classpath/lib/java/io/File.class: Regenerate. * java/io/natFilePosix.cc (java::io::File::_access): Rename to access. (java::io::File::_stat): Rename to stat. * java/io/natFileWin32.cc: Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Remove alpha*-dec-osf* handling. * testsuite/libjava.jvmti/jvmti-interp.exp (gcj_jni_compile_c_to_so): Likewise. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. libitm: * configure.tgt (*-*-osf*): Remove. * configure: Regenerate. libgomp: * configure.tgt (alpha*-dec-osf*): Remove. * config/osf/sem.h: Remove. * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. libgfortran: * configure.ac: Remove Tru64 reference. * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* handling. * configure: Regenerate. * intrinsics/c99_functions.c [__osf__]: Remove. libgcc: * config.host: Remove alpha*-dec-osf5.1* handling. * config/alpha/gthr-posix.c: Remove. * config/alpha/libgcc-osf5.ver: Remove. * config/alpha/osf5-unwind.h: Remove. * config/alpha/t-osf-pthread: Remove. * config/alpha/t-slibgcc-osf: Remove. * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. * mkmap-flat.awk: Remove osf_export handling. gnattools: * configure.ac: Remove alpha*-dec-osf* handling. * configure: Regenerate. gcc/testsuite: * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. Adapt line numbers. * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/spbp.C: Likewise. * g++.dg/ext/label13.C: Likewise. * g++.dg/guality/guality.exp: Likewise. * g++.dg/other/anon5.C: Likewise. * g++.dg/other/pragma-ep-1.C: Remove. * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. * g++.dg/warn/pr31246.C: Likewise. * g++.dg/warn/weak1.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.ext/attrib5.C: Likewise. * gcc.c-torture/compile/limits-declparen.c: Likewise. * gcc.c-torture/compile/limits-pointer.c: Likewise. * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. * gcc.dg/c99-tgmath-1.c: Likewise. * gcc.dg/c99-tgmath-2.c: Likewise. * gcc.dg/c99-tgmath-3.c: Likewise. * gcc.dg/c99-tgmath-4.c: Likewise. * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * gcc.dg/debug/pr49032.c: Likewise. * gcc.dg/guality/guality.exp: Likewise. * gcc.dg/intmax_t-1.c: Likewise. * gcc.dg/pr48616.c: Likewise. * gcc.dg/pragma-ep-1.c: Remove. * gcc.dg/pragma-ep-2.c: Remove. * gcc.dg/pragma-ep-3.c: Remove. * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. * gcc.misc-tests/gcov-14.c: Likewise. * gfortran.dg/guality/guality.exp: Likewise. * lib/target-supports.exp (check_weak_available): Likewise. (add_options_for_tls): Likewise. (check_ascii_locale_available): Likewise. * obj-c++.dg/dwarf-2.mm: Likewise. * objc.dg/dwarf-1.m: Likewise. * objc.dg/dwarf-2.m: Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix handling. * c-pragma.c (handle_pragma_extern_prefix): Remove. (init_pragma): Don't register extern_prefix. gcc/po: * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. gcc: * config.gcc (alpha*-dec-osf5.1*): Remove. * config.host (alpha*-dec-osf*): Remove. * configure.ac (*-*-osf*): Remove. (alpha*-dec-osf*): Remove. * configure: Regenerate. * config/alpha/host-osf.c, config/alpha/osf5.h, config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: Remove. * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. * config/alpha/alpha.c (struct machine_function): Update comment. (alpha_start_function): Remove Tru64 UNIX as handling for max_frame_size. * config/alpha/alpha.md ("exception_receiver"): Remove TARGET_LD_BUGGY_LDGP. ("*exception_receiver_2"): Likewise. * except.c (finish_eh_generation): Remove Tru64 reference. * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. * target.def (handle_pragma_extern_prefix): Remove. * Makefile.in (mips-tfile.o-warn): Remove. (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. * mips-tdump.c, mips-tfile.c: Remove. * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma extern_prefix. * doc/install.texi (Binaries): Remove Tru64 UNIX reference. (Specific, alpha*-dec-osf5.1): Note removal. * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Remove. * doc/tm.texi: Regenerate. * doc/trouble.texi (Cross-Compiler Problems): Remove. gcc/ada: * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, system-tru64.ads: Remove. * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: Remove. [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. * env.c [__alpha__ && __osf__]: Remove. * gsocket.h (_OSF_SOURCE): Remove. (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. * init.c [__alpha__ && __osf__]: Remove. * link.c [__osf__]: Remove. * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. [__osf__ && !_SS_MAXSIZE]: Remove. * sysdep.c [__osf__]: Remove. * terminals.c [__alpha__ && __osf__]: Remove. [OSF1]: Remove. * g-traceb.ads: Remove Tru64 reference. * g-trasym.ads: Likewise. * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. (Summary of Run-Time Configurations): Likewise. * memtrack.adb: Likewise. fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove alpha-dec-osf5.1. config: * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. toplevel: * MAINTAINERS (OS Port Maintainers): Remove osf. * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. From-SVN: r185240
2012-03-12 16:35:56 +01:00
/* For flag_reorder_blocks_and_partition. */
rtx gp_save_rtx;
/* For VMS condition handlers. */
bool uses_condition_handler;
/* Linkage entries. */
splay_tree GTY ((param1_is (char *), param2_is (struct alpha_links *)))
links;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
};
/* How to allocate a 'struct machine_function'. */
2001-09-11 10:52:39 +02:00
static struct machine_function *
alpha_init_machine_status (void)
2001-09-11 10:52:39 +02:00
{
utils.c (init_gnat_to_gnu): Use typed GC allocation. gcc/ada: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. From-SVN: r160425
2010-06-08 09:25:24 +02:00
return ggc_alloc_cleared_machine_function ();
2001-09-11 10:52:39 +02:00
}
/* Support for frame based VMS condition handlers. */
/* A VMS condition handler may be established for a function with a call to
__builtin_establish_vms_condition_handler, and cancelled with a call to
__builtin_revert_vms_condition_handler.
The VMS Condition Handling Facility knows about the existence of a handler
from the procedure descriptor .handler field. As the VMS native compilers,
we store the user specified handler's address at a fixed location in the
stack frame and point the procedure descriptor at a common wrapper which
fetches the real handler's address and issues an indirect call.
The indirection wrapper is "__gcc_shell_handler", provided by libgcc.
We force the procedure kind to PT_STACK, and the fixed frame location is
fp+8, just before the register save area. We use the handler_data field in
the procedure descriptor to state the fp offset at which the installed
handler address can be found. */
#define VMS_COND_HANDLER_FP_OFFSET 8
/* Expand code to store the currently installed user VMS condition handler
into TARGET and install HANDLER as the new condition handler. */
void
alpha_expand_builtin_establish_vms_condition_handler (rtx target, rtx handler)
{
rtx handler_slot_address
= plus_constant (hard_frame_pointer_rtx, VMS_COND_HANDLER_FP_OFFSET);
rtx handler_slot
= gen_rtx_MEM (DImode, handler_slot_address);
emit_move_insn (target, handler_slot);
emit_move_insn (handler_slot, handler);
/* Notify the start/prologue/epilogue emitters that the condition handler
slot is needed. In addition to reserving the slot space, this will force
the procedure kind to PT_STACK so ensure that the hard_frame_pointer_rtx
use above is correct. */
cfun->machine->uses_condition_handler = true;
}
/* Expand code to store the current VMS condition handler into TARGET and
nullify it. */
void
alpha_expand_builtin_revert_vms_condition_handler (rtx target)
{
/* We implement this by establishing a null condition handler, with the tiny
side effect of setting uses_condition_handler. This is a little bit
pessimistic if no actual builtin_establish call is ever issued, which is
not a real problem and expected never to happen anyway. */
alpha_expand_builtin_establish_vms_condition_handler (target, const0_rtx);
}
/* Functions to save and restore alpha_return_addr_rtx. */
/* Start the ball rolling with RETURN_ADDR_RTX. */
rtx
alpha_return_addr (int count, rtx frame ATTRIBUTE_UNUSED)
{
if (count != 0)
return const0_rtx;
return get_hard_reg_initial_val (Pmode, REG_RA);
}
/* Return or create a memory slot containing the gp value for the current
function. Needed only if TARGET_LD_BUGGY_LDGP. */
rtx
alpha_gp_save_rtx (void)
{
rtx seq, m = cfun->machine->gp_save_rtx;
if (m == NULL)
{
start_sequence ();
m = assign_stack_local (DImode, UNITS_PER_WORD, BITS_PER_WORD);
m = validize_mem (m);
emit_move_insn (m, pic_offset_table_rtx);
seq = get_insns ();
end_sequence ();
/* We used to simply emit the sequence after entry_of_function.
However this breaks the CFG if the first instruction in the
first block is not the NOTE_INSN_BASIC_BLOCK, for example a
label. Emit the sequence properly on the edge. We are only
invoked from dw2_build_landing_pads and finish_eh_generation
will call commit_edge_insertions thanks to a kludge. */
insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR));
cfun->machine->gp_save_rtx = m;
}
return m;
}
static void
alpha_instantiate_decls (void)
{
if (cfun->machine->gp_save_rtx != NULL_RTX)
instantiate_decl_rtl (cfun->machine->gp_save_rtx);
}
static int
alpha_ra_ever_killed (void)
{
rtx top;
if (!has_hard_reg_initial_val (Pmode, REG_RA))
return (int)df_regs_ever_live_p (REG_RA);
push_topmost_sequence ();
top = get_insns ();
pop_topmost_sequence ();
return reg_set_between_p (gen_rtx_REG (Pmode, REG_RA), top, NULL_RTX);
}
1992-10-26 22:01:33 +01:00
/* Return the trap mode suffix applicable to the current
instruction, or NULL. */
1992-10-26 22:01:33 +01:00
static const char *
get_trap_mode_suffix (void)
1992-10-26 22:01:33 +01:00
{
enum attr_trap_suffix s = get_attr_trap_suffix (current_output_insn);
1992-10-26 22:01:33 +01:00
switch (s)
1992-10-26 22:01:33 +01:00
{
case TRAP_SUFFIX_NONE:
return NULL;
case TRAP_SUFFIX_SU:
if (alpha_fptm >= ALPHA_FPTM_SU)
return "su";
return NULL;
case TRAP_SUFFIX_SUI:
if (alpha_fptm >= ALPHA_FPTM_SUI)
return "sui";
return NULL;
case TRAP_SUFFIX_V_SV:
switch (alpha_fptm)
{
case ALPHA_FPTM_N:
return NULL;
case ALPHA_FPTM_U:
return "v";
case ALPHA_FPTM_SU:
case ALPHA_FPTM_SUI:
return "sv";
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
case TRAP_SUFFIX_V_SV_SVI:
switch (alpha_fptm)
{
case ALPHA_FPTM_N:
return NULL;
case ALPHA_FPTM_U:
return "v";
case ALPHA_FPTM_SU:
return "sv";
case ALPHA_FPTM_SUI:
return "svi";
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
break;
case TRAP_SUFFIX_U_SU_SUI:
switch (alpha_fptm)
{
case ALPHA_FPTM_N:
return NULL;
case ALPHA_FPTM_U:
return "u";
case ALPHA_FPTM_SU:
return "su";
case ALPHA_FPTM_SUI:
return "sui";
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
break;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
/* Return the rounding mode suffix applicable to the current
instruction, or NULL. */
static const char *
get_round_mode_suffix (void)
{
enum attr_round_suffix s = get_attr_round_suffix (current_output_insn);
switch (s)
{
case ROUND_SUFFIX_NONE:
return NULL;
case ROUND_SUFFIX_NORMAL:
switch (alpha_fprm)
{
case ALPHA_FPRM_NORM:
return NULL;
case ALPHA_FPRM_MINF:
return "m";
case ALPHA_FPRM_CHOP:
return "c";
case ALPHA_FPRM_DYN:
return "d";
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
break;
case ROUND_SUFFIX_C:
return "c";
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
/* Locate some local-dynamic symbol still in use by this function
so that we can print its name in some movdi_er_tlsldm pattern. */
static int
get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
{
rtx x = *px;
if (GET_CODE (x) == SYMBOL_REF
&& SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
{
cfun->machine->some_ld_name = XSTR (x, 0);
return 1;
}
return 0;
}
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
static const char *
get_some_local_dynamic_name (void)
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
{
rtx insn;
if (cfun->machine->some_ld_name)
return cfun->machine->some_ld_name;
for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
if (INSN_P (insn)
&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
return cfun->machine->some_ld_name;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
}
/* Print an operand. Recognize special options, documented below. */
void
print_operand (FILE *file, rtx x, int code)
{
int i;
switch (code)
{
case '~':
/* Print the assembler name of the current function. */
assemble_name (file, alpha_fnname);
break;
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
case '&':
assemble_name (file, get_some_local_dynamic_name ());
break;
case '/':
{
const char *trap = get_trap_mode_suffix ();
const char *round = get_round_mode_suffix ();
if (trap || round)
2001-09-11 10:52:39 +02:00
fprintf (file, (TARGET_AS_SLASH_BEFORE_SUFFIX ? "/%s%s" : "%s%s"),
(trap ? trap : ""), (round ? round : ""));
break;
}
case ',':
/* Generates single precision instruction suffix. */
fputc ((TARGET_FLOAT_VAX ? 'f' : 's'), file);
break;
case '-':
/* Generates double precision instruction suffix. */
fputc ((TARGET_FLOAT_VAX ? 'g' : 't'), file);
break;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
case '#':
if (alpha_this_literal_sequence_number == 0)
alpha_this_literal_sequence_number = alpha_next_sequence_number++;
fprintf (file, "%d", alpha_this_literal_sequence_number);
break;
case '*':
if (alpha_this_gpdisp_sequence_number == 0)
alpha_this_gpdisp_sequence_number = alpha_next_sequence_number++;
fprintf (file, "%d", alpha_this_gpdisp_sequence_number);
break;
case 'H':
if (GET_CODE (x) == HIGH)
output_addr_const (file, XEXP (x, 0));
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
else
output_operand_lossage ("invalid %%H value");
break;
case 'J':
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
{
const char *lituse;
if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSGD_CALL)
{
x = XVECEXP (x, 0, 0);
lituse = "lituse_tlsgd";
}
else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSLDM_CALL)
{
x = XVECEXP (x, 0, 0);
lituse = "lituse_tlsldm";
}
else if (CONST_INT_P (x))
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
lituse = "lituse_jsr";
else
{
output_operand_lossage ("invalid %%J value");
break;
}
if (x != const0_rtx)
fprintf (file, "\t\t!%s!%d", lituse, (int) INTVAL (x));
}
break;
case 'j':
{
const char *lituse;
#ifdef HAVE_AS_JSRDIRECT_RELOCS
lituse = "lituse_jsrdirect";
#else
lituse = "lituse_jsr";
#endif
gcc_assert (INTVAL (x) != 0);
fprintf (file, "\t\t!%s!%d", lituse, (int) INTVAL (x));
}
break;
1992-10-26 22:01:33 +01:00
case 'r':
/* If this operand is the constant zero, write it as "$31". */
if (REG_P (x))
1992-10-26 22:01:33 +01:00
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (x == CONST0_RTX (GET_MODE (x)))
fprintf (file, "$31");
else
output_operand_lossage ("invalid %%r value");
break;
case 'R':
/* Similar, but for floating-point. */
if (REG_P (x))
1992-10-26 22:01:33 +01:00
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (x == CONST0_RTX (GET_MODE (x)))
fprintf (file, "$f31");
else
output_operand_lossage ("invalid %%R value");
break;
case 'N':
/* Write the 1's complement of a constant. */
if (!CONST_INT_P (x))
1992-10-26 22:01:33 +01:00
output_operand_lossage ("invalid %%N value");
fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INTVAL (x));
1992-10-26 22:01:33 +01:00
break;
case 'P':
/* Write 1 << C, for a constant C. */
if (!CONST_INT_P (x))
1992-10-26 22:01:33 +01:00
output_operand_lossage ("invalid %%P value");
fprintf (file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) 1 << INTVAL (x));
1992-10-26 22:01:33 +01:00
break;
case 'h':
/* Write the high-order 16 bits of a constant, sign-extended. */
if (!CONST_INT_P (x))
1992-10-26 22:01:33 +01:00
output_operand_lossage ("invalid %%h value");
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) >> 16);
1992-10-26 22:01:33 +01:00
break;
case 'L':
/* Write the low-order 16 bits of a constant, sign-extended. */
if (!CONST_INT_P (x))
1992-10-26 22:01:33 +01:00
output_operand_lossage ("invalid %%L value");
fprintf (file, HOST_WIDE_INT_PRINT_DEC,
(INTVAL (x) & 0xffff) - 2 * (INTVAL (x) & 0x8000));
1992-10-26 22:01:33 +01:00
break;
case 'm':
/* Write mask for ZAP insn. */
if (GET_CODE (x) == CONST_DOUBLE)
{
HOST_WIDE_INT mask = 0;
HOST_WIDE_INT value;
value = CONST_DOUBLE_LOW (x);
for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR;
i++, value >>= 8)
if (value & 0xff)
mask |= (1 << i);
value = CONST_DOUBLE_HIGH (x);
for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR;
i++, value >>= 8)
if (value & 0xff)
mask |= (1 << (i + sizeof (int)));
fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask & 0xff);
1992-10-26 22:01:33 +01:00
}
else if (CONST_INT_P (x))
1992-10-26 22:01:33 +01:00
{
HOST_WIDE_INT mask = 0, value = INTVAL (x);
for (i = 0; i < 8; i++, value >>= 8)
if (value & 0xff)
mask |= (1 << i);
fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask);
1992-10-26 22:01:33 +01:00
}
else
output_operand_lossage ("invalid %%m value");
break;
case 'M':
/* 'b', 'w', 'l', or 'q' as the value of the constant. */
if (!CONST_INT_P (x)
|| (INTVAL (x) != 8 && INTVAL (x) != 16
&& INTVAL (x) != 32 && INTVAL (x) != 64))
1992-10-26 22:01:33 +01:00
output_operand_lossage ("invalid %%M value");
fprintf (file, "%s",
(INTVAL (x) == 8 ? "b"
: INTVAL (x) == 16 ? "w"
: INTVAL (x) == 32 ? "l"
: "q"));
1992-10-26 22:01:33 +01:00
break;
case 'U':
/* Similar, except do it from the mask. */
if (CONST_INT_P (x))
{
HOST_WIDE_INT value = INTVAL (x);
if (value == 0xff)
{
fputc ('b', file);
break;
}
if (value == 0xffff)
{
fputc ('w', file);
break;
}
if (value == 0xffffffff)
{
fputc ('l', file);
break;
}
if (value == -1)
{
fputc ('q', file);
break;
}
}
else if (HOST_BITS_PER_WIDE_INT == 32
&& GET_CODE (x) == CONST_DOUBLE
&& CONST_DOUBLE_LOW (x) == 0xffffffff
&& CONST_DOUBLE_HIGH (x) == 0)
{
fputc ('l', file);
break;
}
output_operand_lossage ("invalid %%U value");
1992-10-26 22:01:33 +01:00
break;
case 's':
/* Write the constant value divided by 8. */
if (!CONST_INT_P (x)
|| (unsigned HOST_WIDE_INT) INTVAL (x) >= 64
2001-09-11 10:52:39 +02:00
|| (INTVAL (x) & 7) != 0)
1992-10-26 22:01:33 +01:00
output_operand_lossage ("invalid %%s value");
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) / 8);
1992-10-26 22:01:33 +01:00
break;
case 'S':
/* Same, except compute (64 - c) / 8 */
if (!CONST_INT_P (x)
1992-10-26 22:01:33 +01:00
&& (unsigned HOST_WIDE_INT) INTVAL (x) >= 64
&& (INTVAL (x) & 7) != 8)
output_operand_lossage ("invalid %%s value");
fprintf (file, HOST_WIDE_INT_PRINT_DEC, (64 - INTVAL (x)) / 8);
1992-10-26 22:01:33 +01:00
break;
case 'C': case 'D': case 'c': case 'd':
1992-10-26 22:01:33 +01:00
/* Write out comparison name. */
{
enum rtx_code c = GET_CODE (x);
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
if (!COMPARISON_P (x))
output_operand_lossage ("invalid %%C value");
else if (code == 'D')
c = reverse_condition (c);
else if (code == 'c')
c = swap_condition (c);
else if (code == 'd')
c = swap_condition (reverse_condition (c));
if (c == LEU)
fprintf (file, "ule");
else if (c == LTU)
fprintf (file, "ult");
rtl.def: Add unordered fp comparisions. * rtl.def: Add unordered fp comparisions. * tree.def: Likewise. * tree.h: Add ISO C 9x unordered fp comparision builtins. * builtins.c (expand_tree_builtin): New function. * c-typeck.c (build_function_call): Use it. (build_binary_op): Support unordered compares. * c-common.c (c_common_nodes_and_builtins): Add unordered compares. * combine.c (known_cond): Handle reverse_condition returning UNKNOWN. (reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed. * cse.c (fold_rtx): Check FLOAT_MODE_P before reversing. (record_jump_equiv): Handle reverse_condition returning UNKNOWN. * jump.c (reverse_condition): Don't abort for UNLE etc, but return UNKNOWN. (swap_condition): Handle unordered compares. (thread_jumps): Check can_reverse before reversing. * loop.c (get_condition): Likewise. Allow UNORERED/ORDERED to be reversed for FP. * optabs.c (can_compare_p): New argument CODE. Verify branch or setcc is present before acking for cmp_optab. Update all callers. (prepare_float_lib_cmp, init_optabs): Handle UNORDERED. * expmed.c (do_cmp_and_jump): Update for can_compare_p. * expr.c (expand_expr): Likewise. Support unordered compares. (do_jump, do_store_flag): Likewise. * expr.h (enum libfunc_index): Add unordered compares. * Makefile.in (FPBIT_FUNCS): Add _unord_sf. (DPBIT_FUNCS): Add _unord_df. * config/fp-bit.c (_unord_f2): New. * fp-test.c (main): Try unordered compare builtins. * alpha-protos.h (alpha_fp_comparison_operator): Declare. * alpha.c (alpha_comparison_operator): Check mode properly. (alpha_swapped_comparison_operator): Likewise. (signed_comparison_operator): Likewise. (alpha_fp_comparison_operator): New. (alpha_emit_conditional_branch): Handle unordered compares. * alpha.h (PREDICATE_CODES): Update. * alpha.md (fp compares): Use alpha_fp_comparison_operator. (bunordered, bordered): New. * cp/call.c (build_over_call): Use expand_tree_builtin. * cp/typeck.c (build_function_call_real): Likewise. (build_binary_op_nodefault): Handle unordered compares. * gcc.c-torture/execute/ieee/fp-cmp-4.c: New. From-SVN: r31591
2000-01-24 21:10:04 +01:00
else if (c == UNORDERED)
fprintf (file, "un");
else
fprintf (file, "%s", GET_RTX_NAME (c));
}
break;
1992-10-26 22:01:33 +01:00
case 'E':
/* Write the divide or modulus operator. */
switch (GET_CODE (x))
{
case DIV:
fprintf (file, "div%s", GET_MODE (x) == SImode ? "l" : "q");
break;
case UDIV:
fprintf (file, "div%su", GET_MODE (x) == SImode ? "l" : "q");
break;
case MOD:
fprintf (file, "rem%s", GET_MODE (x) == SImode ? "l" : "q");
break;
case UMOD:
fprintf (file, "rem%su", GET_MODE (x) == SImode ? "l" : "q");
break;
default:
output_operand_lossage ("invalid %%E value");
break;
}
break;
case 'A':
/* Write "_u" for unaligned access. */
if (MEM_P (x) && GET_CODE (XEXP (x, 0)) == AND)
1992-10-26 22:01:33 +01:00
fprintf (file, "_u");
break;
case 0:
if (REG_P (x))
1992-10-26 22:01:33 +01:00
fprintf (file, "%s", reg_names[REGNO (x)]);
else if (MEM_P (x))
1992-10-26 22:01:33 +01:00
output_address (XEXP (x, 0));
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
else if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC)
{
switch (XINT (XEXP (x, 0), 1))
{
case UNSPEC_DTPREL:
case UNSPEC_TPREL:
output_addr_const (file, XVECEXP (XEXP (x, 0), 0, 0));
break;
default:
output_operand_lossage ("unknown relocation unspec");
break;
}
}
1992-10-26 22:01:33 +01:00
else
output_addr_const (file, x);
break;
default:
output_operand_lossage ("invalid %%xn code");
}
}
void
print_operand_address (FILE *file, rtx addr)
{
int basereg = 31;
HOST_WIDE_INT offset = 0;
if (GET_CODE (addr) == AND)
addr = XEXP (addr, 0);
if (GET_CODE (addr) == PLUS
&& CONST_INT_P (XEXP (addr, 1)))
{
offset = INTVAL (XEXP (addr, 1));
addr = XEXP (addr, 0);
}
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
if (GET_CODE (addr) == LO_SUM)
{
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
const char *reloc16, *reloclo;
rtx op1 = XEXP (addr, 1);
if (GET_CODE (op1) == CONST && GET_CODE (XEXP (op1, 0)) == UNSPEC)
{
op1 = XEXP (op1, 0);
switch (XINT (op1, 1))
{
case UNSPEC_DTPREL:
reloc16 = NULL;
reloclo = (alpha_tls_size == 16 ? "dtprel" : "dtprello");
break;
case UNSPEC_TPREL:
reloc16 = NULL;
reloclo = (alpha_tls_size == 16 ? "tprel" : "tprello");
break;
default:
output_operand_lossage ("unknown relocation unspec");
return;
}
output_addr_const (file, XVECEXP (op1, 0, 0));
}
else
{
reloc16 = "gprel";
reloclo = "gprellow";
output_addr_const (file, op1);
}
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
if (offset)
fprintf (file, "+" HOST_WIDE_INT_PRINT_DEC, offset);
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
addr = XEXP (addr, 0);
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
switch (GET_CODE (addr))
{
case REG:
basereg = REGNO (addr);
break;
case SUBREG:
basereg = subreg_regno (addr);
break;
default:
gcc_unreachable ();
}
fprintf (file, "($%d)\t\t!%s", basereg,
configure.in (HAVE_AS_TLS): Add alpha tests. * configure.in (HAVE_AS_TLS): Add alpha tests. * configure: Rebuild. * config/alpha/alpha.c (TARGET_AS_TLS): New. (alpha_tls_size, alpha_tls_size_string): New. (overide_options): Set it. Always install machine_status hooks. (input_operand): Accept got tls predicates. (local_symbol_p): Merge into ... (local_symbolic_operand): ... here. Reject tls symbols. (global_symbolic_operand): Likewise. (tls_symbolic_operand_1, dtp16_symbolic_operand): New. (dtp32_symbolic_operand, gotdtp_symbolic_operand): New. (tp16_symbolic_operand, tp32_symbolic_operand): New. (gottp_symbolic_operand, tls_symbolic_operand_type): New. (alpha_encode_section_info): Handle TLS symbols. (alpha_strip_name_encoding): Likewise. (alpha_legitimate_address_p): Likewise. (alpha_legitimize_address): Likewise. (alpha_expand_mov): Early exit to avoid nop moves. (struct machine_function): Move from unicosmk.h. Add some_ld_name. (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Always define. (get_some_local_dynamic_name, get_some_local_dynamic_name_1): New. (print_operand, print_operand_address): Add TLS relocs. * config/alpha/alpha.h (HAVE_AS_TLS): Default 0. (MASK_TLS_KERNEL, TARGET_TLS_KERNEL): New. (TARGET_SWITCHES): Add -mtls-kernel. (alpha_tls_size, alpha_tls_size_string): New. (TARGET_OPTIONS): Add -mtls-size=. (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Add R0_REG. (ASM_OUTPUT_LABELREF): Skip %. (PRINT_OPERAND_PUNCT_VALID_P): Add &. (PREDICATE_CODES): Update. * config/alpha/alpha.md (UNSPEC_TLSGD_CALL, UNSPEC_TLSLDM_CALL, UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_DTPREL, UNSPEC_TPREL, UNSPEC_TP, UNSPECV_SET_TP): New. (adddi_er_lo16_dtp, adddi_er_hi32_dtp, adddi_er_lo32_dtp, adddi_er_lo16_tp, adddi_er_hi32_tp, adddi_er_lo32_tp, load_tp, set_tp, movdi_er_tlsgd, movdi_er_tlsldm, movdi_er_gotdtp, movdi_er_gottp, call_value_osf_tlsgd, call_value_osf_tlsldm): New. (call_value_osf_2_er): Accept anything as op4. * config/alpha/alpha-protos.h: Update. * config/alpha/unicosmk.h (struct machine_function): Move to alpha.c. From-SVN: r54125
2002-06-01 02:19:10 +02:00
(basereg == 29 ? reloc16 : reloclo));
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
return;
}
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
switch (GET_CODE (addr))
{
case REG:
basereg = REGNO (addr);
break;
case SUBREG:
basereg = subreg_regno (addr);
break;
case CONST_INT:
offset = INTVAL (addr);
break;
#if TARGET_ABI_OPEN_VMS
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
case SYMBOL_REF:
fprintf (file, "%s", XSTR (addr, 0));
return;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
case CONST:
gcc_assert (GET_CODE (XEXP (addr, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF);
fprintf (file, "%s+" HOST_WIDE_INT_PRINT_DEC,
XSTR (XEXP (XEXP (addr, 0), 0), 0),
INTVAL (XEXP (XEXP (addr, 0), 1)));
return;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
#endif
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
default:
gcc_unreachable ();
}
fprintf (file, HOST_WIDE_INT_PRINT_DEC "($%d)", offset, basereg);
}
1992-10-26 22:01:33 +01:00
/* Emit RTL insns to initialize the variable parts of a trampoline at
M_TRAMP. FNDECL is target function's decl. CHAIN_VALUE is an rtx
for the static chain value for the function. */
static void
alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
{
rtx fnaddr, mem, word1, word2;
fnaddr = XEXP (DECL_RTL (fndecl), 0);
#ifdef POINTERS_EXTEND_UNSIGNED
fnaddr = convert_memory_address (Pmode, fnaddr);
chain_value = convert_memory_address (Pmode, chain_value);
#endif
if (TARGET_ABI_OPEN_VMS)
{
const char *fnname;
char *trname;
/* Construct the name of the trampoline entry point. */
fnname = XSTR (fnaddr, 0);
trname = (char *) alloca (strlen (fnname) + 5);
strcpy (trname, fnname);
strcat (trname, "..tr");
fnname = ggc_alloc_string (trname, strlen (trname) + 1);
word2 = gen_rtx_SYMBOL_REF (Pmode, fnname);
/* Trampoline (or "bounded") procedure descriptor is constructed from
the function's procedure descriptor with certain fields zeroed IAW
the VMS calling standard. This is stored in the first quadword. */
word1 = force_reg (DImode, gen_const_mem (DImode, fnaddr));
word1 = expand_and (DImode, word1, GEN_INT (0xffff0fff0000fff0), NULL);
}
else
{
/* These 4 instructions are:
ldq $1,24($27)
ldq $27,16($27)
jmp $31,($27),0
nop
We don't bother setting the HINT field of the jump; the nop
is merely there for padding. */
word1 = GEN_INT (0xa77b0010a43b0018);
word2 = GEN_INT (0x47ff041f6bfb0000);
}
/* Store the first two words, as computed above. */
mem = adjust_address (m_tramp, DImode, 0);
emit_move_insn (mem, word1);
mem = adjust_address (m_tramp, DImode, 8);
emit_move_insn (mem, word2);
/* Store function address and static chain value. */
mem = adjust_address (m_tramp, Pmode, 16);
emit_move_insn (mem, fnaddr);
mem = adjust_address (m_tramp, Pmode, 24);
emit_move_insn (mem, chain_value);
if (TARGET_ABI_OSF)
{
emit_insn (gen_imb ());
netbsd.h (ENABLE_EXECUTE_STACK): Remove. 2011-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Joseph Myers <joseph@codesourcery.com> gcc: * config/alpha/netbsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/alpha/osf5.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/darwin.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/i386/mingw32.h (MINGW_ENABLE_EXECUTE_STACK): Remove. (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. [IN_LIBGCC2]: Don't include <windows.h>. * config/i386/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/i386/netbsd64.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): Remove. * config/openbsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sol2.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sparc/freebsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sparc/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/alpha/alpha.c (alpha_trampoline_init): Test HAVE_ENABLE_EXECUTE_STACK. * config/i386/i386.c (ix86_trampoline_init): Likewise. * config/sparc/sparc.c (sparc32_initialize_trampoline): Likewise. (sparc64_initialize_trampoline): Likewise. * libgcc2.c [L_enable_execute_stack]: Remove. * system.h (ENABLE_EXECUTE_STACK): Poison. * doc/tm.texi.in (Trampolines, ENABLE_EXECUTE_STACK): Remove. * doc/tm.texi: Regenerate. * Makefile.in (LIBGCC2_CFLAGS): Add -fbuilding-libgcc. gcc/c-family: * c.opt (fbuilding-libgcc): New option. * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc. libgcc: * enable-execute-stack-empty.c: New file. * enable-execute-stack-mprotect.c: New file. * config/i386/enable-execute-stack-mingw32.c: New file. * config.host (enable_execute_stack): New variable. Select appropriate variants. * configure.ac: Link enable-execute-stack.c to $enable_execute_stack. * configure: Regenerate. * Makefile.in (LIB2ADD): Add enable-execute-stack.c. (lib2funcs): Remove _enable_execute_stack. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r174843
2011-06-09 14:30:46 +02:00
#ifdef HAVE_ENABLE_EXECUTE_STACK
emit_library_call (init_one_libfunc ("__enable_execute_stack"),
LCT_NORMAL, VOIDmode, 1, XEXP (m_tramp, 0), Pmode);
#endif
}
}
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
or a hard register in which to store the argument.
MODE is the argument's machine mode.
TYPE is the data type of the argument (as a tree).
This is null for libcalls where that information may
not be available.
CUM is a variable of type CUMULATIVE_ARGS which gives info about
the preceding args and about the function being called.
NAMED is nonzero if this argument is a named parameter
(otherwise it is an extra parameter matching an ellipsis).
On Alpha the first 6 words of args are normally in registers
and the rest are pushed. */
static rtx
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
alpha_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
int basereg;
int num_args;
/* Don't get confused and pass small structures in FP registers. */
if (type && AGGREGATE_TYPE_P (type))
2001-09-11 10:52:39 +02:00
basereg = 16;
else
{
#ifdef ENABLE_CHECKING
/* With alpha_split_complex_arg, we shouldn't see any raw complex
values here. */
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (!COMPLEX_MODE_P (mode));
#endif
/* Set up defaults for FP operands passed in FP registers, and
integral operands passed in integer registers. */
if (TARGET_FPREGS && GET_MODE_CLASS (mode) == MODE_FLOAT)
basereg = 32 + 16;
else
basereg = 16;
}
2001-09-11 10:52:39 +02:00
/* ??? Irritatingly, the definition of CUMULATIVE_ARGS is different for
the two platforms, so we can't avoid conditional compilation. */
#if TARGET_ABI_OPEN_VMS
2001-09-11 10:52:39 +02:00
{
if (mode == VOIDmode)
return alpha_arg_info_reg_val (*cum);
num_args = cum->num_args;
target-def.h (TARGET_MUST_PASS_IN_STACK): New. * target-def.h (TARGET_MUST_PASS_IN_STACK): New. * target.h (struct gcc_target): Add calls.must_pass_in_stack. * expr.h (MUST_PASS_IN_STACK): Remove. * system.h (MUST_PASS_IN_STACK): Poison. * tree.h (must_pass_in_stack_var_size): Declare. (must_pass_in_stack_var_size_or_pad): Declare. * calls.c (must_pass_in_stack_var_size): New. (must_pass_in_stack_var_size_or_pad): Rename from default_must_pass_in_stack. * config/alpha/alpha.c (unicosmk_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove. * config/fr30/fr30.c (fr30_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove. * config/frv/frv.c (frv_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/frv/frv.h (MUST_PASS_IN_STACK): Remove. * config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove. * config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New. (ix86_must_pass_in_stack): Make static. * config/i386/i386.h (MUST_PASS_IN_STACK): Remove. * config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New. * config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove. * config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New. * config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove. * config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove. * config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New. (mcore_must_pass_on_stack): Remove. * config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove. * config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New. * config/mips/mips.h (MUST_PASS_IN_STACK): Remove. * config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New. * config/pa/pa.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New. * config/sh/sh.h (MUST_PASS_IN_STACK): Remove. * config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New. * config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove. * config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New. * config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove. * doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from MUST_PASS_IN_STACK. * calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c, config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h, config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/xtensa/xtensa.c: Use target hook. From-SVN: r84606
2004-07-13 09:45:09 +02:00
if (num_args >= 6
|| targetm.calls.must_pass_in_stack (mode, type))
2001-09-11 10:52:39 +02:00
return NULL_RTX;
}
#elif TARGET_ABI_OSF
2001-09-11 10:52:39 +02:00
{
if (*cum >= 6)
2001-09-11 10:52:39 +02:00
return NULL_RTX;
num_args = *cum;
2001-09-11 10:52:39 +02:00
/* VOID is passed as a special flag for "last argument". */
if (type == void_type_node)
basereg = 16;
target-def.h (TARGET_MUST_PASS_IN_STACK): New. * target-def.h (TARGET_MUST_PASS_IN_STACK): New. * target.h (struct gcc_target): Add calls.must_pass_in_stack. * expr.h (MUST_PASS_IN_STACK): Remove. * system.h (MUST_PASS_IN_STACK): Poison. * tree.h (must_pass_in_stack_var_size): Declare. (must_pass_in_stack_var_size_or_pad): Declare. * calls.c (must_pass_in_stack_var_size): New. (must_pass_in_stack_var_size_or_pad): Rename from default_must_pass_in_stack. * config/alpha/alpha.c (unicosmk_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove. * config/fr30/fr30.c (fr30_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove. * config/frv/frv.c (frv_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/frv/frv.h (MUST_PASS_IN_STACK): Remove. * config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove. * config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New. (ix86_must_pass_in_stack): Make static. * config/i386/i386.h (MUST_PASS_IN_STACK): Remove. * config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New. * config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove. * config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New. * config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove. * config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove. * config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New. (mcore_must_pass_on_stack): Remove. * config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove. * config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New. * config/mips/mips.h (MUST_PASS_IN_STACK): Remove. * config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New. * config/pa/pa.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New. * config/sh/sh.h (MUST_PASS_IN_STACK): Remove. * config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New. * config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove. * config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New. * config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove. * doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from MUST_PASS_IN_STACK. * calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c, config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h, config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/xtensa/xtensa.c: Use target hook. From-SVN: r84606
2004-07-13 09:45:09 +02:00
else if (targetm.calls.must_pass_in_stack (mode, type))
2001-09-11 10:52:39 +02:00
return NULL_RTX;
}
#else
#error Unhandled ABI
#endif
return gen_rtx_REG (mode, num_args + basereg);
}
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.
(TYPE is null for libcalls where that information may not be available.) */
static void
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
alpha_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
bool onstack = targetm.calls.must_pass_in_stack (mode, type);
int increment = onstack ? 6 : ALPHA_ARG_SIZE (mode, type, named);
#if TARGET_ABI_OSF
*cum += increment;
#else
if (!onstack && cum->num_args < 6)
cum->atypes[cum->num_args] = alpha_arg_type (mode);
cum->num_args += increment;
#endif
}
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
static int
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
alpha_arg_partial_bytes (cumulative_args_t cum_v,
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
enum machine_mode mode ATTRIBUTE_UNUSED,
tree type ATTRIBUTE_UNUSED,
bool named ATTRIBUTE_UNUSED)
{
int words = 0;
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED = get_cumulative_args (cum_v);
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
#if TARGET_ABI_OPEN_VMS
if (cum->num_args < 6
&& 6 < cum->num_args + ALPHA_ARG_SIZE (mode, type, named))
words = 6 - cum->num_args;
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
#elif TARGET_ABI_OSF
if (*cum < 6 && 6 < *cum + ALPHA_ARG_SIZE (mode, type, named))
words = 6 - *cum;
#else
#error Unhandled ABI
#endif
return words * UNITS_PER_WORD;
}
/* Return true if TYPE must be returned in memory, instead of in registers. */
static bool
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
alpha_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
{
enum machine_mode mode = VOIDmode;
int size;
if (type)
{
mode = TYPE_MODE (type);
/* All aggregates are returned in memory, except on OpenVMS where
records that fit 64 bits should be returned by immediate value
as required by section 3.8.7.1 of the OpenVMS Calling Standard. */
if (TARGET_ABI_OPEN_VMS
&& TREE_CODE (type) != ARRAY_TYPE
&& (unsigned HOST_WIDE_INT) int_size_in_bytes(type) <= 8)
return false;
if (AGGREGATE_TYPE_P (type))
return true;
}
size = GET_MODE_SIZE (mode);
switch (GET_MODE_CLASS (mode))
{
case MODE_VECTOR_FLOAT:
/* Pass all float vectors in memory, like an aggregate. */
return true;
case MODE_COMPLEX_FLOAT:
/* We judge complex floats on the size of their element,
not the size of the whole type. */
size = GET_MODE_UNIT_SIZE (mode);
break;
case MODE_INT:
case MODE_FLOAT:
case MODE_COMPLEX_INT:
case MODE_VECTOR_INT:
break;
default:
/* ??? We get called on all sorts of random stuff from
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
aggregate_value_p. We must return something, but it's not
clear what's safe to return. Pretend it's a struct I
guess. */
return true;
}
/* Otherwise types must fit in one register. */
return size > UNITS_PER_WORD;
}
target.h (struct gcc_target): Add calls.pass_by_reference. * target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
2004-07-14 08:24:27 +02:00
/* Return true if TYPE should be passed by invisible reference. */
static bool
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
alpha_pass_by_reference (cumulative_args_t ca ATTRIBUTE_UNUSED,
target.h (struct gcc_target): Add calls.pass_by_reference. * target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
2004-07-14 08:24:27 +02:00
enum machine_mode mode,
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
const_tree type ATTRIBUTE_UNUSED,
target.h (struct gcc_target): Add calls.pass_by_reference. * target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
2004-07-14 08:24:27 +02:00
bool named ATTRIBUTE_UNUSED)
{
return mode == TFmode || mode == TCmode;
}
/* Define how to find the value returned by a function. VALTYPE is the
data type of the value (as a tree). If the precise function being
called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0.
MODE is set instead of VALTYPE for libcalls.
On Alpha the value is found in $0 for integer functions and
$f0 for floating-point functions. */
rtx
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
unsigned int regnum, dummy ATTRIBUTE_UNUSED;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
enum mode_class mclass;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (!valtype || !alpha_return_in_memory (valtype, func));
if (valtype)
mode = TYPE_MODE (valtype);
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
mclass = GET_MODE_CLASS (mode);
switch (mclass)
{
case MODE_INT:
/* Do the same thing as PROMOTE_MODE except for libcalls on VMS,
where we have them returning both SImode and DImode. */
if (!(TARGET_ABI_OPEN_VMS && valtype && AGGREGATE_TYPE_P (valtype)))
PROMOTE_MODE (mode, dummy, valtype);
/* FALLTHRU */
case MODE_COMPLEX_INT:
case MODE_VECTOR_INT:
regnum = 0;
break;
case MODE_FLOAT:
regnum = 32;
break;
case MODE_COMPLEX_FLOAT:
{
enum machine_mode cmode = GET_MODE_INNER (mode);
return gen_rtx_PARALLEL
(VOIDmode,
gen_rtvec (2,
gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, 32),
const0_rtx),
gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, 33),
GEN_INT (GET_MODE_SIZE (cmode)))));
}
case MODE_RANDOM:
/* We should only reach here for BLKmode on VMS. */
gcc_assert (TARGET_ABI_OPEN_VMS && mode == BLKmode);
regnum = 0;
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
return gen_rtx_REG (mode, regnum);
}
/* TCmode complex values are passed by invisible reference. We
should not split these values. */
static bool
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
alpha_split_complex_arg (const_tree type)
{
return TYPE_MODE (type) != TCmode;
}
static tree
alpha_build_builtin_va_list (void)
1992-10-26 22:01:33 +01:00
{
tree base, ofs, space, record, type_decl;
1992-10-26 22:01:33 +01:00
if (TARGET_ABI_OPEN_VMS)
return ptr_type_node;
record = (*lang_hooks.types.make_type) (RECORD_TYPE);
type_decl = build_decl (BUILTINS_LOCATION,
TYPE_DECL, get_identifier ("__va_list_tag"), record);
TYPE_STUB_DECL (record) = type_decl;
TYPE_NAME (record) = type_decl;
/* C++? SET_IS_AGGR_TYPE (record, 1); */
1992-10-26 22:01:33 +01:00
/* Dummy field to prevent alignment warnings. */
space = build_decl (BUILTINS_LOCATION,
FIELD_DECL, NULL_TREE, integer_type_node);
DECL_FIELD_CONTEXT (space) = record;
DECL_ARTIFICIAL (space) = 1;
DECL_IGNORED_P (space) = 1;
ofs = build_decl (BUILTINS_LOCATION,
FIELD_DECL, get_identifier ("__offset"),
integer_type_node);
DECL_FIELD_CONTEXT (ofs) = record;
tree.h (DECL_CHAIN): Define. gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
2010-07-15 16:31:28 +02:00
DECL_CHAIN (ofs) = space;
/* ??? This is a hack, __offset is marked volatile to prevent
DCE that confuses stdarg optimization and results in
gcc.c-torture/execute/stdarg-1.c failure. See PR 41089. */
TREE_THIS_VOLATILE (ofs) = 1;
base = build_decl (BUILTINS_LOCATION,
FIELD_DECL, get_identifier ("__base"),
ptr_type_node);
DECL_FIELD_CONTEXT (base) = record;
tree.h (DECL_CHAIN): Define. gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
2010-07-15 16:31:28 +02:00
DECL_CHAIN (base) = ofs;
TYPE_FIELDS (record) = base;
layout_type (record);
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
va_list_gpr_counter_field = ofs;
return record;
}
#if TARGET_ABI_OSF
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
/* Helper function for alpha_stdarg_optimize_hook. Skip over casts
and constant additions. */
static gimple
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
va_list_skip_additions (tree lhs)
{
gimple stmt;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
for (;;)
{
enum tree_code code;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
stmt = SSA_NAME_DEF_STMT (lhs);
if (gimple_code (stmt) == GIMPLE_PHI)
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
return stmt;
if (!is_gimple_assign (stmt)
|| gimple_assign_lhs (stmt) != lhs)
return NULL;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (TREE_CODE (gimple_assign_rhs1 (stmt)) != SSA_NAME)
return stmt;
code = gimple_assign_rhs_code (stmt);
if (!CONVERT_EXPR_CODE_P (code)
&& ((code != PLUS_EXPR && code != POINTER_PLUS_EXPR)
|| TREE_CODE (gimple_assign_rhs2 (stmt)) != INTEGER_CST
|| !host_integerp (gimple_assign_rhs2 (stmt), 1)))
return stmt;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
lhs = gimple_assign_rhs1 (stmt);
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
}
}
/* Check if LHS = RHS statement is
LHS = *(ap.__base + ap.__offset + cst)
or
LHS = *(ap.__base
+ ((ap.__offset + cst <= 47)
? ap.__offset + cst - 48 : ap.__offset + cst) + cst2).
If the former, indicate that GPR registers are needed,
if the latter, indicate that FPR registers are needed.
Also look for LHS = (*ptr).field, where ptr is one of the forms
listed above.
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
On alpha, cfun->va_list_gpr_size is used as size of the needed
regs and cfun->va_list_fpr_size is a bitmask, bit 0 set if GPR
registers are needed and bit 1 set if FPR registers are needed.
Return true if va_list references should not be scanned for the
current statement. */
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
static bool
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
alpha_stdarg_optimize_hook (struct stdarg_info *si, const_gimple stmt)
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
{
tree base, offset, rhs;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
int offset_arg = 1;
gimple base_stmt;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))
!= GIMPLE_SINGLE_RHS)
return false;
rhs = gimple_assign_rhs1 (stmt);
while (handled_component_p (rhs))
rhs = TREE_OPERAND (rhs, 0);
re PR middle-end/42834 (memcpy folding overeager) 2010-07-01 Richard Guenther <rguenther@suse.de> PR middle-end/42834 PR middle-end/44468 * doc/gimple.texi (is_gimple_mem_ref_addr): Document. * doc/generic.texi (References to storage): Document MEM_REF. * tree-pretty-print.c (dump_generic_node): Handle MEM_REF. (print_call_name): Likewise. * tree.c (recompute_tree_invariant_for_addr_expr): Handle MEM_REF. (build_simple_mem_ref_loc): New function. (mem_ref_offset): Likewise. * tree.h (build_simple_mem_ref_loc): Declare. (build_simple_mem_ref): Define. (mem_ref_offset): Declare. * fold-const.c: Include tree-flow.h. (operand_equal_p): Handle MEM_REF. (build_fold_addr_expr_with_type_loc): Likewise. (fold_comparison): Likewise. (fold_unary_loc): Fold VIEW_CONVERT_EXPR <T1, MEM_REF <T2, ...>> to MEM_REF <T1, ...>. (fold_binary_loc): Fold MEM[&MEM[p, CST1], CST2] to MEM[p, CST1 + CST2], fold MEM[&a.b, CST2] to MEM[&a, offsetof (a, b) + CST2]. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle MEM_REF. (ptr_deref_may_alias_ref_p_1): Likewise. (ao_ref_base_alias_set): Properly differentiate base object for offset and TBAA. (ao_ref_init_from_ptr_and_size): Use MEM_REF. (indirect_ref_may_alias_decl_p): Handle MEM_REFs properly. (indirect_refs_may_alias_p): Likewise. (refs_may_alias_p_1): Likewise. Remove pointer SSA name def chasing code. (ref_maybe_used_by_call_p_1): Handle MEM_REF. (call_may_clobber_ref_p_1): Likewise. * dwarf2out.c (loc_list_from_tree): Handle MEM_REF. * expr.c (expand_assignment): Handle MEM_REF. (store_expr): Handle MEM_REFs from STRING_CSTs. (store_field): If expanding a MEM_REF of a non-addressable decl use bitfield operations. (get_inner_reference): Handle MEM_REF. (expand_expr_addr_expr_1): Likewise. (expand_expr_real_1): Likewise. * tree-eh.c (tree_could_trap_p): Handle MEM_REF. * alias.c (ao_ref_from_mem): Handle MEM_REF. (get_alias_set): Likewise. Properly handle VIEW_CONVERT_EXPRs. * tree-data-ref.c (dr_analyze_innermost): Handle MEM_REF. (dr_analyze_indices): Likewise. (dr_analyze_alias): Likewise. (object_address_invariant_in_loop_p): Likewise. * gimplify.c (mark_addressable): Handle MEM_REF. (gimplify_cond_expr): Build MEM_REFs. (gimplify_modify_expr_to_memcpy): Likewise. (gimplify_init_ctor_preeval_1): Handle MEM_REF. (gimple_fold_indirect_ref): Adjust. (gimplify_expr): Handle MEM_REF. Gimplify INDIRECT_REF to MEM_REF. * tree.def (MEM_REF): New tree code. * tree-dfa.c: Include toplev.h. (get_ref_base_and_extent): Handle MEM_REF. (get_addr_base_and_unit_offset): New function. * emit-rtl.c (set_mem_attributes_minus_bitpos): Handle MEM_REF. * gimple-fold.c (may_propagate_address_into_dereference): Handle MEM_REF. (maybe_fold_offset_to_array_ref): Allow possibly out-of bounds accesses if the array has just one dimension. Remove always true parameter. Do not require type compatibility here. (maybe_fold_offset_to_component_ref): Remove. (maybe_fold_stmt_indirect): Remove. (maybe_fold_reference): Remove INDIRECT_REF handling. Fold back to non-MEM_REF. (maybe_fold_offset_to_address): Simplify. Deal with type mismatches here. (maybe_fold_reference): Likewise. (maybe_fold_stmt_addition): Likewise. Also handle &ARRAY + I in addition to &ARRAY[0] + I. (fold_gimple_assign): Handle ADDR_EXPR of MEM_REFs. (gimple_get_relevant_ref_binfo): Handle MEM_REF. * cfgexpand.c (expand_debug_expr): Handle MEM_REF. * tree-ssa.c (useless_type_conversion_p): Make most pointer conversions useless. (warn_uninitialized_var): Handle MEM_REF. (maybe_rewrite_mem_ref_base): New function. (execute_update_addresses_taken): Implement re-writing of MEM_REFs to SSA form. * tree-inline.c (remap_gimple_op_r): Handle MEM_REF, remove INDIRECT_REF handling. (copy_tree_body_r): Handle MEM_REF. * gimple.c (is_gimple_addressable): Adjust. (is_gimple_address): Likewise. (is_gimple_invariant_address): ADDR_EXPRs of MEM_REFs with invariant base are invariant. (is_gimple_min_lval): Adjust. (is_gimple_mem_ref_addr): New function. (get_base_address): Handle MEM_REF. (count_ptr_derefs): Likewise. (get_base_loadstore): Likewise. * gimple.h (is_gimple_mem_ref_addr): Declare. (gimple_call_fndecl): Handle invariant MEM_REF addresses. * tree-cfg.c (verify_address): New function, split out from ... (verify_expr): ... here. Use for verifying ADDR_EXPRs and the address operand of MEM_REFs. Verify MEM_REFs. Reject INDIRECT_REFs. (verify_types_in_gimple_min_lval): Handle MEM_REF. Disallow INDIRECT_REF. Allow conversions. (verify_types_in_gimple_reference): Verify VIEW_CONVERT_EXPR of a register does not change its size. (verify_types_in_gimple_reference): Verify MEM_REF. (verify_gimple_assign_single): Disallow INDIRECT_REF. Handle MEM_REF. * tree-ssa-operands.c (opf_non_addressable, opf_not_non_addressable): New. (mark_address_taken): Handle MEM_REF. (get_indirect_ref_operands): Pass through opf_not_non_addressable. (get_asm_expr_operands): Pass opf_not_non_addressable. (get_expr_operands): Handle opf_[not_]non_addressable. Handle MEM_REF. Remove INDIRECT_REF handling. * tree-vrp.c: (check_array_ref): Handle MEM_REF. (search_for_addr_array): Likewise. (check_array_bounds): Likewise. (vrp_stmt_computes_nonzero): Adjust for MEM_REF. * tree-ssa-loop-im.c (for_each_index): Handle MEM_REF. (ref_always_accessed_p): Likewise. (gen_lsm_tmp_name): Likewise. Handle ADDR_EXPR. * tree-complex.c (extract_component): Do not handle INDIRECT_REF. Handle MEM_REF. * cgraphbuild.c (mark_load): Properly check for NULL result from get_base_address. (mark_store): Likewise. * tree-ssa-loop-niter.c (array_at_struct_end_p): Handle MEM_REF. * tree-loop-distribution.c (generate_builtin): Exchange INDIRECT_REF handling for MEM_REF. * tree-scalar-evolution.c (follow_ssa_edge_expr): Handle &MEM[ptr + CST] similar to POINTER_PLUS_EXPR. * builtins.c (stabilize_va_list_loc): Use the function ABI valist type if we couldn't canonicalize the argument type. Always dereference with the canonical va-list type. (maybe_emit_free_warning): Handle MEM_REF. (fold_builtin_memory_op): Simplify and handle MEM_REFs in folding memmove to memcpy. * builtins.c (fold_builtin_memory_op): Use ref-all types for all memcpy foldings. * omp-low.c (build_receiver_ref): Adjust for MEM_REF. (build_outer_var_ref): Likewise. (scan_omp_1_op): Likewise. (lower_rec_input_clauses): Likewise. (lower_lastprivate_clauses): Likewise. (lower_reduction_clauses): Likewise. (lower_copyprivate_clauses): Likewise. (expand_omp_atomic_pipeline): Likewise. (expand_omp_atomic_mutex): Likewise. (create_task_copyfn): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle MEM_REF. Remove old union trick. Initialize constant offsets. (ao_ref_init_from_vn_reference): Likewise. Do not handle INDIRECT_REF. Init base_alias_set properly. (vn_reference_lookup_3): Replace INDIRECT_REF handling with MEM_REF. (vn_reference_fold_indirect): Adjust for MEM_REFs. (valueize_refs): Fold MEM_REFs. Re-evaluate constant offset for ARRAY_REFs. (may_insert): Remove. (visit_reference_op_load): Do not test may_insert. (run_scc_vn): Remove parameter, do not fiddle with may_insert. * tree-ssa-sccvn.h (struct vn_reference_op_struct): Add a field to store the constant offset this op applies. (run_scc_vn): Adjust prototype. * cgraphunit.c (thunk_adjust): Adjust for MEM_REF. * tree-ssa-ccp.c (ccp_fold): Replace INDIRECT_REF folding with MEM_REF. Propagate &foo + CST as &MEM[&foo, CST]. Do not bother about volatile qualifiers on pointers. (fold_const_aggregate_ref): Handle MEM_REF, do not handle INDIRECT_REF. * tree-ssa-loop-ivopts.c * tree-ssa-loop-ivopts.c (determine_base_object): Adjust for MEM_REF. (strip_offset_1): Likewise. (find_interesting_uses_address): Replace INDIRECT_REF handling with MEM_REF handling. (get_computation_cost_at): Likewise. * ipa-pure-const.c (check_op): Handle MEM_REF. * tree-stdarg.c (check_all_va_list_escapes): Adjust for MEM_REF. * tree-ssa-sink.c (is_hidden_global_store): Handle MEM_REF and constants. * ipa-inline.c (likely_eliminated_by_inlining_p): Handle MEM_REF. * tree-parloops.c (take_address_of): Adjust for MEM_REF. (eliminate_local_variables_1): Likewise. (create_call_for_reduction_1): Likewise. (create_loads_for_reductions): Likewise. (create_loads_and_stores_for_name): Likewise. * matrix-reorg.c (may_flatten_matrices_1): Sanitize. (ssa_accessed_in_tree): Handle MEM_REF. (ssa_accessed_in_assign_rhs): Likewise. (update_type_size): Likewise. (analyze_accesses_for_call_stmt): Likewise. (analyze_accesses_for_assign_stmt): Likewise. (transform_access_sites): Likewise. (transform_allocation_sites): Likewise. * tree-affine.c (tree_to_aff_combination): Handle MEM_REF. * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Do not handle INDIRECT_REF. * tree-ssa-phiopt.c (add_or_mark_expr): Handle MEM_REF. (cond_store_replacement): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Handle MEM_REF, no not handle INDIRECT_REFs. (insert_into_preds_of_block): Properly initialize avail. (phi_translate_1): Fold MEM_REFs. Re-evaluate constant offset for ARRAY_REFs. Properly handle reference lookups that require a bit re-interpretation. (can_PRE_operation): Do not handle INDIRECT_REF. Handle MEM_REF. * tree-sra.c * tree-sra.c (build_access_from_expr_1): Handle MEM_REF. (build_ref_for_offset_1): Remove. (build_ref_for_offset): Build MEM_REFs. (gate_intra_sra): Disable for now. (sra_ipa_modify_expr): Handle MEM_REF. (ipa_early_sra_gate): Disable for now. * tree-sra.c (create_access): Swap INDIRECT_REF handling for MEM_REF handling. (disqualify_base_of_expr): Likewise. (ptr_parm_has_direct_uses): Swap INDIRECT_REF handling for MEM_REF handling. (sra_ipa_modify_expr): Remove INDIRECT_REF handling. Use mem_ref_offset. Remove bogus folding. (build_access_from_expr_1): Properly handle MEM_REF for non IPA-SRA. (make_fancy_name_1): Add support for MEM_REF. * tree-predcom.c (ref_at_iteration): Handle MEM_REFs. * tree-mudflap.c (mf_xform_derefs_1): Adjust for MEM_REF. * ipa-prop.c (compute_complex_assign_jump_func): Handle MEM_REF. (compute_complex_ancestor_jump_func): Likewise. (ipa_analyze_virtual_call_uses): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Replace INDIRECT_REF folding with more generalized MEM_REF folding. (tree_ssa_forward_propagate_single_use_vars): Adjust accordingly. (forward_propagate_addr_into_variable_array_index): Also handle &ARRAY + I in addition to &ARRAY[0] + I. * tree-ssa-dce.c (ref_may_be_aliased): Handle MEM_REF. * tree-ssa-ter.c (find_replaceable_in_bb): Avoid TER if that creates assignments with overlap. * tree-nested.c (get_static_chain): Adjust for MEM_REF. (get_frame_field): Likewise. (get_nonlocal_debug_decl): Likewise. (convert_nonlocal_reference_op): Likewise. (struct nesting_info): Add mem_refs pointer-set. (create_nesting_tree): Allocate it. (convert_local_reference_op): Insert to be folded mem-refs. (fold_mem_refs): New function. (finalize_nesting_tree_1): Perform defered folding of mem-refs (free_nesting_tree): Free the pointer-set. * tree-vect-stmts.c (vectorizable_store): Adjust for MEM_REF. (vectorizable_load): Likewise. * tree-ssa-phiprop.c (phiprop_insert_phi): Adjust for MEM_REF. (propagate_with_phi): Likewise. * tree-object-size.c (addr_object_size): Handle MEM_REFs instead of INDIRECT_REFs. (compute_object_offset): Handle MEM_REF. (plus_stmt_object_size): Handle MEM_REF. (collect_object_sizes_for): Dispatch to plus_stmt_object_size for &MEM_REF. * tree-flow.h (get_addr_base_and_unit_offset): Declare. (symbol_marked_for_renaming): Likewise. * Makefile.in (tree-dfa.o): Add $(TOPLEV_H). (fold-const.o): Add $(TREE_FLOW_H). * tree-ssa-structalias.c (get_constraint_for_1): Handle MEM_REF. (find_func_clobbers): Likewise. * ipa-struct-reorg.c (decompose_indirect_ref_acc): Handle MEM_REF. (decompose_access): Likewise. (replace_field_acc): Likewise. (replace_field_access_stmt): Likewise. (insert_new_var_in_stmt): Likewise. (get_stmt_accesses): Likewise. (reorg_structs_drive): Disable. * config/i386/i386.c (ix86_va_start): Adjust for MEM_REF. (ix86_canonical_va_list_type): Likewise. cp/ * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs predicate we are looking for, allow non-gimplified INDIRECT_REFs. testsuite/ * gcc.c-torture/execute/20100316-1.c: New testcase. * gcc.c-torture/execute/pr44468.c: Likewise. * gcc.c-torture/compile/20100609-1.c: Likewise. * gcc.dg/volatile2.c: Adjust. * gcc.dg/plugin/selfassign.c: Likewise. * gcc.dg/pr36902.c: Likewise. * gcc.dg/tree-ssa/foldaddr-2.c: Remove. * gcc.dg/tree-ssa/foldaddr-3.c: Likewise. * gcc.dg/tree-ssa/forwprop-8.c: Adjust. * gcc.dg/tree-ssa/pr17141-1.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-13.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-14.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-21.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise. * gcc.dg/tree-ssa/20030807-7.c: Likewise. * gcc.dg/tree-ssa/forwprop-10.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-1.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-23.c: Likewise. * gcc.dg/tree-ssa/forwprop-1.c: Likewise. * gcc.dg/tree-ssa/forwprop-2.c: Likewise. * gcc.dg/tree-ssa/struct-aliasing-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-25.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-26.c: Likewise. * gcc.dg/tree-ssa/struct-aliasing-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-26.c: Likewise. * gcc.dg/tree-ssa/ssa-sccvn-4.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-7.c: Likewise. * gcc.dg/tree-ssa/forwprop-5.c: Likewise. * gcc.dg/struct/w_prof_two_strs.c: XFAIL. * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise. * gcc.dg/struct/wo_prof_global_var.c: Likewise. * gcc.dg/struct/wo_prof_malloc_size_var.c: Likewise. * gcc.dg/struct/w_prof_local_array.c: Likewise. * gcc.dg/struct/w_prof_single_str_global.c: Likewise. * gcc.dg/struct/wo_prof_escape_str_init.c: Likewise. * gcc.dg/struct/wo_prof_array_through_pointer.c: Likewise. * gcc.dg/struct/w_prof_global_array.c: Likewise. * gcc.dg/struct/wo_prof_array_field.c: Likewise. * gcc.dg/struct/wo_prof_single_str_local.c: Likewise. * gcc.dg/struct/w_prof_local_var.c: Likewise. * gcc.dg/struct/wo_prof_two_strs.c: Likewise. * gcc.dg/struct/wo_prof_empty_str.c: Likewise. * gcc.dg/struct/wo_prof_local_array.c: Likewise. * gcc.dg/struct/w_prof_global_var.c: Likewise. * gcc.dg/struct/wo_prof_single_str_global.c: Likewise. * gcc.dg/struct/wo_prof_escape_substr_value.c: Likewise. * gcc.dg/struct/wo_prof_global_array.c: Likewise. * gcc.dg/struct/wo_prof_escape_return.c: Likewise. * gcc.dg/struct/wo_prof_escape_substr_array.c: Likewise. * gcc.dg/struct/wo_prof_double_malloc.c: Likewise. * gcc.dg/struct/w_ratio_cold_str.c: Likewise. * gcc.dg/struct/wo_prof_escape_substr_pointer.c: Likewise. * gcc.dg/struct/wo_prof_local_var.c: Likewise. * gcc.dg/tree-prof/stringop-1.c: Adjust. * g++.dg/tree-ssa/pr31146.C: Likewise. * g++.dg/tree-ssa/copyprop-1.C: Likewise. * g++.dg/tree-ssa/pr33604.C: Likewise. * g++.dg/plugin/selfassign.c: Likewise. * gfortran.dg/array_memcpy_3.f90: Likewise. * gfortran.dg/array_memcpy_4.f90: Likewise. * c-c++-common/torture/pr42834.c: New testcase. From-SVN: r161655
2010-07-01 10:49:19 +02:00
if (TREE_CODE (rhs) != MEM_REF
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
|| TREE_CODE (TREE_OPERAND (rhs, 0)) != SSA_NAME)
return false;
stmt = va_list_skip_additions (TREE_OPERAND (rhs, 0));
if (stmt == NULL
|| !is_gimple_assign (stmt)
|| gimple_assign_rhs_code (stmt) != POINTER_PLUS_EXPR)
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
return false;
base = gimple_assign_rhs1 (stmt);
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (TREE_CODE (base) == SSA_NAME)
{
base_stmt = va_list_skip_additions (base);
if (base_stmt
&& is_gimple_assign (base_stmt)
&& gimple_assign_rhs_code (base_stmt) == COMPONENT_REF)
base = gimple_assign_rhs1 (base_stmt);
}
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (TREE_CODE (base) != COMPONENT_REF
|| TREE_OPERAND (base, 1) != TYPE_FIELDS (va_list_type_node))
{
base = gimple_assign_rhs2 (stmt);
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (TREE_CODE (base) == SSA_NAME)
{
base_stmt = va_list_skip_additions (base);
if (base_stmt
&& is_gimple_assign (base_stmt)
&& gimple_assign_rhs_code (base_stmt) == COMPONENT_REF)
base = gimple_assign_rhs1 (base_stmt);
}
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (TREE_CODE (base) != COMPONENT_REF
|| TREE_OPERAND (base, 1) != TYPE_FIELDS (va_list_type_node))
return false;
offset_arg = 0;
}
base = get_base_address (base);
if (TREE_CODE (base) != VAR_DECL
|| !bitmap_bit_p (si->va_list_vars, DECL_UID (base)))
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
return false;
offset = gimple_op (stmt, 1 + offset_arg);
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (TREE_CODE (offset) == SSA_NAME)
{
gimple offset_stmt = va_list_skip_additions (offset);
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (offset_stmt
&& gimple_code (offset_stmt) == GIMPLE_PHI)
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
{
HOST_WIDE_INT sub;
gimple arg1_stmt, arg2_stmt;
tree arg1, arg2;
enum tree_code code1, code2;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
if (gimple_phi_num_args (offset_stmt) != 2)
goto escapes;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
arg1_stmt
= va_list_skip_additions (gimple_phi_arg_def (offset_stmt, 0));
arg2_stmt
= va_list_skip_additions (gimple_phi_arg_def (offset_stmt, 1));
if (arg1_stmt == NULL
|| !is_gimple_assign (arg1_stmt)
|| arg2_stmt == NULL
|| !is_gimple_assign (arg2_stmt))
goto escapes;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
code1 = gimple_assign_rhs_code (arg1_stmt);
code2 = gimple_assign_rhs_code (arg2_stmt);
if (code1 == COMPONENT_REF
&& (code2 == MINUS_EXPR || code2 == PLUS_EXPR))
/* Do nothing. */;
else if (code2 == COMPONENT_REF
&& (code1 == MINUS_EXPR || code1 == PLUS_EXPR))
{
gimple tem = arg1_stmt;
code2 = code1;
arg1_stmt = arg2_stmt;
arg2_stmt = tem;
}
else
goto escapes;
if (!host_integerp (gimple_assign_rhs2 (arg2_stmt), 0))
goto escapes;
sub = tree_low_cst (gimple_assign_rhs2 (arg2_stmt), 0);
if (code2 == MINUS_EXPR)
sub = -sub;
if (sub < -48 || sub > -32)
goto escapes;
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
arg1 = gimple_assign_rhs1 (arg1_stmt);
arg2 = gimple_assign_rhs1 (arg2_stmt);
if (TREE_CODE (arg2) == SSA_NAME)
{
arg2_stmt = va_list_skip_additions (arg2);
if (arg2_stmt == NULL
|| !is_gimple_assign (arg2_stmt)
|| gimple_assign_rhs_code (arg2_stmt) != COMPONENT_REF)
goto escapes;
arg2 = gimple_assign_rhs1 (arg2_stmt);
}
if (arg1 != arg2)
goto escapes;
if (TREE_CODE (arg1) != COMPONENT_REF
|| TREE_OPERAND (arg1, 1) != va_list_gpr_counter_field
|| get_base_address (arg1) != base)
goto escapes;
/* Need floating point regs. */
cfun->va_list_fpr_size |= 2;
return false;
}
if (offset_stmt
&& is_gimple_assign (offset_stmt)
&& gimple_assign_rhs_code (offset_stmt) == COMPONENT_REF)
offset = gimple_assign_rhs1 (offset_stmt);
}
if (TREE_CODE (offset) != COMPONENT_REF
|| TREE_OPERAND (offset, 1) != va_list_gpr_counter_field
|| get_base_address (offset) != base)
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
goto escapes;
else
/* Need general regs. */
cfun->va_list_fpr_size |= 1;
return false;
escapes:
si->va_list_escapes = true;
return false;
}
#endif
tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-09 19:19:58 +02:00
/* Perform any needed actions needed for a function that is receiving a
variable number of arguments. */
static void
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
alpha_setup_incoming_varargs (cumulative_args_t pcum, enum machine_mode mode,
tree type, int *pretend_size, int no_rtl)
{
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
CUMULATIVE_ARGS cum = *get_cumulative_args (pcum);
/* Skip the current argument. */
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
targetm.calls.function_arg_advance (pack_cumulative_args (&cum), mode, type,
true);
#if TARGET_ABI_OPEN_VMS
/* For VMS, we allocate space for all 6 arg registers plus a count.
However, if NO registers need to be saved, don't allocate any space.
This is not only because we won't need the space, but because AP
includes the current_pretend_args_size and we don't want to mess up
any ap-relative addresses already made. */
if (cum.num_args < 6)
{
if (!no_rtl)
{
emit_move_insn (gen_rtx_REG (DImode, 1), virtual_incoming_args_rtx);
emit_insn (gen_arg_home ());
}
*pretend_size = 7 * UNITS_PER_WORD;
}
#else
/* On OSF/1 and friends, we allocate space for all 12 arg registers, but
only push those that are remaining. However, if NO registers need to
be saved, don't allocate any space. This is not only because we won't
need the space, but because AP includes the current_pretend_args_size
and we don't want to mess up any ap-relative addresses already made.
If we are not to use the floating-point registers, save the integer
registers where we would put the floating-point registers. This is
not the most efficient way to implement varargs with just one register
class, but it isn't worth doing anything more efficient in this rare
case. */
if (cum >= 6)
return;
if (!no_rtl)
{
alias.h (alias_set_type): Define new type. ./: * alias.h (alias_set_type): Define new type. (ALIAS_SET_MEMORY_BARRIER): Use it. * rtl.h: Include alias.h. (struct mem_attrs): Use alias_set_type. * tree.h: Include alias.h (struct tree_type): Use alias_set_type. (struct tree_struct_field_tag): Likewise. (struct tree_decl_common): Likewise. * alias.c (struct alias_set_entry): Use alias_set_type. (get_alias_set_entry, alias_set_subset_of): Likewise. (alias_sets_conflict_p): Likewise. (alias_sets_must_conflict_p): Likewise. (objects_must_conflict_p): Likewise. (get_alias_set, new_alias_set): Likewise. (record_alias_subset, record_component_aliases): Likewise. (varargs_set, frame_set): Change to alias_set_type. (get_varargs_alias_set): Use alias_set_type. (get_frame_alias_set): Likewise. * builtins.c (setjmp_alias_set): Change to alias_set_type. * dse.c (struct store_info): Use alias_set_type. (struct read_info, struct clear_alias_mode_holder): Likewise. (clear_alias_set_lookup, canon_address): Likewise. (record_store, check_mem_read_rtx): Likewise. (dse_record_singleton_alias_set): Likewise. (dse_invalidate_singleton_alias_set): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. * expr.c (store_constructor_field, store_field): Likewise. * gimplify.c (struct gimplify_init_ctor_preeval_data): Likewise. * langhooks.c (lhd_get_alias_set): Likewise. * langhooks-def.h (lhd_get_alias_set): Likewise. * reload1.c (alter_reg): Likewise. * tree-flow.h (struct fieldoff): Likewise. * tree-ssa-alias.c (struct alias_map_d): Likewise. (may_alias_p, get_smt_for, create_sft): Likewise. * tree-ssa-alias-warnings.c (nonstandard_alias_types_p): Likewise. * tree-ssa-structalias.c (set_uids_in_ptset): Likewise. (merge_smts_into): Likewise. * varasm.c (const_alias_set): Likewise. * c-common.c (strict_aliasing_warning): Likewise. (c_common_get_alias_set): Likewise. * dse.h (dse_record_singleton_alias_set): Update declaration. (dse_invalidate_singleton_alias_set): Likewise. * emit-rtl.h (set_mem_alias_set): Likewise. * c-common.h (c_common_get_alias_set): Likewise. * print-rtl.c (print_rtx): Cast MEM_ALIAS_SET when printing it. * print-tree.c (print_node): Likewise. * config/alpha/alpha.c (alpha_sr_alias_set): Change to alias_set_type. (alpha_setup_incoming_varargs): Use alias_set_type. * config/i386/i386.c (setup_incoming_varargs_64): Use alias_set_type. (setup_incoming_varargs_ms_64): Likewise. (ix86_GOT_alias_set): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (set): Change to alias_set_type. (get_TOC_alias_set): Use alias_set_type. * config/rs6000/rs6000-protos.h (get_TOC_alias_set): Update declaration. * config/sh/sh.c (sh_builtin_saveregs): Use alias_set_type. * config/sparc/sparc.c (sparc_sr_alias_set): Change to alias_set_type. (struct_value_alias_set): Likewise. * Makefile.in (GTFILES): Add $(srcdir)/alias.h. ada/: * misc.c (gnat_get_alias_set): Change return type to alias_set_type. cp/: * cp-objcp-common.c (cxx_get_alias_set): Change return type to alias_set_type. * cp/cp-tree.h (cxx_get_alias_set): Update declaration. fortran:/ * f95-lang.c (gfc_get_alias_set): Change return type to alias_set_type. From-SVN: r127362
2007-08-11 19:21:56 +02:00
int count;
alias_set_type set = get_varargs_alias_set ();
rtx tmp;
count = cfun->va_list_gpr_size / UNITS_PER_WORD;
if (count > 6 - cum)
count = 6 - cum;
/* Detect whether integer registers or floating-point registers
are needed by the detected va_arg statements. See above for
how these values are computed. Note that the "escape" value
is VA_LIST_MAX_FPR_SIZE, which is 255, which has both of
these bits set. */
gcc_assert ((VA_LIST_MAX_FPR_SIZE & 3) == 3);
if (cfun->va_list_fpr_size & 1)
{
tmp = gen_rtx_MEM (BLKmode,
plus_constant (virtual_incoming_args_rtx,
(cum + 6) * UNITS_PER_WORD));
MEM_NOTRAP_P (tmp) = 1;
set_mem_alias_set (tmp, set);
move_block_from_reg (16 + cum, tmp, count);
}
if (cfun->va_list_fpr_size & 2)
{
tmp = gen_rtx_MEM (BLKmode,
plus_constant (virtual_incoming_args_rtx,
cum * UNITS_PER_WORD));
MEM_NOTRAP_P (tmp) = 1;
set_mem_alias_set (tmp, set);
move_block_from_reg (16 + cum + TARGET_FPREGS*32, tmp, count);
}
}
*pretend_size = 12 * UNITS_PER_WORD;
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9. * config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9. * config/alpha/alpha.c (TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition. (alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK. * target.h: New hook asm_out.file_end. * target.h: Update to match. New hook macro TARGET_ASM_FILE_END. * toplev.c (compile_file: Use targetm.asm_out.file_end. * system.h: Poison ASM_FILE_END. * varasm.c (file_end_indicate_exec_stack): New. * output.h: Prototype it. * doc/tm.texi: Document TARGET_ASM_FILE_END and file_end_indicate_exec_stack. Delete references to attasm.h. * config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end. (ASM_FILE_END): Delete; move code... * config/darwin.c (darwin_file_end): Here; new function. * config/darwin-protos.h: Prototype it. * config/alpha/alpha.c (unicosmk_asm_file_end): Make static, rename unicosmk_file_end. * config/arm/aof.h (ASM_FILE_END): Delete; move code... * config/arm/arm.c (aof_file_end): ... here; new static function. Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER. Make aof_dump_imports and aof_dump_pic_table static. * config/avr/avr.c (asm_file_end): Rename avr_file_end, make static. Set TARGET_ASM_FILE_END to avr_file_end. * config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments. Set TARGET_ASM_FILE_END to c4x_file_end. * config/h8300/h8300.c (asm_file_end): Rename h8300_file_end, make static. Take no arguments. Set TARGET_ASM_FILE_END to h8300_file_end. * config/i370/i370.h (ASM_FILE_END): Delete; move code... * config/i370/i370.c (i370_file_end): ... here; new static function. Set TARGET_ASM_FILE_END to i370_file_end. * config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end. Take no arguments. Call file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END. * config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END. Define NEED_INDICATE_EXEC_STACK to 0. * config/i386/linux.h, config/i386/linux64.h: Redefine NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END. * config/i386/winnt.c (i386_pe_asm_file_end): Rename to i386_pe_file_end. Take no arguments. Use ix86_file_end. * config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to ia64_hpux_file_end, make static. Take no arguments. * config/ip2k/ip2k.c (asm_file_start, asm_file_end, commands_in_prologues, commands_in_epilogues): Delete. (function_epilogue): Update to match. * config/mips/mips.c (mips_asm_file_end): Rename mips_file_end, make static. Take no arguments. (iris6_asm_file_end): Rename iris6_file_end, make static, use mips_file_end, take no arguments. Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as appropriate. * config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end, make static, take no arguments. Set TARGET_ASM_FILE_END to mmix_file_end. * config/pa/pa.c (output_deferred_plabels): Make static, take no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels. * config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it. (ASM_FILE_END): Delete; move code... * config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here; new static function. * config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h * config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h: Don't set ASM_FILE_END. * config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h * config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h * config/sparc/linux64.h: Set TARGET_ASM_FILE_END to file_end_indicate_exec_stack; don't set ASM_FILE_END. * config/alpha/unicosmk.h, config/i386/cygming.h * config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END. * config/arm/arm-protos.h, config/alpha/alpha-protos.h * config/avr/avr-protos.h, config/c4x/c4x-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/ip2k/ip2k-protos.h, config/mips/mips-protos.h * config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update. From-SVN: r67591
2003-06-07 19:11:48 +02:00
#endif
}
re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily) PR middle-end/20983 * tree-ssa-ccp.c (optimize_stdarg_builtin): New function. (execute_fold_all_builtins): Call it for BUILT_IN_VA_START, BUILT_IN_VA_COPY and BUILT_IN_VA_END. * target.h (struct ggc_target): Add expand_builtin_va_start hook. * target-def.h (TARGET_EXPAND_BUILTIN_VA_START): Define. (TARGET_INITIALIZER): Add it. * builtins.c (expand_builtin_va_start): Use targetm.expand_builtin_va_start hook instead of EXPAND_BUILTIN_VA_START macro. * alpha/alpha.c (alpha_va_start): Made static. (override_options): Clear targetm.expand_builtin_va_start if TARGET_UNICOSMK. (TARGET_EXPAND_BUILTIN_VA_START): Define. * alpha/unicosmk.h (EXPAND_BUILTIN_VA_START): Remove. * alpha/alpha.h (EXPAND_BUILTIN_VA_START): Remove. * alpha/alpha-protos.h (alpha_va_start): Remove prototype. * xtensa/xtensa.h (EXPAND_BUILTIN_VA_START): Remove. * xtensa/xtensa.c (TARGET_EXPAND_BUILTIN_VA_START): Define. (xtensa_va_start): Made static. * xtensa/xtensa-protos.h (xtensa_va_start): Remove prototype. * pa/pa-protos.h (hppa_va_start): Remove prototype. * pa/pa.h (EXPAND_BUILTIN_VA_START): Remove. * pa/pa.c (hppa_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * frv/frv.c (frv_expand_builtin_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * frv/frv-protos.h (frv_expand_builtin_va_start): Remove prototype. * frv/frv.h (EXPAND_BUILTIN_VA_START): Remove. * i386/i386.c (override_options): Clear targetm.expand_builtin_va_start if -m32 or 64-bit MS ABI. (ix86_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. * i386/i386.h (EXPAND_BUILTIN_VA_START): Remove. * i386/i386-protos.h (ix86_va_start, ix86_va_arg): Remove prototypes. * iq2000/iq2000-protos.h (iq2000_va_start): Remove prototype. * iq2000/iq2000.h (EXPAND_BUILTIN_VA_START): Remove. * iq2000/iq2000.c (iq2000_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * rs6000/rs6000-protos.h (rs6000_va_start): Remove prototype. * rs6000/rs6000.c (rs6000_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. (rs6000_override_options): Clear targetm.expand_builtin_va_start if DEFAULT_ABI != ABI_V4. * rs6000/rs6000.h (EXPAND_BUILTIN_VA_START): Remove. * spu/spu.c (spu_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * spu/spu.h (EXPAND_BUILTIN_VA_START): Remove. * spu/spu-protos.h spu_va_start): Remove prototype. * stormy16/stormy16.h (EXPAND_BUILTIN_VA_START): Remove. * stormy16/stormy16-protos.h (xstormy16_expand_builtin_va_start): Remove prototype. * stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. * s390/s390-protos.h (s390_va_start): Remove prototype. * s390/s390.c (s390_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. * s390/s390.h (EXPAND_BUILTIN_VA_START): Remove. * mn10300/mn10300.h (EXPAND_BUILTIN_VA_START): Remove. * mn10300/mn10300-protos.h (mn10300_va_start): Remove prototype. * mn10300/mn10300.c (mn10300_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * arc/arc.c (arc_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * arc/arc.h (EXPAND_BUILTIN_VA_START): Remove. * arc/arc-protos.h (arc_va_start): Remove prototype. * mt/mt-protos.h (mt_va_start): Remove prototype. * sparc/sparc.c (sparc_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * sparc/sparc-protos.h (sparc_va_start): Remove prototype. * sparc/sparc.h (EXPAND_BUILTIN_VA_START): Remove. * sh/sh.c (sh_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * sh/sh-protos.h (sh_va_start): Remove prototype. * sh/sh.h (EXPAND_BUILTIN_VA_START): Remove. * mips/mips-protos.h (mips_va_start): Remove prototype. * mips/mips.h (EXPAND_BUILTIN_VA_START): Remove. * mips/mips.c (mips_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. From-SVN: r130650
2007-12-06 14:25:37 +01:00
static void
alpha_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
{
HOST_WIDE_INT offset;
tree t, offset_field, base_field;
if (TREE_CODE (TREE_TYPE (valist)) == ERROR_MARK)
return;
/* For Unix, TARGET_SETUP_INCOMING_VARARGS moves the starting address base
up by 48, storing fp arg registers in the first 48 bytes, and the
integer arg registers in the next 48 bytes. This is only done,
however, if any integer registers need to be stored.
If no integer registers need be stored, then we must subtract 48
in order to account for the integer arg registers which are counted
in argsize above, but which are not actually stored on the stack.
Must further be careful here about structures straddling the last
integer argument register; that futzes with pretend_args_size,
which changes the meaning of AP. */
if (NUM_ARGS < 6)
offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD;
else
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
offset = -6 * UNITS_PER_WORD + crtl->args.pretend_args_size;
if (TARGET_ABI_OPEN_VMS)
{
t = make_tree (ptr_type_node, virtual_incoming_args_rtx);
tree.h (fold_build_pointer_plus_loc): New helper function. 2011-07-19 Richard Guenther <rguenther@suse.de> * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. From-SVN: r176461
2011-07-19 16:01:59 +02:00
t = fold_build_pointer_plus_hwi (t, offset + NUM_ARGS * UNITS_PER_WORD);
t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
}
else
{
base_field = TYPE_FIELDS (TREE_TYPE (valist));
tree.h (DECL_CHAIN): Define. gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
2010-07-15 16:31:28 +02:00
offset_field = DECL_CHAIN (base_field);
base_field = build3 (COMPONENT_REF, TREE_TYPE (base_field),
valist, base_field, NULL_TREE);
offset_field = build3 (COMPONENT_REF, TREE_TYPE (offset_field),
valist, offset_field, NULL_TREE);
t = make_tree (ptr_type_node, virtual_incoming_args_rtx);
tree.h (fold_build_pointer_plus_loc): New helper function. 2011-07-19 Richard Guenther <rguenther@suse.de> * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. From-SVN: r176461
2011-07-19 16:01:59 +02:00
t = fold_build_pointer_plus_hwi (t, offset);
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
t = build2 (MODIFY_EXPR, TREE_TYPE (base_field), base_field, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
tree.h (build_int_cst): New, sign extended constant. * tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-25 11:52:54 +02:00
t = build_int_cst (NULL_TREE, NUM_ARGS * UNITS_PER_WORD);
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
t = build2 (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
}
}
static tree
alpha_gimplify_va_arg_1 (tree type, tree base, tree offset,
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
gimple_seq *pre_p)
{
tree type_size, ptr_type, addend, t, addr;
gimple_seq internal_post;
/* If the type could not be passed in registers, skip the block
reserved for the registers. */
target-def.h (TARGET_MUST_PASS_IN_STACK): New. * target-def.h (TARGET_MUST_PASS_IN_STACK): New. * target.h (struct gcc_target): Add calls.must_pass_in_stack. * expr.h (MUST_PASS_IN_STACK): Remove. * system.h (MUST_PASS_IN_STACK): Poison. * tree.h (must_pass_in_stack_var_size): Declare. (must_pass_in_stack_var_size_or_pad): Declare. * calls.c (must_pass_in_stack_var_size): New. (must_pass_in_stack_var_size_or_pad): Rename from default_must_pass_in_stack. * config/alpha/alpha.c (unicosmk_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove. * config/fr30/fr30.c (fr30_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove. * config/frv/frv.c (frv_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/frv/frv.h (MUST_PASS_IN_STACK): Remove. * config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove. * config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New. (ix86_must_pass_in_stack): Make static. * config/i386/i386.h (MUST_PASS_IN_STACK): Remove. * config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New. * config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove. * config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New. * config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove. * config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove. * config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New. (mcore_must_pass_on_stack): Remove. * config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove. * config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New. * config/mips/mips.h (MUST_PASS_IN_STACK): Remove. * config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New. * config/pa/pa.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove. * config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New. (TARGET_MUST_PASS_IN_STACK): New. * config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New. * config/sh/sh.h (MUST_PASS_IN_STACK): Remove. * config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New. * config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove. * config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New. * config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove. * doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from MUST_PASS_IN_STACK. * calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c, config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h, config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/xtensa/xtensa.c: Use target hook. From-SVN: r84606
2004-07-13 09:45:09 +02:00
if (targetm.calls.must_pass_in_stack (TYPE_MODE (type), type))
{
tree.h (build_int_cst): New, sign extended constant. * tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-25 11:52:54 +02:00
t = build_int_cst (TREE_TYPE (offset), 6*8);
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
gimplify_assign (offset,
build2 (MAX_EXPR, TREE_TYPE (offset), offset, t),
pre_p);
}
addend = offset;
ptr_type = build_pointer_type_for_mode (type, ptr_mode, true);
if (TREE_CODE (type) == COMPLEX_TYPE)
{
tree real_part, imag_part, real_temp;
real_part = alpha_gimplify_va_arg_1 (TREE_TYPE (type), base,
offset, pre_p);
/* Copy the value into a new temporary, lest the formal temporary
be reused out from under us. */
real_temp = get_initialized_tmp_var (real_part, pre_p, NULL);
imag_part = alpha_gimplify_va_arg_1 (TREE_TYPE (type), base,
offset, pre_p);
return build2 (COMPLEX_EXPR, type, real_temp, imag_part);
}
else if (TREE_CODE (type) == REAL_TYPE)
{
tree fpaddend, cond, fourtyeight;
tree.h (build_int_cst): New, sign extended constant. * tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-25 11:52:54 +02:00
fourtyeight = build_int_cst (TREE_TYPE (addend), 6*8);
fpaddend = fold_build2 (MINUS_EXPR, TREE_TYPE (addend),
addend, fourtyeight);
cond = fold_build2 (LT_EXPR, boolean_type_node, addend, fourtyeight);
addend = fold_build3 (COND_EXPR, TREE_TYPE (addend), cond,
fpaddend, addend);
}
/* Build the final address and force that value into a temporary. */
tree.h (fold_build_pointer_plus_loc): New helper function. 2011-07-19 Richard Guenther <rguenther@suse.de> * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. From-SVN: r176461
2011-07-19 16:01:59 +02:00
addr = fold_build_pointer_plus (fold_convert (ptr_type, base), addend);
internal_post = NULL;
gimplify_expr (&addr, pre_p, &internal_post, is_gimple_val, fb_rvalue);
gimple_seq_add_seq (pre_p, internal_post);
/* Update the offset field. */
type_size = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type));
if (type_size == NULL || TREE_OVERFLOW (type_size))
t = size_zero_node;
else
{
t = size_binop (PLUS_EXPR, type_size, size_int (7));
t = size_binop (TRUNC_DIV_EXPR, t, size_int (8));
t = size_binop (MULT_EXPR, t, size_int (8));
}
t = fold_convert (TREE_TYPE (offset), t);
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
gimplify_assign (offset, build2 (PLUS_EXPR, TREE_TYPE (offset), offset, t),
pre_p);
return build_va_arg_indirect_ref (addr);
}
static tree
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
alpha_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
gimple_seq *post_p)
{
tree offset_field, base_field, offset, base, t, r;
bool indirect;
if (TARGET_ABI_OPEN_VMS)
return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
base_field = TYPE_FIELDS (va_list_type_node);
tree.h (DECL_CHAIN): Define. gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. From-SVN: r162223
2010-07-15 16:31:28 +02:00
offset_field = DECL_CHAIN (base_field);
base_field = build3 (COMPONENT_REF, TREE_TYPE (base_field),
valist, base_field, NULL_TREE);
offset_field = build3 (COMPONENT_REF, TREE_TYPE (offset_field),
valist, offset_field, NULL_TREE);
/* Pull the fields of the structure out into temporaries. Since we never
modify the base field, we can use a formal temporary. Sign-extend the
offset field so that it's the proper width for pointer arithmetic. */
base = get_formal_tmp_var (base_field, pre_p);
t = fold_convert (build_nonstandard_integer_type (64, 0), offset_field);
offset = get_initialized_tmp_var (t, pre_p, NULL);
indirect = pass_by_reference (NULL, TYPE_MODE (type), type, false);
if (indirect)
type = build_pointer_type_for_mode (type, ptr_mode, true);
/* Find the value. Note that this will be a stable indirection, or
a composite of stable indirections in the case of complex. */
r = alpha_gimplify_va_arg_1 (type, base, offset, pre_p);
/* Stuff the offset temporary back into its field. */
gimplify_assign (unshare_expr (offset_field),
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
fold_convert (TREE_TYPE (offset_field), offset), pre_p);
if (indirect)
r = build_va_arg_indirect_ref (r);
return r;
}
1992-10-26 22:01:33 +01:00
2002-06-04 06:06:38 +02:00
/* Builtins. */
enum alpha_builtin
{
ALPHA_BUILTIN_CMPBGE,
ALPHA_BUILTIN_EXTBL,
ALPHA_BUILTIN_EXTWL,
ALPHA_BUILTIN_EXTLL,
2002-06-04 06:06:38 +02:00
ALPHA_BUILTIN_EXTQL,
ALPHA_BUILTIN_EXTWH,
ALPHA_BUILTIN_EXTLH,
2002-06-04 06:06:38 +02:00
ALPHA_BUILTIN_EXTQH,
ALPHA_BUILTIN_INSBL,
ALPHA_BUILTIN_INSWL,
ALPHA_BUILTIN_INSLL,
ALPHA_BUILTIN_INSQL,
ALPHA_BUILTIN_INSWH,
ALPHA_BUILTIN_INSLH,
ALPHA_BUILTIN_INSQH,
ALPHA_BUILTIN_MSKBL,
ALPHA_BUILTIN_MSKWL,
ALPHA_BUILTIN_MSKLL,
ALPHA_BUILTIN_MSKQL,
ALPHA_BUILTIN_MSKWH,
ALPHA_BUILTIN_MSKLH,
ALPHA_BUILTIN_MSKQH,
ALPHA_BUILTIN_UMULH,
2002-06-04 06:06:38 +02:00
ALPHA_BUILTIN_ZAP,
ALPHA_BUILTIN_ZAPNOT,
ALPHA_BUILTIN_AMASK,
ALPHA_BUILTIN_IMPLVER,
ALPHA_BUILTIN_RPCC,
ALPHA_BUILTIN_THREAD_POINTER,
ALPHA_BUILTIN_SET_THREAD_POINTER,
ALPHA_BUILTIN_ESTABLISH_VMS_CONDITION_HANDLER,
ALPHA_BUILTIN_REVERT_VMS_CONDITION_HANDLER,
2002-06-04 06:06:38 +02:00
/* TARGET_MAX */
ALPHA_BUILTIN_MINUB8,
ALPHA_BUILTIN_MINSB8,
ALPHA_BUILTIN_MINUW4,
ALPHA_BUILTIN_MINSW4,
ALPHA_BUILTIN_MAXUB8,
ALPHA_BUILTIN_MAXSB8,
ALPHA_BUILTIN_MAXUW4,
ALPHA_BUILTIN_MAXSW4,
ALPHA_BUILTIN_PERR,
ALPHA_BUILTIN_PKLB,
ALPHA_BUILTIN_PKWB,
ALPHA_BUILTIN_UNPKBL,
ALPHA_BUILTIN_UNPKBW,
/* TARGET_CIX */
ALPHA_BUILTIN_CTTZ,
ALPHA_BUILTIN_CTLZ,
ALPHA_BUILTIN_CTPOP,
2002-06-04 06:06:38 +02:00
ALPHA_BUILTIN_max
};
static enum insn_code const code_for_builtin[ALPHA_BUILTIN_max] = {
CODE_FOR_builtin_cmpbge,
CODE_FOR_extbl,
CODE_FOR_extwl,
CODE_FOR_extll,
CODE_FOR_extql,
CODE_FOR_extwh,
CODE_FOR_extlh,
CODE_FOR_extqh,
CODE_FOR_builtin_insbl,
CODE_FOR_builtin_inswl,
CODE_FOR_builtin_insll,
CODE_FOR_insql,
CODE_FOR_inswh,
CODE_FOR_inslh,
CODE_FOR_insqh,
CODE_FOR_mskbl,
CODE_FOR_mskwl,
CODE_FOR_mskll,
CODE_FOR_mskql,
CODE_FOR_mskwh,
CODE_FOR_msklh,
CODE_FOR_mskqh,
CODE_FOR_umuldi3_highpart,
CODE_FOR_builtin_zap,
CODE_FOR_builtin_zapnot,
CODE_FOR_builtin_amask,
CODE_FOR_builtin_implver,
CODE_FOR_builtin_rpcc,
CODE_FOR_load_tp,
CODE_FOR_set_tp,
CODE_FOR_builtin_establish_vms_condition_handler,
CODE_FOR_builtin_revert_vms_condition_handler,
/* TARGET_MAX */
CODE_FOR_builtin_minub8,
CODE_FOR_builtin_minsb8,
CODE_FOR_builtin_minuw4,
CODE_FOR_builtin_minsw4,
CODE_FOR_builtin_maxub8,
CODE_FOR_builtin_maxsb8,
CODE_FOR_builtin_maxuw4,
CODE_FOR_builtin_maxsw4,
CODE_FOR_builtin_perr,
CODE_FOR_builtin_pklb,
CODE_FOR_builtin_pkwb,
CODE_FOR_builtin_unpkbl,
CODE_FOR_builtin_unpkbw,
/* TARGET_CIX */
CODE_FOR_ctzdi2,
CODE_FOR_clzdi2,
CODE_FOR_popcountdi2
};
2002-06-04 06:06:38 +02:00
struct alpha_builtin_def
{
const char *name;
enum alpha_builtin code;
unsigned int target_mask;
bool is_const;
2002-06-04 06:06:38 +02:00
};
static struct alpha_builtin_def const zero_arg_builtins[] = {
{ "__builtin_alpha_implver", ALPHA_BUILTIN_IMPLVER, 0, true },
{ "__builtin_alpha_rpcc", ALPHA_BUILTIN_RPCC, 0, false }
2002-06-04 06:06:38 +02:00
};
static struct alpha_builtin_def const one_arg_builtins[] = {
{ "__builtin_alpha_amask", ALPHA_BUILTIN_AMASK, 0, true },
{ "__builtin_alpha_pklb", ALPHA_BUILTIN_PKLB, MASK_MAX, true },
{ "__builtin_alpha_pkwb", ALPHA_BUILTIN_PKWB, MASK_MAX, true },
{ "__builtin_alpha_unpkbl", ALPHA_BUILTIN_UNPKBL, MASK_MAX, true },
{ "__builtin_alpha_unpkbw", ALPHA_BUILTIN_UNPKBW, MASK_MAX, true },
{ "__builtin_alpha_cttz", ALPHA_BUILTIN_CTTZ, MASK_CIX, true },
{ "__builtin_alpha_ctlz", ALPHA_BUILTIN_CTLZ, MASK_CIX, true },
{ "__builtin_alpha_ctpop", ALPHA_BUILTIN_CTPOP, MASK_CIX, true }
2002-06-04 06:06:38 +02:00
};
static struct alpha_builtin_def const two_arg_builtins[] = {
{ "__builtin_alpha_cmpbge", ALPHA_BUILTIN_CMPBGE, 0, true },
{ "__builtin_alpha_extbl", ALPHA_BUILTIN_EXTBL, 0, true },
{ "__builtin_alpha_extwl", ALPHA_BUILTIN_EXTWL, 0, true },
{ "__builtin_alpha_extll", ALPHA_BUILTIN_EXTLL, 0, true },
{ "__builtin_alpha_extql", ALPHA_BUILTIN_EXTQL, 0, true },
{ "__builtin_alpha_extwh", ALPHA_BUILTIN_EXTWH, 0, true },
{ "__builtin_alpha_extlh", ALPHA_BUILTIN_EXTLH, 0, true },
{ "__builtin_alpha_extqh", ALPHA_BUILTIN_EXTQH, 0, true },
{ "__builtin_alpha_insbl", ALPHA_BUILTIN_INSBL, 0, true },
{ "__builtin_alpha_inswl", ALPHA_BUILTIN_INSWL, 0, true },
{ "__builtin_alpha_insll", ALPHA_BUILTIN_INSLL, 0, true },
{ "__builtin_alpha_insql", ALPHA_BUILTIN_INSQL, 0, true },
{ "__builtin_alpha_inswh", ALPHA_BUILTIN_INSWH, 0, true },
{ "__builtin_alpha_inslh", ALPHA_BUILTIN_INSLH, 0, true },
{ "__builtin_alpha_insqh", ALPHA_BUILTIN_INSQH, 0, true },
{ "__builtin_alpha_mskbl", ALPHA_BUILTIN_MSKBL, 0, true },
{ "__builtin_alpha_mskwl", ALPHA_BUILTIN_MSKWL, 0, true },
{ "__builtin_alpha_mskll", ALPHA_BUILTIN_MSKLL, 0, true },
{ "__builtin_alpha_mskql", ALPHA_BUILTIN_MSKQL, 0, true },
{ "__builtin_alpha_mskwh", ALPHA_BUILTIN_MSKWH, 0, true },
{ "__builtin_alpha_msklh", ALPHA_BUILTIN_MSKLH, 0, true },
{ "__builtin_alpha_mskqh", ALPHA_BUILTIN_MSKQH, 0, true },
{ "__builtin_alpha_umulh", ALPHA_BUILTIN_UMULH, 0, true },
{ "__builtin_alpha_zap", ALPHA_BUILTIN_ZAP, 0, true },
{ "__builtin_alpha_zapnot", ALPHA_BUILTIN_ZAPNOT, 0, true },
{ "__builtin_alpha_minub8", ALPHA_BUILTIN_MINUB8, MASK_MAX, true },
{ "__builtin_alpha_minsb8", ALPHA_BUILTIN_MINSB8, MASK_MAX, true },
{ "__builtin_alpha_minuw4", ALPHA_BUILTIN_MINUW4, MASK_MAX, true },
{ "__builtin_alpha_minsw4", ALPHA_BUILTIN_MINSW4, MASK_MAX, true },
{ "__builtin_alpha_maxub8", ALPHA_BUILTIN_MAXUB8, MASK_MAX, true },
{ "__builtin_alpha_maxsb8", ALPHA_BUILTIN_MAXSB8, MASK_MAX, true },
{ "__builtin_alpha_maxuw4", ALPHA_BUILTIN_MAXUW4, MASK_MAX, true },
{ "__builtin_alpha_maxsw4", ALPHA_BUILTIN_MAXSW4, MASK_MAX, true },
{ "__builtin_alpha_perr", ALPHA_BUILTIN_PERR, MASK_MAX, true }
2002-06-04 06:06:38 +02:00
};
static GTY(()) tree alpha_v8qi_u;
static GTY(()) tree alpha_v8qi_s;
static GTY(()) tree alpha_v4hi_u;
static GTY(()) tree alpha_v4hi_s;
static GTY(()) tree alpha_builtins[(int) ALPHA_BUILTIN_max];
/* Return the alpha builtin for CODE. */
static tree
alpha_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED)
{
if (code >= ALPHA_BUILTIN_max)
return error_mark_node;
return alpha_builtins[code];
}
/* Helper function of alpha_init_builtins. Add the built-in specified
by NAME, TYPE, CODE, and ECF. */
static void
alpha_builtin_function (const char *name, tree ftype,
enum alpha_builtin code, unsigned ecf)
{
tree decl = add_builtin_function (name, ftype, (int) code,
BUILT_IN_MD, NULL, NULL_TREE);
if (ecf & ECF_CONST)
TREE_READONLY (decl) = 1;
if (ecf & ECF_NOTHROW)
TREE_NOTHROW (decl) = 1;
alpha_builtins [(int) code] = decl;
}
/* Helper function of alpha_init_builtins. Add the COUNT built-in
functions pointed to by P, with function type FTYPE. */
static void
alpha_add_builtins (const struct alpha_builtin_def *p, size_t count,
tree ftype)
{
size_t i;
for (i = 0; i < count; ++i, ++p)
if ((target_flags & p->target_mask) == p->target_mask)
alpha_builtin_function (p->name, ftype, p->code,
(p->is_const ? ECF_CONST : 0) | ECF_NOTHROW);
}
2002-06-04 06:06:38 +02:00
static void
alpha_init_builtins (void)
2002-06-04 06:06:38 +02:00
{
tree dimode_integer_type_node;
tree ftype;
2002-06-04 06:06:38 +02:00
dimode_integer_type_node = lang_hooks.types.type_for_mode (DImode, 0);
ftype = build_function_type_list (dimode_integer_type_node, NULL_TREE);
alpha_add_builtins (zero_arg_builtins, ARRAY_SIZE (zero_arg_builtins),
ftype);
2002-06-04 06:06:38 +02:00
ftype = build_function_type_list (dimode_integer_type_node,
dimode_integer_type_node, NULL_TREE);
alpha_add_builtins (one_arg_builtins, ARRAY_SIZE (one_arg_builtins),
ftype);
2002-06-04 06:06:38 +02:00
ftype = build_function_type_list (dimode_integer_type_node,
dimode_integer_type_node,
dimode_integer_type_node, NULL_TREE);
alpha_add_builtins (two_arg_builtins, ARRAY_SIZE (two_arg_builtins),
ftype);
ftype = build_function_type_list (ptr_type_node, NULL_TREE);
alpha_builtin_function ("__builtin_thread_pointer", ftype,
ALPHA_BUILTIN_THREAD_POINTER, ECF_NOTHROW);
ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
alpha_builtin_function ("__builtin_set_thread_pointer", ftype,
ALPHA_BUILTIN_SET_THREAD_POINTER, ECF_NOTHROW);
if (TARGET_ABI_OPEN_VMS)
{
ftype = build_function_type_list (ptr_type_node, ptr_type_node,
NULL_TREE);
alpha_builtin_function ("__builtin_establish_vms_condition_handler",
ftype,
ALPHA_BUILTIN_ESTABLISH_VMS_CONDITION_HANDLER,
0);
ftype = build_function_type_list (ptr_type_node, void_type_node,
NULL_TREE);
alpha_builtin_function ("__builtin_revert_vms_condition_handler", ftype,
ALPHA_BUILTIN_REVERT_VMS_CONDITION_HANDLER, 0);
vms_patch_builtins ();
}
alpha_v8qi_u = build_vector_type (unsigned_intQI_type_node, 8);
alpha_v8qi_s = build_vector_type (intQI_type_node, 8);
alpha_v4hi_u = build_vector_type (unsigned_intHI_type_node, 4);
alpha_v4hi_s = build_vector_type (intHI_type_node, 4);
2002-06-04 06:06:38 +02:00
}
/* Expand an expression EXP that calls a built-in function,
with result going to TARGET if that's convenient
(and in mode MODE if that's convenient).
SUBTARGET may be used as the target for computing one of EXP's operands.
IGNORE is nonzero if the value is to be ignored. */
static rtx
alpha_expand_builtin (tree exp, rtx target,
rtx subtarget ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
int ignore ATTRIBUTE_UNUSED)
2002-06-04 06:06:38 +02:00
{
#define MAX_ARGS 2
tree.h (enum tree_code_class): Add tcc_vl_exp. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree.h (enum tree_code_class): Add tcc_vl_exp. (VL_EXP_CLASS_P): New. (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (TREE_OPERAND_CHECK_CODE): Likewise. (GIMPLE_STMT_OPERAND_CHECK): Likewise. (TREE_RTL_OPERAND_CHECK): Likewise. (tree_operand_check_failed): Make second parameter the whole tree instead of its code. Fixed callers. (VL_EXP_CHECK): New. (TREE_OPERAND_LENGTH): New. (VL_EXP_OPERAND_LENGTH): New. (CALL_EXPR_FN): New. (CALL_EXPR_STATIC_CHAIN): New. (CALL_EXPR_ARGS): New. (CALL_EXPR_ARG): New. (call_expr_nargs): New. (CALL_EXPR_ARGP): New. (build_nt_call_list): Declare. (build_vl_exp_stat): Declare. (build_vl_exp): New. (build_call_list): Declare. (build_call_nary): Declare. (build_call_valist): Declare. (build_call_array): Declare. (call_expr_arg): Declare. (call_expr_argp): Declare. (call_expr_arglist): Declare. (fold_build_call_list): Declare. (fold_build_call_list_initializer): Declare. (fold_call_expr): Declare to replace fold_builtin. (fold_builtin_fputs): Update to agree with modified definition. (fold_builtin_strcpy): Likewise. (fold_builtin_strncpy): Likewise. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_next_arg): Likewise. (fold_build_call_expr): Declare. (fold_builtin_call_list): Declare. (fold_builtin_call_valist): Declare. (build_call_expr): Declare. (validate_arglist): Update to agree with modified definition. (tree_operand_length): New. (call_expr_arg_iterator): New. (init_call_expr_arg_iterator): New. (next_call_expr_arg): New. (first_call_expr_arg): New. (more_call_expr_args_p): New. (FOR_EACH_CALL_EXPR_ARG): New. * tree.c (tree_code_class_string): Add entries for tcc_vl_exp and tcc_gimple_stmt. (tree_code_size): Update documentation. Use sizeof (tree) rather than sizeof (char *). (tree_size): Likewise. Add case for tcc_vl_exp. (tree_node_structure): Add case for tcc_vl_exp. (contains_placeholder_p): Likewise. (substitute_in_expr): Likewise. (substitute_placeholder_in_expr): Likewise. (stabilize_reference_1): Likewise. (build3_stat): Remove logic for CALL_EXPRs. Replace with assertion to diagnose breakage of this interface for constructing CALL_EXPRs. (build_nt): Add similar assertion here. (build_nt_call_list): New. (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors. (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (get_callee_fndecl): Use new CALL_EXPR accessors. (tree_operand_check_failed): Change parameters to pass entire node instead of its code, so that we can call TREE_OPERAND_LENGTH on it. (process_call_operands): New. (build_vl_exp_stat): New. (build_call_list): New. (build_call_nary): New. (build_call_valist): New. (build_call_array): New. (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (call_expr_arglist): New. * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use tcc_vl_exp instead of a fixed-size tcc_expression. * doc/c-tree.texi (CALL_EXPR): Document new representation and accessors for CALL_EXPRs. (AGGR_INIT_EXPR): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * builtins.c (c_strlen): Return NULL_TREE instead of 0. (expand_builtin_nonlocal_goto): Change parameter to be entire CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors. (expand_builtin_prefetch): Likewise. (expand_builtin_classify_type): Likewise. (mathfn_built_in): Return NULL_TREE instead of 0. (expand_errno_check): Use new CALL_EXPR accessors. (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_int_roundingfn): Likewise. (expand_builtin_int_roundingfn_2): Likewise. (expand_builtin_pow): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead of arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_strstr): Likewise. (expand_builtin_strchr): Likewise. (expand_builtin_strrchr): Likewise. (expand_builtin_strpbrk): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_mempcpy): Likewise. (expand_builtin_mempcpy_args): New. (expand_builtin_memmove): Similarly to expand_builtin_mempcpy. (expand_builtin_memmove_args): New. (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy. (expand_movstr): Likewise. (expand_builtin_strcpy): Likewise. (expand_builtin_strcpy_args): New. (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_memset_args): New. (expand_builtin_bzero): Similarly to expand_builtin_memset. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (expand_builtin_strcat): Likewise. (expand_builtin_strncat): Likewise. (expand_builtin_strspn): Likewise. (expand_builtin_strcspn): Likewise. (expand_builtin_args_info): Likewise. (expand_builtin_va_start): Likewise. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_end): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_frame_address): Likewise. (expand_builtin_alloca): Likewise. (expand_builtin_bswap): Likewise. (expand_builtin_unop): Likewise. (expand_builtin_fputs): Likewise. (expand_builtin_expect): Likewise. (expand_builtin_fabs): Likewise. (expand_builtin_copysign): Likewise. (expand_builtin_printf): Likewise. (expand_builtin_fprintf): Likewise. (expand_builtin_sprintf): Likewise. (expand_builtin_init_trampoline): Likewise. (expand_builtin_signbit): Likewise. (expand_builtin_fork_or_exec): Likewise. (expand_builtin_sync_operation): Likewise. (expand_builtin_compare_and_swap): Likewise. (expand_builtin_lock_test_and_set): Likewise. (expand_builtin_lock_release): Likewise. (expand_builtin): Likewise. (builtin_mathfn_code): Likewise. (fold_builtin_constant_p): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_expect): Likewise. (fold_builtin_classify_type): Likewise. (fold_builtin_strlen): Likewise. (fold_builtin_nan): Likewise. (integer_valued_real_p): Likewise. (fold_trunc_transparent_mathfn): Likewise. (fold_fixed_mathfn): Likewise. (fold_builtin_cabs): Likewise. (fold_builtin_sqrt): Likewise. (fold_builtin_cbrt): Likewise. (fold_builtin_cos): Likewise. (fold_builtin_cosh): Likewise. (fold_builtin_tan): Likewise. (fold_builtin_sincos): Likewise. (fold_builtin_cexp): Likewise. (fold_builtin_trunc): Likewise. (fold_builtin_floor): Likewise. (fold_builtin_ceil): Likewise. (fold_builtin_round): Likewise. (fold_builtin_int_roundingfn): Likewise. (fold_builtin_bitop): Likewise. (fold_builtin_bswap): Likewise. (fold_builtin_logarithm): Likewise. (fold_builtin_hypot): Likewise. (fold_builtin_pow): Likewise. (fold_builtin_powi): Likewise. (fold_builtin_exponent): Likewise. (fold_builtin_memset): Likewise. (fold_builtin_bzero): Likewise. (fold_builtin_memory_op): Likewise. (fold_builtin_bcopy): Deleted; call site changed to invoke fold_builtin_memory_op directly. (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op. (fold_builtin_strncpy): Likewise. (fold_builtin_memcmp): Likewise. (fold_builtin_strcmp): Likewise. (fold_builtin_strncmp): Likewise. (fold_builtin_signbit): Likewise. (fold_builtin_copysign): Likewise. (fold_builtin_isascii): Likewise. (fold_builtin_toascii): Likewise. (fold_builtin_isdigit): Likewise. (fold_builtin_fabs): Likewise. (fold_builtin_abs): Likewise. (fold_builtin_fmin_fmax): Likewise. (fold_builtin_carg): Likewise. (fold_builtin_classify): Likewise. (fold_builtin_unordered_cmp): Likewise. (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4): New functions split out from fold_builtin_1. (fold_builtin_n): New. (fold_builtin_varargs): New. (fold_builtin): Deleted. Most callers changed to use fold_call_expr instead. (fold_call_expr): New. (build_function_call_expr): Rewrite to use new helper function. (fold_builtin_call_list): New. (build_call_expr): New. (fold_builtin_call_valist): New. (rewrite_call_expr): New. (validate_arg): New. (validate_arglist): Change parameter to be entire CALL_EXPR instead of an arglist. Change return type to bool. Use new CALL_EXPR accessors. (fold_builtin_strstr): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (fold_builtin_strncat): Likewise. (fold_builtin_strspn): Likewise. (fold_builtin_strcspn): Likewise. (fold_builtin_fputs): Likewise. (fold_builtin_next_arg): Likewise. (fold_builtin_sprintf): Likewise. (expand_builtin_object_size): Use new CALL_EXPR accessors. Use NULL_RTX instead of 0. (expand_builtin_memory_chk): Likewise. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (fold_builtin_object_size): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strncat_chk): Likewise. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_printf): Likewise. (fold_builtin_vprintf): Likewise. * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and constructors. (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case. (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (extract_muldiv_1): Add VL_EXP_CLASS_P case. (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Remove CALL_EXPR case, since they are no longer ternary expressions. (fold): Add logic for tcc_vl_exp. (fold_checksum_tree): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (fold_build3_stat): Add assertion to flag broken interface for constructing CALL_EXPRs. (fold_build_call_list): New. (fold_build_call_list_initializer): New. (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and constructors. (fold_strip_sign_ops): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR accessors and dump arguments explicitly. * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (dump_generic_node): Use new CALL_EXPR accessors and walk arguments explicitly. (print_call_name): Use new CALL_EXPR accessors. * print-tree.c (print_node): Add case tcc_vl_exp. Print CALL_EXPR arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors. (vrp_visit_stmt): Likewise. * tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (force_move_till_expr): Likewise. * targhooks.c (default_external_stack_protect_fail): Use build_call_expr instead of build_function_call_expr. (default_hidden_stack_protect_fail): Likewise. * tree-complex.c (expand_complex_libcall): Use build_call_expr to build the call. * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors and walk arguments explicitly. * tree-ssa-loop-niter.c (simplify_replace_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_simple_operations): Likewise. (infer_loop_bounds_from_array): Use new CALL_EXPR accessors. * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs. * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * value_prof.c (tree_ic): Use new CALL_EXPR accessors. (tree_ic_transform): Likewise. (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as parameter instead of arglist. Fix callers. (tree_stringop_fixed_value): Use new CALL_EXPR accessors. (tree_stringops_transform): Likewise. (tree_indirect_call_to_profile): Likewise. (tree_stringops_values_to_profile): Likewise. * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator. (eliminate_tail_call): Likewise. * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (instantiate_parameters_1): Can't handle tcc_vl_exp here. * omp-low.c (build_omp_barrier): Use build_call_expr. (lower_rec_input_clauses): Likewise. (lower_reduction_clauses): Likewise. (expand_parallel_call): Likewise. (maybe_catch_exception): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_sections): Likewise. (lower_omp_single_simple): Likewise. (lower_omp_single_copy): Likewise. (lower_omp_master): Likewise. (lower_omp_ordered): Likewise. (lower_omp_critical): Likewise. * ipa-reference.c (check-call): Use new CALL_EXPR iterator. (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR. * tree-gimple.c (is_gimple_call_addr): Fix doc. (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. Add tcc_vl_exp case. * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH. * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors. * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use fold_call_expr instead of fold_builtin. (ccp_fold_builtin): Likewise. Update calls into builtins.c to match declarations there. (fold_stmt): Use new CALL_EXPR constructor and accessors. Doc updates. * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors. (scan_function): Add case tcc_vl_exp for CALL_EXPR. * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR accessors. * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr. (execute_cse_sincos): Use new CALL_EXPR accessors. * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator. * gimple-low.c (lower_function_body): Use build_call_expr. (lower_builtin_setjmp): Likewise. * expr.c (emit_block_move_via_libcall): Use build_call_expr. (set_storage_via_libcall): Likewise. (safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_expr_real_1): Use new CALL_EXPR accessors. * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (TB_parent_eq): Likewise. * predict.c (expr_expected_value): Use new CALL_EXPR accessors. (strip_builtin_expect): Likewise. * function.c (gimplify_parameters): Use build_call_expr. * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators. (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR. * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR iterators. * gimplify.c (build_stack_save_restore): Use build_call_expr. (gimplify_decl_expr): Likewise. (gimplify_call_expr): Use fold_call_expr instead of fold_builtin. Use new CALL_EXPR iterators. (gimplify_modify_expr_to_memcpy): Use build_call_expr. (gimplify_modify_expr_to_memset): Likewise. (gimplify_variable_sized_compare): Likewise. (gimplify_omp_atomic_fetch_op): Likewise. (gimplify_omp_atomic_pipeline): Likewise. (gimplify_omp_atomic_mutex): Likewise. (gimplify_function_tree): Likewise. * calls.c (alloca_call_p): Use new CALL_EXPR accessors. (call_expr_flags): Likewise. (expand_call): Likewise. * except.c (expand_builtin_eh_return_data_regno): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. * coverage.c (create_coverage): Use build_call_expr. * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete. (temp_call_expr_obstack): New. (pool_copy_list): Delete. (temp_copy_call_expr): New. (phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. Get rid of special goo for copying argument lists and use temp_copy_call_expr instead. (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. (create_expression_by_pieces): Likewise. Use build_call_array to construct the result instead of fold_build3. (create_value_expr_from): Add tcc_vl_exp. Delete special goo for dealing with argument lists. (init_pre): Remove references to expression_node_pool and list_node_pool. Init temp_call_expr_obstack instead. (fini_pre): Remove references to expression_node_pool and list_node_pool. * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors and walk arguments explicitly instead of as a list. * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr. (mx_register_decls): Likewise. (mudflap_register_call): Likewise. (mudflap_finish_file): Likewise. * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors. (ipa_callsite_compute_param): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR accessors and constructor. * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR accessors and constructor. (convert_tramp_reference): Likewise. (convert_call_expr): Likewise. (finalize_nesting_tree_1): Likewise. * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR accessors. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr. * tree-inline.c (initialize_inlined_parameters): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. (estimate_num_insns_1): Use new CALL_EXPR accessors. (expand_call_inline): Tidy up call to initialize_inlined_parameters. * tree-vect-transform.c (vect_create_epilog_for_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (vectorizable_reduction): Likewise. (vectorizable_call): Use new CALL_EXPR iterators. (vectorizable_conversion): Use build_call_expr. (vectorizable_operation): Use TREE_OPERAND_LENGTH. (vect_gen_widened_results_half): Use build_call_expr. (vect_setup_realignment): Likewise. (vectorizable_live_operation): Use TREE_OPERAND_LENGTH. * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors. (pass_through_call): Likewise. (compute_object_sizes): Likewise. Use fold_call_expr instead of fold_builtin. * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr. (tree_gen_pow2_profiler): Likewise. (tree_gen_one_value_profiler): Likewise. (tree_gen_ic_func_profiler): Likewise. (tree_gen_average_profiler): Likewise. (tree_gen_ior_profiler): Likewise. * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp. (find_func_aliases): Use new CALL_EXPR accessors. Add case tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * convert.c (convert_to_real): Use new CALL_EXPR accessors and constructor. (convert_to_integer): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR accessors. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr. (sparc_expand_builtin): Use new CALL_EXPR accessors. * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise. (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors on it. Fix callers. (ix86_expand_store_builtin): Likewise. (ix86_expand_unop_builtin): Likewise. (ix86_expand_unop1_builtin): Likewise. (ix86_expand_sse_compare): Likewise. (ix86_expand_sse_comi): Likewise. (ix86_expand_vec_init_builtin): Likewise. (ix86_expand_vec_ext_builtin): Likewise. (ix86_expand_vec_set_builtin): Likewise. (ix86_expand_builtin): Use new CALL_EXPR accessors. * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (iq2000_expand_builtin): Use new CALL_EXPR accessors. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use build_call_expr. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_predicate_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (spe_expand_stv_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_ld_builtin): Use new CALL_EXPR accessors. (altivec_expand_st_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_vec_set_builtin): Likewise. (altivec_expand_vec_ext_builtin): Likewise. (altivec_expand_builtin): Use new CALL_EXPR accessors. (spe_expand_builtin): Likewise. (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (spe_expand_evsel_builtin): Likewise. (rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and FCFSX cases must construct whole new CALL_EXPR, not just arglist. * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (arm_expand_unop_builtin): Likewise. (arm_expand_builtin): Use new CALL_EXPR accessors. * config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR accessors. * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * c-semantics.c (build_stmt): Add internal diagnostic check. * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR accessors. Print arguments explicitly instead of as a list. * c-typeck.c (build_function_call): Use new CALL_EXPR constructors. * c-omp.c (c_finish_omp_barrier): Use build_call_expr. (c_finish_omp_flish): Likewise. * c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (check_function_arguments_recurse): Use new CALL_EXPR accessors. (c_warn_unused_result): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation. Change class to tcc_vl_exp. * call.c (build_call): Use build_call_list instead of build3. (build_over_call): Likewise. (build_new_method_call): Use build_min_non_dep_call_list instead of build_min_non_dep. * error.c (dump_call_expr_args): New function. (dump_aggr_init_expr_args): New function. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. * cvt.c (convert_to_void): Use build_call_array instead of build3; use new AGGR_INIT_EXPR accessor macros. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new AGGR_INIT_EXPR accessor macros. * cp-gimplify.c (cp_gimplify_init_expr): Use AGGR_INIT_EXPR_SLOT to set the slot operand. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro. (AGGR_INIT_EXPR_SLOT): New macro. (AGGR_INIT_EXPR_ARG): New macro. (aggr_init_expr_nargs): New macro. (AGGR_INIT_EXPR_ARGP): New macro. (aggr_init_expr_arg_iterator): New. (init_aggr_init_expr_arg_iterator): New. (next_aggr_init_expr_arg): New. (first_aggr_init_expr_arg): New. (more_aggr_init_expr_args_p): New. (FOR_EACH_AGGR_INIT_EXPR_ARG): New. (stabilize_aggr_init): New declaration. (build_min_non_dep_call_list): Likewise. * tree.c (process_aggr_init_operands): New function. (build_aggr_init_array) New function. (build_cplus_new): Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. Replace use of build3 with build_aggr_init_array. (build_min_non_dep_call_list) New function. (build_min_nt): Assert input code parameter is not a variable length expression class. (build_min, build_min_non_dep): Likewise. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments to check for equality instead of recursing. Handle tcc_vl_exp tree code classes. (stabilize_call): Update to only handle CALL_EXPRs, not AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros. (stabilize_aggr_init): New function. (stabilize_init): Use it. * cxx-pretty-print.c (pp_cxx_postfix_expression) <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros and argument iterators. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with build_vl_exp. Iterate through the operands, recursively processing each one. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new CALL_EXPR accessor macros. (value_dependent_expression_p) <default>: Handle tcc_vl_exp tree code classes. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * semantics.c (finish_call_expr): Use build_nt_call_list instead of build_nt. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR accessor macros. Use build_call_array to construct the CALL_EXPR node instead of build3 * decl2.c (build_offset_ref_call_from_tree): Use build_nt_call_list and build_min_non_dep_call_list instead of build_min_nt and build_min_non_dep. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>: Use build_nt_call_list instead of build_min_nt. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead of build3. (BUILD_MONITOR_EXIT): Likewise. * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. (java_gimplify_modify_expr): Likewise. * class.c (cache_this_class_ref): Use build_call_expr. (build_static_field_ref): Likewise. (emit_indirect_register_classes): Likewise. (emit_register_classes): Likewise. * resource.c (write_resource_constructor): Use build_call_expr. * builtins.c (builtin_creator_function): Change interpretation of the second parameter to be the whole CALL_EXPR instead of the arglist. (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (min_builtin): Likewise. (abs_builtin): Likewise. (java_build_function_call_expr): Likewise. (convert_real): Likewise. (UNMARSHAL3): Likewise. (UNMARSHAL4): Likewise. (UNMARSHAL5): Likewise. (build_arglist_for_builtin): Delete. Fix callers to use build_call_expr instead. (putObject_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (compareAndSwapInt_builtin): Likewise. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. (putVolatile_builtin): Likewise. (getVolatile_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. (check_for_builtin): Pass entire CALL_EXPR to builtin expander instead of arglist. * expr.c (build_java_athrow): Use build_call_nary instead of build3. (build_java_throw_out_of_bounds_exception): Likewise. (java_check_reference): Likewise. (build_java_arraystore_check): Likewise. (build_newarray): Likewise. (build_anewarray): Likewise. (expand_java_multinewarray): Use build_call_list instead of build3. (build_java_monitor): Use build_call_nary instead of build3. (java_create_object): Likewise. (expand_java_NEW): Likewise. (build_instanceof): Likewise. (expand_java_CHECKCAST): Likewise. (build_java_soft_divmod): Likewise. (build_java_binop): Likewise. (build_field_ref): Likewise. (build_class_init): Likewise. (rewrite_arglist_getcaller): Use build_call_expr. (build_invokeinterface): Use build_call_nary instead of build3. (expand_invoke): Use build_call_list instead of build3. (build_jni_stub): Use build_call_nary, build_call_list, or build_call_expr instead of build3. (expand_java_field_op): Use build_call_expr instead of build3. (force_evaluation_order): Use new CALL_EXPR accessors. * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors. (objc_get_callee_fndecl): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * trans-expr.c (gfc_conv_power_op): Use build_call_expr. (gfc_conv_string_tmp): Likewise. (gfc_conv_concat_op): Likewise. (gfc_build_compare_string): Likewise. (gfc_conv_function_call): Use build_call_list instead of build3. * trans-array.c (gfc_trans_allocate_array_storage): Use build_call_expr. (gfc_grow_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (gfc_array_allocate): Likewise. (gfc_array_deallocate): Likewise. (gfc_trans_auto_array_allocation): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (gfc_trans_dealloc_allocated): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr. (gfc_trans_omp_flush): Likewise. * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr. (gfc_trans_pause): Likewise. (gfc_trans_stop): Likewise. (gfc_trans_character_select): Likewise. (gfc_do_allocate): Likewise. (gfc_trans_assign_need_temp): Likewise. (gfc_trans_pointer_assign_need_temp): Likewise. (gfc_trans_forall_1): Likewise. (gfc_trans_where_2): Likewise. (gfc_trans_allocate): Likewise. (gfc_trans_deallocate): Likewise. * trans.c (gfc_trans_runtime_check): Use build_call_expr. * trans-io.c (gfc_trans_open): Use build_call_expr. (gfc_trans_close): Likewise. (build_filepos): Likewise. (gfc_trans_inquire): Likewise. (NML_FIRST_ARG): Delete. (NML_ADD_ARG): Delete. (transfer_namelist_element): Use build_call_expr. (build_dt): Likewise. (gfc_trans_dt_end): Likewise. (transfer_expr): Likewise. (transfer_array-desc): Likewise. * trans-decl.c (gfc_generate_function_code): Use build_call_expr. (gfc_generate_constructors): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_associated): Likewise. (gfc_conv_intrinsic_si_kind): Likewise. (gfc_conv_intrinsic_trim): Likewise. (gfc_conv_intrinsic_repeat: Likewise. (gfc_conv_intrinsic_iargc): Likewise. Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com> Co-Authored-By: Lee Millward <lee.millward@codesourcery.com> From-SVN: r122018
2007-02-16 00:50:49 +01:00
tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
2002-06-04 06:06:38 +02:00
unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
tree.h (enum tree_code_class): Add tcc_vl_exp. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree.h (enum tree_code_class): Add tcc_vl_exp. (VL_EXP_CLASS_P): New. (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (TREE_OPERAND_CHECK_CODE): Likewise. (GIMPLE_STMT_OPERAND_CHECK): Likewise. (TREE_RTL_OPERAND_CHECK): Likewise. (tree_operand_check_failed): Make second parameter the whole tree instead of its code. Fixed callers. (VL_EXP_CHECK): New. (TREE_OPERAND_LENGTH): New. (VL_EXP_OPERAND_LENGTH): New. (CALL_EXPR_FN): New. (CALL_EXPR_STATIC_CHAIN): New. (CALL_EXPR_ARGS): New. (CALL_EXPR_ARG): New. (call_expr_nargs): New. (CALL_EXPR_ARGP): New. (build_nt_call_list): Declare. (build_vl_exp_stat): Declare. (build_vl_exp): New. (build_call_list): Declare. (build_call_nary): Declare. (build_call_valist): Declare. (build_call_array): Declare. (call_expr_arg): Declare. (call_expr_argp): Declare. (call_expr_arglist): Declare. (fold_build_call_list): Declare. (fold_build_call_list_initializer): Declare. (fold_call_expr): Declare to replace fold_builtin. (fold_builtin_fputs): Update to agree with modified definition. (fold_builtin_strcpy): Likewise. (fold_builtin_strncpy): Likewise. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_next_arg): Likewise. (fold_build_call_expr): Declare. (fold_builtin_call_list): Declare. (fold_builtin_call_valist): Declare. (build_call_expr): Declare. (validate_arglist): Update to agree with modified definition. (tree_operand_length): New. (call_expr_arg_iterator): New. (init_call_expr_arg_iterator): New. (next_call_expr_arg): New. (first_call_expr_arg): New. (more_call_expr_args_p): New. (FOR_EACH_CALL_EXPR_ARG): New. * tree.c (tree_code_class_string): Add entries for tcc_vl_exp and tcc_gimple_stmt. (tree_code_size): Update documentation. Use sizeof (tree) rather than sizeof (char *). (tree_size): Likewise. Add case for tcc_vl_exp. (tree_node_structure): Add case for tcc_vl_exp. (contains_placeholder_p): Likewise. (substitute_in_expr): Likewise. (substitute_placeholder_in_expr): Likewise. (stabilize_reference_1): Likewise. (build3_stat): Remove logic for CALL_EXPRs. Replace with assertion to diagnose breakage of this interface for constructing CALL_EXPRs. (build_nt): Add similar assertion here. (build_nt_call_list): New. (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors. (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (get_callee_fndecl): Use new CALL_EXPR accessors. (tree_operand_check_failed): Change parameters to pass entire node instead of its code, so that we can call TREE_OPERAND_LENGTH on it. (process_call_operands): New. (build_vl_exp_stat): New. (build_call_list): New. (build_call_nary): New. (build_call_valist): New. (build_call_array): New. (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (call_expr_arglist): New. * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use tcc_vl_exp instead of a fixed-size tcc_expression. * doc/c-tree.texi (CALL_EXPR): Document new representation and accessors for CALL_EXPRs. (AGGR_INIT_EXPR): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * builtins.c (c_strlen): Return NULL_TREE instead of 0. (expand_builtin_nonlocal_goto): Change parameter to be entire CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors. (expand_builtin_prefetch): Likewise. (expand_builtin_classify_type): Likewise. (mathfn_built_in): Return NULL_TREE instead of 0. (expand_errno_check): Use new CALL_EXPR accessors. (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_int_roundingfn): Likewise. (expand_builtin_int_roundingfn_2): Likewise. (expand_builtin_pow): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead of arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_strstr): Likewise. (expand_builtin_strchr): Likewise. (expand_builtin_strrchr): Likewise. (expand_builtin_strpbrk): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_mempcpy): Likewise. (expand_builtin_mempcpy_args): New. (expand_builtin_memmove): Similarly to expand_builtin_mempcpy. (expand_builtin_memmove_args): New. (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy. (expand_movstr): Likewise. (expand_builtin_strcpy): Likewise. (expand_builtin_strcpy_args): New. (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_memset_args): New. (expand_builtin_bzero): Similarly to expand_builtin_memset. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (expand_builtin_strcat): Likewise. (expand_builtin_strncat): Likewise. (expand_builtin_strspn): Likewise. (expand_builtin_strcspn): Likewise. (expand_builtin_args_info): Likewise. (expand_builtin_va_start): Likewise. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_end): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_frame_address): Likewise. (expand_builtin_alloca): Likewise. (expand_builtin_bswap): Likewise. (expand_builtin_unop): Likewise. (expand_builtin_fputs): Likewise. (expand_builtin_expect): Likewise. (expand_builtin_fabs): Likewise. (expand_builtin_copysign): Likewise. (expand_builtin_printf): Likewise. (expand_builtin_fprintf): Likewise. (expand_builtin_sprintf): Likewise. (expand_builtin_init_trampoline): Likewise. (expand_builtin_signbit): Likewise. (expand_builtin_fork_or_exec): Likewise. (expand_builtin_sync_operation): Likewise. (expand_builtin_compare_and_swap): Likewise. (expand_builtin_lock_test_and_set): Likewise. (expand_builtin_lock_release): Likewise. (expand_builtin): Likewise. (builtin_mathfn_code): Likewise. (fold_builtin_constant_p): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_expect): Likewise. (fold_builtin_classify_type): Likewise. (fold_builtin_strlen): Likewise. (fold_builtin_nan): Likewise. (integer_valued_real_p): Likewise. (fold_trunc_transparent_mathfn): Likewise. (fold_fixed_mathfn): Likewise. (fold_builtin_cabs): Likewise. (fold_builtin_sqrt): Likewise. (fold_builtin_cbrt): Likewise. (fold_builtin_cos): Likewise. (fold_builtin_cosh): Likewise. (fold_builtin_tan): Likewise. (fold_builtin_sincos): Likewise. (fold_builtin_cexp): Likewise. (fold_builtin_trunc): Likewise. (fold_builtin_floor): Likewise. (fold_builtin_ceil): Likewise. (fold_builtin_round): Likewise. (fold_builtin_int_roundingfn): Likewise. (fold_builtin_bitop): Likewise. (fold_builtin_bswap): Likewise. (fold_builtin_logarithm): Likewise. (fold_builtin_hypot): Likewise. (fold_builtin_pow): Likewise. (fold_builtin_powi): Likewise. (fold_builtin_exponent): Likewise. (fold_builtin_memset): Likewise. (fold_builtin_bzero): Likewise. (fold_builtin_memory_op): Likewise. (fold_builtin_bcopy): Deleted; call site changed to invoke fold_builtin_memory_op directly. (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op. (fold_builtin_strncpy): Likewise. (fold_builtin_memcmp): Likewise. (fold_builtin_strcmp): Likewise. (fold_builtin_strncmp): Likewise. (fold_builtin_signbit): Likewise. (fold_builtin_copysign): Likewise. (fold_builtin_isascii): Likewise. (fold_builtin_toascii): Likewise. (fold_builtin_isdigit): Likewise. (fold_builtin_fabs): Likewise. (fold_builtin_abs): Likewise. (fold_builtin_fmin_fmax): Likewise. (fold_builtin_carg): Likewise. (fold_builtin_classify): Likewise. (fold_builtin_unordered_cmp): Likewise. (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4): New functions split out from fold_builtin_1. (fold_builtin_n): New. (fold_builtin_varargs): New. (fold_builtin): Deleted. Most callers changed to use fold_call_expr instead. (fold_call_expr): New. (build_function_call_expr): Rewrite to use new helper function. (fold_builtin_call_list): New. (build_call_expr): New. (fold_builtin_call_valist): New. (rewrite_call_expr): New. (validate_arg): New. (validate_arglist): Change parameter to be entire CALL_EXPR instead of an arglist. Change return type to bool. Use new CALL_EXPR accessors. (fold_builtin_strstr): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (fold_builtin_strncat): Likewise. (fold_builtin_strspn): Likewise. (fold_builtin_strcspn): Likewise. (fold_builtin_fputs): Likewise. (fold_builtin_next_arg): Likewise. (fold_builtin_sprintf): Likewise. (expand_builtin_object_size): Use new CALL_EXPR accessors. Use NULL_RTX instead of 0. (expand_builtin_memory_chk): Likewise. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (fold_builtin_object_size): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strncat_chk): Likewise. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_printf): Likewise. (fold_builtin_vprintf): Likewise. * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and constructors. (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case. (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (extract_muldiv_1): Add VL_EXP_CLASS_P case. (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Remove CALL_EXPR case, since they are no longer ternary expressions. (fold): Add logic for tcc_vl_exp. (fold_checksum_tree): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (fold_build3_stat): Add assertion to flag broken interface for constructing CALL_EXPRs. (fold_build_call_list): New. (fold_build_call_list_initializer): New. (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and constructors. (fold_strip_sign_ops): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR accessors and dump arguments explicitly. * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (dump_generic_node): Use new CALL_EXPR accessors and walk arguments explicitly. (print_call_name): Use new CALL_EXPR accessors. * print-tree.c (print_node): Add case tcc_vl_exp. Print CALL_EXPR arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors. (vrp_visit_stmt): Likewise. * tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (force_move_till_expr): Likewise. * targhooks.c (default_external_stack_protect_fail): Use build_call_expr instead of build_function_call_expr. (default_hidden_stack_protect_fail): Likewise. * tree-complex.c (expand_complex_libcall): Use build_call_expr to build the call. * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors and walk arguments explicitly. * tree-ssa-loop-niter.c (simplify_replace_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_simple_operations): Likewise. (infer_loop_bounds_from_array): Use new CALL_EXPR accessors. * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs. * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * value_prof.c (tree_ic): Use new CALL_EXPR accessors. (tree_ic_transform): Likewise. (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as parameter instead of arglist. Fix callers. (tree_stringop_fixed_value): Use new CALL_EXPR accessors. (tree_stringops_transform): Likewise. (tree_indirect_call_to_profile): Likewise. (tree_stringops_values_to_profile): Likewise. * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator. (eliminate_tail_call): Likewise. * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (instantiate_parameters_1): Can't handle tcc_vl_exp here. * omp-low.c (build_omp_barrier): Use build_call_expr. (lower_rec_input_clauses): Likewise. (lower_reduction_clauses): Likewise. (expand_parallel_call): Likewise. (maybe_catch_exception): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_sections): Likewise. (lower_omp_single_simple): Likewise. (lower_omp_single_copy): Likewise. (lower_omp_master): Likewise. (lower_omp_ordered): Likewise. (lower_omp_critical): Likewise. * ipa-reference.c (check-call): Use new CALL_EXPR iterator. (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR. * tree-gimple.c (is_gimple_call_addr): Fix doc. (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. Add tcc_vl_exp case. * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH. * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors. * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use fold_call_expr instead of fold_builtin. (ccp_fold_builtin): Likewise. Update calls into builtins.c to match declarations there. (fold_stmt): Use new CALL_EXPR constructor and accessors. Doc updates. * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors. (scan_function): Add case tcc_vl_exp for CALL_EXPR. * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR accessors. * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr. (execute_cse_sincos): Use new CALL_EXPR accessors. * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator. * gimple-low.c (lower_function_body): Use build_call_expr. (lower_builtin_setjmp): Likewise. * expr.c (emit_block_move_via_libcall): Use build_call_expr. (set_storage_via_libcall): Likewise. (safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_expr_real_1): Use new CALL_EXPR accessors. * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (TB_parent_eq): Likewise. * predict.c (expr_expected_value): Use new CALL_EXPR accessors. (strip_builtin_expect): Likewise. * function.c (gimplify_parameters): Use build_call_expr. * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators. (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR. * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR iterators. * gimplify.c (build_stack_save_restore): Use build_call_expr. (gimplify_decl_expr): Likewise. (gimplify_call_expr): Use fold_call_expr instead of fold_builtin. Use new CALL_EXPR iterators. (gimplify_modify_expr_to_memcpy): Use build_call_expr. (gimplify_modify_expr_to_memset): Likewise. (gimplify_variable_sized_compare): Likewise. (gimplify_omp_atomic_fetch_op): Likewise. (gimplify_omp_atomic_pipeline): Likewise. (gimplify_omp_atomic_mutex): Likewise. (gimplify_function_tree): Likewise. * calls.c (alloca_call_p): Use new CALL_EXPR accessors. (call_expr_flags): Likewise. (expand_call): Likewise. * except.c (expand_builtin_eh_return_data_regno): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. * coverage.c (create_coverage): Use build_call_expr. * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete. (temp_call_expr_obstack): New. (pool_copy_list): Delete. (temp_copy_call_expr): New. (phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. Get rid of special goo for copying argument lists and use temp_copy_call_expr instead. (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. (create_expression_by_pieces): Likewise. Use build_call_array to construct the result instead of fold_build3. (create_value_expr_from): Add tcc_vl_exp. Delete special goo for dealing with argument lists. (init_pre): Remove references to expression_node_pool and list_node_pool. Init temp_call_expr_obstack instead. (fini_pre): Remove references to expression_node_pool and list_node_pool. * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors and walk arguments explicitly instead of as a list. * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr. (mx_register_decls): Likewise. (mudflap_register_call): Likewise. (mudflap_finish_file): Likewise. * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors. (ipa_callsite_compute_param): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR accessors and constructor. * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR accessors and constructor. (convert_tramp_reference): Likewise. (convert_call_expr): Likewise. (finalize_nesting_tree_1): Likewise. * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR accessors. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr. * tree-inline.c (initialize_inlined_parameters): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. (estimate_num_insns_1): Use new CALL_EXPR accessors. (expand_call_inline): Tidy up call to initialize_inlined_parameters. * tree-vect-transform.c (vect_create_epilog_for_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (vectorizable_reduction): Likewise. (vectorizable_call): Use new CALL_EXPR iterators. (vectorizable_conversion): Use build_call_expr. (vectorizable_operation): Use TREE_OPERAND_LENGTH. (vect_gen_widened_results_half): Use build_call_expr. (vect_setup_realignment): Likewise. (vectorizable_live_operation): Use TREE_OPERAND_LENGTH. * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors. (pass_through_call): Likewise. (compute_object_sizes): Likewise. Use fold_call_expr instead of fold_builtin. * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr. (tree_gen_pow2_profiler): Likewise. (tree_gen_one_value_profiler): Likewise. (tree_gen_ic_func_profiler): Likewise. (tree_gen_average_profiler): Likewise. (tree_gen_ior_profiler): Likewise. * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp. (find_func_aliases): Use new CALL_EXPR accessors. Add case tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * convert.c (convert_to_real): Use new CALL_EXPR accessors and constructor. (convert_to_integer): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR accessors. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr. (sparc_expand_builtin): Use new CALL_EXPR accessors. * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise. (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors on it. Fix callers. (ix86_expand_store_builtin): Likewise. (ix86_expand_unop_builtin): Likewise. (ix86_expand_unop1_builtin): Likewise. (ix86_expand_sse_compare): Likewise. (ix86_expand_sse_comi): Likewise. (ix86_expand_vec_init_builtin): Likewise. (ix86_expand_vec_ext_builtin): Likewise. (ix86_expand_vec_set_builtin): Likewise. (ix86_expand_builtin): Use new CALL_EXPR accessors. * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (iq2000_expand_builtin): Use new CALL_EXPR accessors. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use build_call_expr. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_predicate_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (spe_expand_stv_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_ld_builtin): Use new CALL_EXPR accessors. (altivec_expand_st_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_vec_set_builtin): Likewise. (altivec_expand_vec_ext_builtin): Likewise. (altivec_expand_builtin): Use new CALL_EXPR accessors. (spe_expand_builtin): Likewise. (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (spe_expand_evsel_builtin): Likewise. (rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and FCFSX cases must construct whole new CALL_EXPR, not just arglist. * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (arm_expand_unop_builtin): Likewise. (arm_expand_builtin): Use new CALL_EXPR accessors. * config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR accessors. * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * c-semantics.c (build_stmt): Add internal diagnostic check. * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR accessors. Print arguments explicitly instead of as a list. * c-typeck.c (build_function_call): Use new CALL_EXPR constructors. * c-omp.c (c_finish_omp_barrier): Use build_call_expr. (c_finish_omp_flish): Likewise. * c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (check_function_arguments_recurse): Use new CALL_EXPR accessors. (c_warn_unused_result): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation. Change class to tcc_vl_exp. * call.c (build_call): Use build_call_list instead of build3. (build_over_call): Likewise. (build_new_method_call): Use build_min_non_dep_call_list instead of build_min_non_dep. * error.c (dump_call_expr_args): New function. (dump_aggr_init_expr_args): New function. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. * cvt.c (convert_to_void): Use build_call_array instead of build3; use new AGGR_INIT_EXPR accessor macros. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new AGGR_INIT_EXPR accessor macros. * cp-gimplify.c (cp_gimplify_init_expr): Use AGGR_INIT_EXPR_SLOT to set the slot operand. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro. (AGGR_INIT_EXPR_SLOT): New macro. (AGGR_INIT_EXPR_ARG): New macro. (aggr_init_expr_nargs): New macro. (AGGR_INIT_EXPR_ARGP): New macro. (aggr_init_expr_arg_iterator): New. (init_aggr_init_expr_arg_iterator): New. (next_aggr_init_expr_arg): New. (first_aggr_init_expr_arg): New. (more_aggr_init_expr_args_p): New. (FOR_EACH_AGGR_INIT_EXPR_ARG): New. (stabilize_aggr_init): New declaration. (build_min_non_dep_call_list): Likewise. * tree.c (process_aggr_init_operands): New function. (build_aggr_init_array) New function. (build_cplus_new): Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. Replace use of build3 with build_aggr_init_array. (build_min_non_dep_call_list) New function. (build_min_nt): Assert input code parameter is not a variable length expression class. (build_min, build_min_non_dep): Likewise. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments to check for equality instead of recursing. Handle tcc_vl_exp tree code classes. (stabilize_call): Update to only handle CALL_EXPRs, not AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros. (stabilize_aggr_init): New function. (stabilize_init): Use it. * cxx-pretty-print.c (pp_cxx_postfix_expression) <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros and argument iterators. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with build_vl_exp. Iterate through the operands, recursively processing each one. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new CALL_EXPR accessor macros. (value_dependent_expression_p) <default>: Handle tcc_vl_exp tree code classes. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * semantics.c (finish_call_expr): Use build_nt_call_list instead of build_nt. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR accessor macros. Use build_call_array to construct the CALL_EXPR node instead of build3 * decl2.c (build_offset_ref_call_from_tree): Use build_nt_call_list and build_min_non_dep_call_list instead of build_min_nt and build_min_non_dep. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>: Use build_nt_call_list instead of build_min_nt. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead of build3. (BUILD_MONITOR_EXIT): Likewise. * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. (java_gimplify_modify_expr): Likewise. * class.c (cache_this_class_ref): Use build_call_expr. (build_static_field_ref): Likewise. (emit_indirect_register_classes): Likewise. (emit_register_classes): Likewise. * resource.c (write_resource_constructor): Use build_call_expr. * builtins.c (builtin_creator_function): Change interpretation of the second parameter to be the whole CALL_EXPR instead of the arglist. (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (min_builtin): Likewise. (abs_builtin): Likewise. (java_build_function_call_expr): Likewise. (convert_real): Likewise. (UNMARSHAL3): Likewise. (UNMARSHAL4): Likewise. (UNMARSHAL5): Likewise. (build_arglist_for_builtin): Delete. Fix callers to use build_call_expr instead. (putObject_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (compareAndSwapInt_builtin): Likewise. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. (putVolatile_builtin): Likewise. (getVolatile_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. (check_for_builtin): Pass entire CALL_EXPR to builtin expander instead of arglist. * expr.c (build_java_athrow): Use build_call_nary instead of build3. (build_java_throw_out_of_bounds_exception): Likewise. (java_check_reference): Likewise. (build_java_arraystore_check): Likewise. (build_newarray): Likewise. (build_anewarray): Likewise. (expand_java_multinewarray): Use build_call_list instead of build3. (build_java_monitor): Use build_call_nary instead of build3. (java_create_object): Likewise. (expand_java_NEW): Likewise. (build_instanceof): Likewise. (expand_java_CHECKCAST): Likewise. (build_java_soft_divmod): Likewise. (build_java_binop): Likewise. (build_field_ref): Likewise. (build_class_init): Likewise. (rewrite_arglist_getcaller): Use build_call_expr. (build_invokeinterface): Use build_call_nary instead of build3. (expand_invoke): Use build_call_list instead of build3. (build_jni_stub): Use build_call_nary, build_call_list, or build_call_expr instead of build3. (expand_java_field_op): Use build_call_expr instead of build3. (force_evaluation_order): Use new CALL_EXPR accessors. * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors. (objc_get_callee_fndecl): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * trans-expr.c (gfc_conv_power_op): Use build_call_expr. (gfc_conv_string_tmp): Likewise. (gfc_conv_concat_op): Likewise. (gfc_build_compare_string): Likewise. (gfc_conv_function_call): Use build_call_list instead of build3. * trans-array.c (gfc_trans_allocate_array_storage): Use build_call_expr. (gfc_grow_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (gfc_array_allocate): Likewise. (gfc_array_deallocate): Likewise. (gfc_trans_auto_array_allocation): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (gfc_trans_dealloc_allocated): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr. (gfc_trans_omp_flush): Likewise. * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr. (gfc_trans_pause): Likewise. (gfc_trans_stop): Likewise. (gfc_trans_character_select): Likewise. (gfc_do_allocate): Likewise. (gfc_trans_assign_need_temp): Likewise. (gfc_trans_pointer_assign_need_temp): Likewise. (gfc_trans_forall_1): Likewise. (gfc_trans_where_2): Likewise. (gfc_trans_allocate): Likewise. (gfc_trans_deallocate): Likewise. * trans.c (gfc_trans_runtime_check): Use build_call_expr. * trans-io.c (gfc_trans_open): Use build_call_expr. (gfc_trans_close): Likewise. (build_filepos): Likewise. (gfc_trans_inquire): Likewise. (NML_FIRST_ARG): Delete. (NML_ADD_ARG): Delete. (transfer_namelist_element): Use build_call_expr. (build_dt): Likewise. (gfc_trans_dt_end): Likewise. (transfer_expr): Likewise. (transfer_array-desc): Likewise. * trans-decl.c (gfc_generate_function_code): Use build_call_expr. (gfc_generate_constructors): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_associated): Likewise. (gfc_conv_intrinsic_si_kind): Likewise. (gfc_conv_intrinsic_trim): Likewise. (gfc_conv_intrinsic_repeat: Likewise. (gfc_conv_intrinsic_iargc): Likewise. Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com> Co-Authored-By: Lee Millward <lee.millward@codesourcery.com> From-SVN: r122018
2007-02-16 00:50:49 +01:00
tree arg;
call_expr_arg_iterator iter;
2002-06-04 06:06:38 +02:00
enum insn_code icode;
rtx op[MAX_ARGS], pat;
int arity;
bool nonvoid;
2002-06-04 06:06:38 +02:00
if (fcode >= ALPHA_BUILTIN_max)
internal_error ("bad builtin fcode");
icode = code_for_builtin[fcode];
if (icode == 0)
internal_error ("bad builtin fcode");
nonvoid = TREE_TYPE (TREE_TYPE (fndecl)) != void_type_node;
tree.h (enum tree_code_class): Add tcc_vl_exp. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree.h (enum tree_code_class): Add tcc_vl_exp. (VL_EXP_CLASS_P): New. (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (TREE_OPERAND_CHECK_CODE): Likewise. (GIMPLE_STMT_OPERAND_CHECK): Likewise. (TREE_RTL_OPERAND_CHECK): Likewise. (tree_operand_check_failed): Make second parameter the whole tree instead of its code. Fixed callers. (VL_EXP_CHECK): New. (TREE_OPERAND_LENGTH): New. (VL_EXP_OPERAND_LENGTH): New. (CALL_EXPR_FN): New. (CALL_EXPR_STATIC_CHAIN): New. (CALL_EXPR_ARGS): New. (CALL_EXPR_ARG): New. (call_expr_nargs): New. (CALL_EXPR_ARGP): New. (build_nt_call_list): Declare. (build_vl_exp_stat): Declare. (build_vl_exp): New. (build_call_list): Declare. (build_call_nary): Declare. (build_call_valist): Declare. (build_call_array): Declare. (call_expr_arg): Declare. (call_expr_argp): Declare. (call_expr_arglist): Declare. (fold_build_call_list): Declare. (fold_build_call_list_initializer): Declare. (fold_call_expr): Declare to replace fold_builtin. (fold_builtin_fputs): Update to agree with modified definition. (fold_builtin_strcpy): Likewise. (fold_builtin_strncpy): Likewise. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_next_arg): Likewise. (fold_build_call_expr): Declare. (fold_builtin_call_list): Declare. (fold_builtin_call_valist): Declare. (build_call_expr): Declare. (validate_arglist): Update to agree with modified definition. (tree_operand_length): New. (call_expr_arg_iterator): New. (init_call_expr_arg_iterator): New. (next_call_expr_arg): New. (first_call_expr_arg): New. (more_call_expr_args_p): New. (FOR_EACH_CALL_EXPR_ARG): New. * tree.c (tree_code_class_string): Add entries for tcc_vl_exp and tcc_gimple_stmt. (tree_code_size): Update documentation. Use sizeof (tree) rather than sizeof (char *). (tree_size): Likewise. Add case for tcc_vl_exp. (tree_node_structure): Add case for tcc_vl_exp. (contains_placeholder_p): Likewise. (substitute_in_expr): Likewise. (substitute_placeholder_in_expr): Likewise. (stabilize_reference_1): Likewise. (build3_stat): Remove logic for CALL_EXPRs. Replace with assertion to diagnose breakage of this interface for constructing CALL_EXPRs. (build_nt): Add similar assertion here. (build_nt_call_list): New. (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors. (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (get_callee_fndecl): Use new CALL_EXPR accessors. (tree_operand_check_failed): Change parameters to pass entire node instead of its code, so that we can call TREE_OPERAND_LENGTH on it. (process_call_operands): New. (build_vl_exp_stat): New. (build_call_list): New. (build_call_nary): New. (build_call_valist): New. (build_call_array): New. (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (call_expr_arglist): New. * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use tcc_vl_exp instead of a fixed-size tcc_expression. * doc/c-tree.texi (CALL_EXPR): Document new representation and accessors for CALL_EXPRs. (AGGR_INIT_EXPR): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * builtins.c (c_strlen): Return NULL_TREE instead of 0. (expand_builtin_nonlocal_goto): Change parameter to be entire CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors. (expand_builtin_prefetch): Likewise. (expand_builtin_classify_type): Likewise. (mathfn_built_in): Return NULL_TREE instead of 0. (expand_errno_check): Use new CALL_EXPR accessors. (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_int_roundingfn): Likewise. (expand_builtin_int_roundingfn_2): Likewise. (expand_builtin_pow): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead of arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_strstr): Likewise. (expand_builtin_strchr): Likewise. (expand_builtin_strrchr): Likewise. (expand_builtin_strpbrk): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_mempcpy): Likewise. (expand_builtin_mempcpy_args): New. (expand_builtin_memmove): Similarly to expand_builtin_mempcpy. (expand_builtin_memmove_args): New. (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy. (expand_movstr): Likewise. (expand_builtin_strcpy): Likewise. (expand_builtin_strcpy_args): New. (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_memset_args): New. (expand_builtin_bzero): Similarly to expand_builtin_memset. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (expand_builtin_strcat): Likewise. (expand_builtin_strncat): Likewise. (expand_builtin_strspn): Likewise. (expand_builtin_strcspn): Likewise. (expand_builtin_args_info): Likewise. (expand_builtin_va_start): Likewise. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_end): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_frame_address): Likewise. (expand_builtin_alloca): Likewise. (expand_builtin_bswap): Likewise. (expand_builtin_unop): Likewise. (expand_builtin_fputs): Likewise. (expand_builtin_expect): Likewise. (expand_builtin_fabs): Likewise. (expand_builtin_copysign): Likewise. (expand_builtin_printf): Likewise. (expand_builtin_fprintf): Likewise. (expand_builtin_sprintf): Likewise. (expand_builtin_init_trampoline): Likewise. (expand_builtin_signbit): Likewise. (expand_builtin_fork_or_exec): Likewise. (expand_builtin_sync_operation): Likewise. (expand_builtin_compare_and_swap): Likewise. (expand_builtin_lock_test_and_set): Likewise. (expand_builtin_lock_release): Likewise. (expand_builtin): Likewise. (builtin_mathfn_code): Likewise. (fold_builtin_constant_p): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_expect): Likewise. (fold_builtin_classify_type): Likewise. (fold_builtin_strlen): Likewise. (fold_builtin_nan): Likewise. (integer_valued_real_p): Likewise. (fold_trunc_transparent_mathfn): Likewise. (fold_fixed_mathfn): Likewise. (fold_builtin_cabs): Likewise. (fold_builtin_sqrt): Likewise. (fold_builtin_cbrt): Likewise. (fold_builtin_cos): Likewise. (fold_builtin_cosh): Likewise. (fold_builtin_tan): Likewise. (fold_builtin_sincos): Likewise. (fold_builtin_cexp): Likewise. (fold_builtin_trunc): Likewise. (fold_builtin_floor): Likewise. (fold_builtin_ceil): Likewise. (fold_builtin_round): Likewise. (fold_builtin_int_roundingfn): Likewise. (fold_builtin_bitop): Likewise. (fold_builtin_bswap): Likewise. (fold_builtin_logarithm): Likewise. (fold_builtin_hypot): Likewise. (fold_builtin_pow): Likewise. (fold_builtin_powi): Likewise. (fold_builtin_exponent): Likewise. (fold_builtin_memset): Likewise. (fold_builtin_bzero): Likewise. (fold_builtin_memory_op): Likewise. (fold_builtin_bcopy): Deleted; call site changed to invoke fold_builtin_memory_op directly. (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op. (fold_builtin_strncpy): Likewise. (fold_builtin_memcmp): Likewise. (fold_builtin_strcmp): Likewise. (fold_builtin_strncmp): Likewise. (fold_builtin_signbit): Likewise. (fold_builtin_copysign): Likewise. (fold_builtin_isascii): Likewise. (fold_builtin_toascii): Likewise. (fold_builtin_isdigit): Likewise. (fold_builtin_fabs): Likewise. (fold_builtin_abs): Likewise. (fold_builtin_fmin_fmax): Likewise. (fold_builtin_carg): Likewise. (fold_builtin_classify): Likewise. (fold_builtin_unordered_cmp): Likewise. (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4): New functions split out from fold_builtin_1. (fold_builtin_n): New. (fold_builtin_varargs): New. (fold_builtin): Deleted. Most callers changed to use fold_call_expr instead. (fold_call_expr): New. (build_function_call_expr): Rewrite to use new helper function. (fold_builtin_call_list): New. (build_call_expr): New. (fold_builtin_call_valist): New. (rewrite_call_expr): New. (validate_arg): New. (validate_arglist): Change parameter to be entire CALL_EXPR instead of an arglist. Change return type to bool. Use new CALL_EXPR accessors. (fold_builtin_strstr): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (fold_builtin_strncat): Likewise. (fold_builtin_strspn): Likewise. (fold_builtin_strcspn): Likewise. (fold_builtin_fputs): Likewise. (fold_builtin_next_arg): Likewise. (fold_builtin_sprintf): Likewise. (expand_builtin_object_size): Use new CALL_EXPR accessors. Use NULL_RTX instead of 0. (expand_builtin_memory_chk): Likewise. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (fold_builtin_object_size): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strncat_chk): Likewise. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_printf): Likewise. (fold_builtin_vprintf): Likewise. * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and constructors. (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case. (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (extract_muldiv_1): Add VL_EXP_CLASS_P case. (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Remove CALL_EXPR case, since they are no longer ternary expressions. (fold): Add logic for tcc_vl_exp. (fold_checksum_tree): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (fold_build3_stat): Add assertion to flag broken interface for constructing CALL_EXPRs. (fold_build_call_list): New. (fold_build_call_list_initializer): New. (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and constructors. (fold_strip_sign_ops): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR accessors and dump arguments explicitly. * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (dump_generic_node): Use new CALL_EXPR accessors and walk arguments explicitly. (print_call_name): Use new CALL_EXPR accessors. * print-tree.c (print_node): Add case tcc_vl_exp. Print CALL_EXPR arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors. (vrp_visit_stmt): Likewise. * tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (force_move_till_expr): Likewise. * targhooks.c (default_external_stack_protect_fail): Use build_call_expr instead of build_function_call_expr. (default_hidden_stack_protect_fail): Likewise. * tree-complex.c (expand_complex_libcall): Use build_call_expr to build the call. * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors and walk arguments explicitly. * tree-ssa-loop-niter.c (simplify_replace_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_simple_operations): Likewise. (infer_loop_bounds_from_array): Use new CALL_EXPR accessors. * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs. * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * value_prof.c (tree_ic): Use new CALL_EXPR accessors. (tree_ic_transform): Likewise. (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as parameter instead of arglist. Fix callers. (tree_stringop_fixed_value): Use new CALL_EXPR accessors. (tree_stringops_transform): Likewise. (tree_indirect_call_to_profile): Likewise. (tree_stringops_values_to_profile): Likewise. * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator. (eliminate_tail_call): Likewise. * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (instantiate_parameters_1): Can't handle tcc_vl_exp here. * omp-low.c (build_omp_barrier): Use build_call_expr. (lower_rec_input_clauses): Likewise. (lower_reduction_clauses): Likewise. (expand_parallel_call): Likewise. (maybe_catch_exception): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_sections): Likewise. (lower_omp_single_simple): Likewise. (lower_omp_single_copy): Likewise. (lower_omp_master): Likewise. (lower_omp_ordered): Likewise. (lower_omp_critical): Likewise. * ipa-reference.c (check-call): Use new CALL_EXPR iterator. (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR. * tree-gimple.c (is_gimple_call_addr): Fix doc. (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. Add tcc_vl_exp case. * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH. * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors. * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use fold_call_expr instead of fold_builtin. (ccp_fold_builtin): Likewise. Update calls into builtins.c to match declarations there. (fold_stmt): Use new CALL_EXPR constructor and accessors. Doc updates. * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors. (scan_function): Add case tcc_vl_exp for CALL_EXPR. * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR accessors. * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr. (execute_cse_sincos): Use new CALL_EXPR accessors. * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator. * gimple-low.c (lower_function_body): Use build_call_expr. (lower_builtin_setjmp): Likewise. * expr.c (emit_block_move_via_libcall): Use build_call_expr. (set_storage_via_libcall): Likewise. (safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_expr_real_1): Use new CALL_EXPR accessors. * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (TB_parent_eq): Likewise. * predict.c (expr_expected_value): Use new CALL_EXPR accessors. (strip_builtin_expect): Likewise. * function.c (gimplify_parameters): Use build_call_expr. * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators. (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR. * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR iterators. * gimplify.c (build_stack_save_restore): Use build_call_expr. (gimplify_decl_expr): Likewise. (gimplify_call_expr): Use fold_call_expr instead of fold_builtin. Use new CALL_EXPR iterators. (gimplify_modify_expr_to_memcpy): Use build_call_expr. (gimplify_modify_expr_to_memset): Likewise. (gimplify_variable_sized_compare): Likewise. (gimplify_omp_atomic_fetch_op): Likewise. (gimplify_omp_atomic_pipeline): Likewise. (gimplify_omp_atomic_mutex): Likewise. (gimplify_function_tree): Likewise. * calls.c (alloca_call_p): Use new CALL_EXPR accessors. (call_expr_flags): Likewise. (expand_call): Likewise. * except.c (expand_builtin_eh_return_data_regno): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. * coverage.c (create_coverage): Use build_call_expr. * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete. (temp_call_expr_obstack): New. (pool_copy_list): Delete. (temp_copy_call_expr): New. (phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. Get rid of special goo for copying argument lists and use temp_copy_call_expr instead. (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. (create_expression_by_pieces): Likewise. Use build_call_array to construct the result instead of fold_build3. (create_value_expr_from): Add tcc_vl_exp. Delete special goo for dealing with argument lists. (init_pre): Remove references to expression_node_pool and list_node_pool. Init temp_call_expr_obstack instead. (fini_pre): Remove references to expression_node_pool and list_node_pool. * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors and walk arguments explicitly instead of as a list. * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr. (mx_register_decls): Likewise. (mudflap_register_call): Likewise. (mudflap_finish_file): Likewise. * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors. (ipa_callsite_compute_param): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR accessors and constructor. * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR accessors and constructor. (convert_tramp_reference): Likewise. (convert_call_expr): Likewise. (finalize_nesting_tree_1): Likewise. * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR accessors. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr. * tree-inline.c (initialize_inlined_parameters): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. (estimate_num_insns_1): Use new CALL_EXPR accessors. (expand_call_inline): Tidy up call to initialize_inlined_parameters. * tree-vect-transform.c (vect_create_epilog_for_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (vectorizable_reduction): Likewise. (vectorizable_call): Use new CALL_EXPR iterators. (vectorizable_conversion): Use build_call_expr. (vectorizable_operation): Use TREE_OPERAND_LENGTH. (vect_gen_widened_results_half): Use build_call_expr. (vect_setup_realignment): Likewise. (vectorizable_live_operation): Use TREE_OPERAND_LENGTH. * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors. (pass_through_call): Likewise. (compute_object_sizes): Likewise. Use fold_call_expr instead of fold_builtin. * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr. (tree_gen_pow2_profiler): Likewise. (tree_gen_one_value_profiler): Likewise. (tree_gen_ic_func_profiler): Likewise. (tree_gen_average_profiler): Likewise. (tree_gen_ior_profiler): Likewise. * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp. (find_func_aliases): Use new CALL_EXPR accessors. Add case tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * convert.c (convert_to_real): Use new CALL_EXPR accessors and constructor. (convert_to_integer): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR accessors. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr. (sparc_expand_builtin): Use new CALL_EXPR accessors. * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise. (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors on it. Fix callers. (ix86_expand_store_builtin): Likewise. (ix86_expand_unop_builtin): Likewise. (ix86_expand_unop1_builtin): Likewise. (ix86_expand_sse_compare): Likewise. (ix86_expand_sse_comi): Likewise. (ix86_expand_vec_init_builtin): Likewise. (ix86_expand_vec_ext_builtin): Likewise. (ix86_expand_vec_set_builtin): Likewise. (ix86_expand_builtin): Use new CALL_EXPR accessors. * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (iq2000_expand_builtin): Use new CALL_EXPR accessors. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use build_call_expr. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_predicate_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (spe_expand_stv_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_ld_builtin): Use new CALL_EXPR accessors. (altivec_expand_st_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_vec_set_builtin): Likewise. (altivec_expand_vec_ext_builtin): Likewise. (altivec_expand_builtin): Use new CALL_EXPR accessors. (spe_expand_builtin): Likewise. (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (spe_expand_evsel_builtin): Likewise. (rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and FCFSX cases must construct whole new CALL_EXPR, not just arglist. * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (arm_expand_unop_builtin): Likewise. (arm_expand_builtin): Use new CALL_EXPR accessors. * config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR accessors. * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * c-semantics.c (build_stmt): Add internal diagnostic check. * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR accessors. Print arguments explicitly instead of as a list. * c-typeck.c (build_function_call): Use new CALL_EXPR constructors. * c-omp.c (c_finish_omp_barrier): Use build_call_expr. (c_finish_omp_flish): Likewise. * c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (check_function_arguments_recurse): Use new CALL_EXPR accessors. (c_warn_unused_result): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation. Change class to tcc_vl_exp. * call.c (build_call): Use build_call_list instead of build3. (build_over_call): Likewise. (build_new_method_call): Use build_min_non_dep_call_list instead of build_min_non_dep. * error.c (dump_call_expr_args): New function. (dump_aggr_init_expr_args): New function. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. * cvt.c (convert_to_void): Use build_call_array instead of build3; use new AGGR_INIT_EXPR accessor macros. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new AGGR_INIT_EXPR accessor macros. * cp-gimplify.c (cp_gimplify_init_expr): Use AGGR_INIT_EXPR_SLOT to set the slot operand. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro. (AGGR_INIT_EXPR_SLOT): New macro. (AGGR_INIT_EXPR_ARG): New macro. (aggr_init_expr_nargs): New macro. (AGGR_INIT_EXPR_ARGP): New macro. (aggr_init_expr_arg_iterator): New. (init_aggr_init_expr_arg_iterator): New. (next_aggr_init_expr_arg): New. (first_aggr_init_expr_arg): New. (more_aggr_init_expr_args_p): New. (FOR_EACH_AGGR_INIT_EXPR_ARG): New. (stabilize_aggr_init): New declaration. (build_min_non_dep_call_list): Likewise. * tree.c (process_aggr_init_operands): New function. (build_aggr_init_array) New function. (build_cplus_new): Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. Replace use of build3 with build_aggr_init_array. (build_min_non_dep_call_list) New function. (build_min_nt): Assert input code parameter is not a variable length expression class. (build_min, build_min_non_dep): Likewise. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments to check for equality instead of recursing. Handle tcc_vl_exp tree code classes. (stabilize_call): Update to only handle CALL_EXPRs, not AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros. (stabilize_aggr_init): New function. (stabilize_init): Use it. * cxx-pretty-print.c (pp_cxx_postfix_expression) <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros and argument iterators. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with build_vl_exp. Iterate through the operands, recursively processing each one. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new CALL_EXPR accessor macros. (value_dependent_expression_p) <default>: Handle tcc_vl_exp tree code classes. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * semantics.c (finish_call_expr): Use build_nt_call_list instead of build_nt. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR accessor macros. Use build_call_array to construct the CALL_EXPR node instead of build3 * decl2.c (build_offset_ref_call_from_tree): Use build_nt_call_list and build_min_non_dep_call_list instead of build_min_nt and build_min_non_dep. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>: Use build_nt_call_list instead of build_min_nt. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead of build3. (BUILD_MONITOR_EXIT): Likewise. * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. (java_gimplify_modify_expr): Likewise. * class.c (cache_this_class_ref): Use build_call_expr. (build_static_field_ref): Likewise. (emit_indirect_register_classes): Likewise. (emit_register_classes): Likewise. * resource.c (write_resource_constructor): Use build_call_expr. * builtins.c (builtin_creator_function): Change interpretation of the second parameter to be the whole CALL_EXPR instead of the arglist. (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (min_builtin): Likewise. (abs_builtin): Likewise. (java_build_function_call_expr): Likewise. (convert_real): Likewise. (UNMARSHAL3): Likewise. (UNMARSHAL4): Likewise. (UNMARSHAL5): Likewise. (build_arglist_for_builtin): Delete. Fix callers to use build_call_expr instead. (putObject_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (compareAndSwapInt_builtin): Likewise. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. (putVolatile_builtin): Likewise. (getVolatile_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. (check_for_builtin): Pass entire CALL_EXPR to builtin expander instead of arglist. * expr.c (build_java_athrow): Use build_call_nary instead of build3. (build_java_throw_out_of_bounds_exception): Likewise. (java_check_reference): Likewise. (build_java_arraystore_check): Likewise. (build_newarray): Likewise. (build_anewarray): Likewise. (expand_java_multinewarray): Use build_call_list instead of build3. (build_java_monitor): Use build_call_nary instead of build3. (java_create_object): Likewise. (expand_java_NEW): Likewise. (build_instanceof): Likewise. (expand_java_CHECKCAST): Likewise. (build_java_soft_divmod): Likewise. (build_java_binop): Likewise. (build_field_ref): Likewise. (build_class_init): Likewise. (rewrite_arglist_getcaller): Use build_call_expr. (build_invokeinterface): Use build_call_nary instead of build3. (expand_invoke): Use build_call_list instead of build3. (build_jni_stub): Use build_call_nary, build_call_list, or build_call_expr instead of build3. (expand_java_field_op): Use build_call_expr instead of build3. (force_evaluation_order): Use new CALL_EXPR accessors. * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors. (objc_get_callee_fndecl): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * trans-expr.c (gfc_conv_power_op): Use build_call_expr. (gfc_conv_string_tmp): Likewise. (gfc_conv_concat_op): Likewise. (gfc_build_compare_string): Likewise. (gfc_conv_function_call): Use build_call_list instead of build3. * trans-array.c (gfc_trans_allocate_array_storage): Use build_call_expr. (gfc_grow_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (gfc_array_allocate): Likewise. (gfc_array_deallocate): Likewise. (gfc_trans_auto_array_allocation): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (gfc_trans_dealloc_allocated): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr. (gfc_trans_omp_flush): Likewise. * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr. (gfc_trans_pause): Likewise. (gfc_trans_stop): Likewise. (gfc_trans_character_select): Likewise. (gfc_do_allocate): Likewise. (gfc_trans_assign_need_temp): Likewise. (gfc_trans_pointer_assign_need_temp): Likewise. (gfc_trans_forall_1): Likewise. (gfc_trans_where_2): Likewise. (gfc_trans_allocate): Likewise. (gfc_trans_deallocate): Likewise. * trans.c (gfc_trans_runtime_check): Use build_call_expr. * trans-io.c (gfc_trans_open): Use build_call_expr. (gfc_trans_close): Likewise. (build_filepos): Likewise. (gfc_trans_inquire): Likewise. (NML_FIRST_ARG): Delete. (NML_ADD_ARG): Delete. (transfer_namelist_element): Use build_call_expr. (build_dt): Likewise. (gfc_trans_dt_end): Likewise. (transfer_expr): Likewise. (transfer_array-desc): Likewise. * trans-decl.c (gfc_generate_function_code): Use build_call_expr. (gfc_generate_constructors): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_associated): Likewise. (gfc_conv_intrinsic_si_kind): Likewise. (gfc_conv_intrinsic_trim): Likewise. (gfc_conv_intrinsic_repeat: Likewise. (gfc_conv_intrinsic_iargc): Likewise. Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com> Co-Authored-By: Lee Millward <lee.millward@codesourcery.com> From-SVN: r122018
2007-02-16 00:50:49 +01:00
arity = 0;
FOR_EACH_CALL_EXPR_ARG (arg, iter, exp)
2002-06-04 06:06:38 +02:00
{
const struct insn_operand_data *insn_op;
if (arg == error_mark_node)
return NULL_RTX;
if (arity > MAX_ARGS)
return NULL_RTX;
insn_op = &insn_data[icode].operand[arity + nonvoid];
op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL);
2002-06-04 06:06:38 +02:00
if (!(*insn_op->predicate) (op[arity], insn_op->mode))
op[arity] = copy_to_mode_reg (insn_op->mode, op[arity]);
tree.h (enum tree_code_class): Add tcc_vl_exp. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree.h (enum tree_code_class): Add tcc_vl_exp. (VL_EXP_CLASS_P): New. (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (TREE_OPERAND_CHECK_CODE): Likewise. (GIMPLE_STMT_OPERAND_CHECK): Likewise. (TREE_RTL_OPERAND_CHECK): Likewise. (tree_operand_check_failed): Make second parameter the whole tree instead of its code. Fixed callers. (VL_EXP_CHECK): New. (TREE_OPERAND_LENGTH): New. (VL_EXP_OPERAND_LENGTH): New. (CALL_EXPR_FN): New. (CALL_EXPR_STATIC_CHAIN): New. (CALL_EXPR_ARGS): New. (CALL_EXPR_ARG): New. (call_expr_nargs): New. (CALL_EXPR_ARGP): New. (build_nt_call_list): Declare. (build_vl_exp_stat): Declare. (build_vl_exp): New. (build_call_list): Declare. (build_call_nary): Declare. (build_call_valist): Declare. (build_call_array): Declare. (call_expr_arg): Declare. (call_expr_argp): Declare. (call_expr_arglist): Declare. (fold_build_call_list): Declare. (fold_build_call_list_initializer): Declare. (fold_call_expr): Declare to replace fold_builtin. (fold_builtin_fputs): Update to agree with modified definition. (fold_builtin_strcpy): Likewise. (fold_builtin_strncpy): Likewise. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_next_arg): Likewise. (fold_build_call_expr): Declare. (fold_builtin_call_list): Declare. (fold_builtin_call_valist): Declare. (build_call_expr): Declare. (validate_arglist): Update to agree with modified definition. (tree_operand_length): New. (call_expr_arg_iterator): New. (init_call_expr_arg_iterator): New. (next_call_expr_arg): New. (first_call_expr_arg): New. (more_call_expr_args_p): New. (FOR_EACH_CALL_EXPR_ARG): New. * tree.c (tree_code_class_string): Add entries for tcc_vl_exp and tcc_gimple_stmt. (tree_code_size): Update documentation. Use sizeof (tree) rather than sizeof (char *). (tree_size): Likewise. Add case for tcc_vl_exp. (tree_node_structure): Add case for tcc_vl_exp. (contains_placeholder_p): Likewise. (substitute_in_expr): Likewise. (substitute_placeholder_in_expr): Likewise. (stabilize_reference_1): Likewise. (build3_stat): Remove logic for CALL_EXPRs. Replace with assertion to diagnose breakage of this interface for constructing CALL_EXPRs. (build_nt): Add similar assertion here. (build_nt_call_list): New. (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors. (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (get_callee_fndecl): Use new CALL_EXPR accessors. (tree_operand_check_failed): Change parameters to pass entire node instead of its code, so that we can call TREE_OPERAND_LENGTH on it. (process_call_operands): New. (build_vl_exp_stat): New. (build_call_list): New. (build_call_nary): New. (build_call_valist): New. (build_call_array): New. (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (call_expr_arglist): New. * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use tcc_vl_exp instead of a fixed-size tcc_expression. * doc/c-tree.texi (CALL_EXPR): Document new representation and accessors for CALL_EXPRs. (AGGR_INIT_EXPR): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * builtins.c (c_strlen): Return NULL_TREE instead of 0. (expand_builtin_nonlocal_goto): Change parameter to be entire CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors. (expand_builtin_prefetch): Likewise. (expand_builtin_classify_type): Likewise. (mathfn_built_in): Return NULL_TREE instead of 0. (expand_errno_check): Use new CALL_EXPR accessors. (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_int_roundingfn): Likewise. (expand_builtin_int_roundingfn_2): Likewise. (expand_builtin_pow): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead of arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_strstr): Likewise. (expand_builtin_strchr): Likewise. (expand_builtin_strrchr): Likewise. (expand_builtin_strpbrk): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_mempcpy): Likewise. (expand_builtin_mempcpy_args): New. (expand_builtin_memmove): Similarly to expand_builtin_mempcpy. (expand_builtin_memmove_args): New. (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy. (expand_movstr): Likewise. (expand_builtin_strcpy): Likewise. (expand_builtin_strcpy_args): New. (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_memset_args): New. (expand_builtin_bzero): Similarly to expand_builtin_memset. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (expand_builtin_strcat): Likewise. (expand_builtin_strncat): Likewise. (expand_builtin_strspn): Likewise. (expand_builtin_strcspn): Likewise. (expand_builtin_args_info): Likewise. (expand_builtin_va_start): Likewise. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_end): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_frame_address): Likewise. (expand_builtin_alloca): Likewise. (expand_builtin_bswap): Likewise. (expand_builtin_unop): Likewise. (expand_builtin_fputs): Likewise. (expand_builtin_expect): Likewise. (expand_builtin_fabs): Likewise. (expand_builtin_copysign): Likewise. (expand_builtin_printf): Likewise. (expand_builtin_fprintf): Likewise. (expand_builtin_sprintf): Likewise. (expand_builtin_init_trampoline): Likewise. (expand_builtin_signbit): Likewise. (expand_builtin_fork_or_exec): Likewise. (expand_builtin_sync_operation): Likewise. (expand_builtin_compare_and_swap): Likewise. (expand_builtin_lock_test_and_set): Likewise. (expand_builtin_lock_release): Likewise. (expand_builtin): Likewise. (builtin_mathfn_code): Likewise. (fold_builtin_constant_p): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_expect): Likewise. (fold_builtin_classify_type): Likewise. (fold_builtin_strlen): Likewise. (fold_builtin_nan): Likewise. (integer_valued_real_p): Likewise. (fold_trunc_transparent_mathfn): Likewise. (fold_fixed_mathfn): Likewise. (fold_builtin_cabs): Likewise. (fold_builtin_sqrt): Likewise. (fold_builtin_cbrt): Likewise. (fold_builtin_cos): Likewise. (fold_builtin_cosh): Likewise. (fold_builtin_tan): Likewise. (fold_builtin_sincos): Likewise. (fold_builtin_cexp): Likewise. (fold_builtin_trunc): Likewise. (fold_builtin_floor): Likewise. (fold_builtin_ceil): Likewise. (fold_builtin_round): Likewise. (fold_builtin_int_roundingfn): Likewise. (fold_builtin_bitop): Likewise. (fold_builtin_bswap): Likewise. (fold_builtin_logarithm): Likewise. (fold_builtin_hypot): Likewise. (fold_builtin_pow): Likewise. (fold_builtin_powi): Likewise. (fold_builtin_exponent): Likewise. (fold_builtin_memset): Likewise. (fold_builtin_bzero): Likewise. (fold_builtin_memory_op): Likewise. (fold_builtin_bcopy): Deleted; call site changed to invoke fold_builtin_memory_op directly. (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op. (fold_builtin_strncpy): Likewise. (fold_builtin_memcmp): Likewise. (fold_builtin_strcmp): Likewise. (fold_builtin_strncmp): Likewise. (fold_builtin_signbit): Likewise. (fold_builtin_copysign): Likewise. (fold_builtin_isascii): Likewise. (fold_builtin_toascii): Likewise. (fold_builtin_isdigit): Likewise. (fold_builtin_fabs): Likewise. (fold_builtin_abs): Likewise. (fold_builtin_fmin_fmax): Likewise. (fold_builtin_carg): Likewise. (fold_builtin_classify): Likewise. (fold_builtin_unordered_cmp): Likewise. (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4): New functions split out from fold_builtin_1. (fold_builtin_n): New. (fold_builtin_varargs): New. (fold_builtin): Deleted. Most callers changed to use fold_call_expr instead. (fold_call_expr): New. (build_function_call_expr): Rewrite to use new helper function. (fold_builtin_call_list): New. (build_call_expr): New. (fold_builtin_call_valist): New. (rewrite_call_expr): New. (validate_arg): New. (validate_arglist): Change parameter to be entire CALL_EXPR instead of an arglist. Change return type to bool. Use new CALL_EXPR accessors. (fold_builtin_strstr): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (fold_builtin_strncat): Likewise. (fold_builtin_strspn): Likewise. (fold_builtin_strcspn): Likewise. (fold_builtin_fputs): Likewise. (fold_builtin_next_arg): Likewise. (fold_builtin_sprintf): Likewise. (expand_builtin_object_size): Use new CALL_EXPR accessors. Use NULL_RTX instead of 0. (expand_builtin_memory_chk): Likewise. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (fold_builtin_object_size): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strncat_chk): Likewise. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_printf): Likewise. (fold_builtin_vprintf): Likewise. * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and constructors. (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case. (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (extract_muldiv_1): Add VL_EXP_CLASS_P case. (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Remove CALL_EXPR case, since they are no longer ternary expressions. (fold): Add logic for tcc_vl_exp. (fold_checksum_tree): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (fold_build3_stat): Add assertion to flag broken interface for constructing CALL_EXPRs. (fold_build_call_list): New. (fold_build_call_list_initializer): New. (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and constructors. (fold_strip_sign_ops): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR accessors and dump arguments explicitly. * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (dump_generic_node): Use new CALL_EXPR accessors and walk arguments explicitly. (print_call_name): Use new CALL_EXPR accessors. * print-tree.c (print_node): Add case tcc_vl_exp. Print CALL_EXPR arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors. (vrp_visit_stmt): Likewise. * tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (force_move_till_expr): Likewise. * targhooks.c (default_external_stack_protect_fail): Use build_call_expr instead of build_function_call_expr. (default_hidden_stack_protect_fail): Likewise. * tree-complex.c (expand_complex_libcall): Use build_call_expr to build the call. * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors and walk arguments explicitly. * tree-ssa-loop-niter.c (simplify_replace_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_simple_operations): Likewise. (infer_loop_bounds_from_array): Use new CALL_EXPR accessors. * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs. * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * value_prof.c (tree_ic): Use new CALL_EXPR accessors. (tree_ic_transform): Likewise. (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as parameter instead of arglist. Fix callers. (tree_stringop_fixed_value): Use new CALL_EXPR accessors. (tree_stringops_transform): Likewise. (tree_indirect_call_to_profile): Likewise. (tree_stringops_values_to_profile): Likewise. * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator. (eliminate_tail_call): Likewise. * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (instantiate_parameters_1): Can't handle tcc_vl_exp here. * omp-low.c (build_omp_barrier): Use build_call_expr. (lower_rec_input_clauses): Likewise. (lower_reduction_clauses): Likewise. (expand_parallel_call): Likewise. (maybe_catch_exception): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_sections): Likewise. (lower_omp_single_simple): Likewise. (lower_omp_single_copy): Likewise. (lower_omp_master): Likewise. (lower_omp_ordered): Likewise. (lower_omp_critical): Likewise. * ipa-reference.c (check-call): Use new CALL_EXPR iterator. (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR. * tree-gimple.c (is_gimple_call_addr): Fix doc. (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. Add tcc_vl_exp case. * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH. * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors. * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use fold_call_expr instead of fold_builtin. (ccp_fold_builtin): Likewise. Update calls into builtins.c to match declarations there. (fold_stmt): Use new CALL_EXPR constructor and accessors. Doc updates. * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors. (scan_function): Add case tcc_vl_exp for CALL_EXPR. * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR accessors. * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr. (execute_cse_sincos): Use new CALL_EXPR accessors. * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator. * gimple-low.c (lower_function_body): Use build_call_expr. (lower_builtin_setjmp): Likewise. * expr.c (emit_block_move_via_libcall): Use build_call_expr. (set_storage_via_libcall): Likewise. (safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_expr_real_1): Use new CALL_EXPR accessors. * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (TB_parent_eq): Likewise. * predict.c (expr_expected_value): Use new CALL_EXPR accessors. (strip_builtin_expect): Likewise. * function.c (gimplify_parameters): Use build_call_expr. * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators. (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR. * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR iterators. * gimplify.c (build_stack_save_restore): Use build_call_expr. (gimplify_decl_expr): Likewise. (gimplify_call_expr): Use fold_call_expr instead of fold_builtin. Use new CALL_EXPR iterators. (gimplify_modify_expr_to_memcpy): Use build_call_expr. (gimplify_modify_expr_to_memset): Likewise. (gimplify_variable_sized_compare): Likewise. (gimplify_omp_atomic_fetch_op): Likewise. (gimplify_omp_atomic_pipeline): Likewise. (gimplify_omp_atomic_mutex): Likewise. (gimplify_function_tree): Likewise. * calls.c (alloca_call_p): Use new CALL_EXPR accessors. (call_expr_flags): Likewise. (expand_call): Likewise. * except.c (expand_builtin_eh_return_data_regno): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. * coverage.c (create_coverage): Use build_call_expr. * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete. (temp_call_expr_obstack): New. (pool_copy_list): Delete. (temp_copy_call_expr): New. (phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. Get rid of special goo for copying argument lists and use temp_copy_call_expr instead. (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. (create_expression_by_pieces): Likewise. Use build_call_array to construct the result instead of fold_build3. (create_value_expr_from): Add tcc_vl_exp. Delete special goo for dealing with argument lists. (init_pre): Remove references to expression_node_pool and list_node_pool. Init temp_call_expr_obstack instead. (fini_pre): Remove references to expression_node_pool and list_node_pool. * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors and walk arguments explicitly instead of as a list. * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr. (mx_register_decls): Likewise. (mudflap_register_call): Likewise. (mudflap_finish_file): Likewise. * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors. (ipa_callsite_compute_param): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR accessors and constructor. * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR accessors and constructor. (convert_tramp_reference): Likewise. (convert_call_expr): Likewise. (finalize_nesting_tree_1): Likewise. * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR accessors. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr. * tree-inline.c (initialize_inlined_parameters): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. (estimate_num_insns_1): Use new CALL_EXPR accessors. (expand_call_inline): Tidy up call to initialize_inlined_parameters. * tree-vect-transform.c (vect_create_epilog_for_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (vectorizable_reduction): Likewise. (vectorizable_call): Use new CALL_EXPR iterators. (vectorizable_conversion): Use build_call_expr. (vectorizable_operation): Use TREE_OPERAND_LENGTH. (vect_gen_widened_results_half): Use build_call_expr. (vect_setup_realignment): Likewise. (vectorizable_live_operation): Use TREE_OPERAND_LENGTH. * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors. (pass_through_call): Likewise. (compute_object_sizes): Likewise. Use fold_call_expr instead of fold_builtin. * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr. (tree_gen_pow2_profiler): Likewise. (tree_gen_one_value_profiler): Likewise. (tree_gen_ic_func_profiler): Likewise. (tree_gen_average_profiler): Likewise. (tree_gen_ior_profiler): Likewise. * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp. (find_func_aliases): Use new CALL_EXPR accessors. Add case tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * convert.c (convert_to_real): Use new CALL_EXPR accessors and constructor. (convert_to_integer): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR accessors. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr. (sparc_expand_builtin): Use new CALL_EXPR accessors. * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise. (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors on it. Fix callers. (ix86_expand_store_builtin): Likewise. (ix86_expand_unop_builtin): Likewise. (ix86_expand_unop1_builtin): Likewise. (ix86_expand_sse_compare): Likewise. (ix86_expand_sse_comi): Likewise. (ix86_expand_vec_init_builtin): Likewise. (ix86_expand_vec_ext_builtin): Likewise. (ix86_expand_vec_set_builtin): Likewise. (ix86_expand_builtin): Use new CALL_EXPR accessors. * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (iq2000_expand_builtin): Use new CALL_EXPR accessors. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use build_call_expr. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_predicate_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (spe_expand_stv_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_ld_builtin): Use new CALL_EXPR accessors. (altivec_expand_st_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_vec_set_builtin): Likewise. (altivec_expand_vec_ext_builtin): Likewise. (altivec_expand_builtin): Use new CALL_EXPR accessors. (spe_expand_builtin): Likewise. (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (spe_expand_evsel_builtin): Likewise. (rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and FCFSX cases must construct whole new CALL_EXPR, not just arglist. * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (arm_expand_unop_builtin): Likewise. (arm_expand_builtin): Use new CALL_EXPR accessors. * config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR accessors. * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * c-semantics.c (build_stmt): Add internal diagnostic check. * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR accessors. Print arguments explicitly instead of as a list. * c-typeck.c (build_function_call): Use new CALL_EXPR constructors. * c-omp.c (c_finish_omp_barrier): Use build_call_expr. (c_finish_omp_flish): Likewise. * c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (check_function_arguments_recurse): Use new CALL_EXPR accessors. (c_warn_unused_result): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation. Change class to tcc_vl_exp. * call.c (build_call): Use build_call_list instead of build3. (build_over_call): Likewise. (build_new_method_call): Use build_min_non_dep_call_list instead of build_min_non_dep. * error.c (dump_call_expr_args): New function. (dump_aggr_init_expr_args): New function. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. * cvt.c (convert_to_void): Use build_call_array instead of build3; use new AGGR_INIT_EXPR accessor macros. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new AGGR_INIT_EXPR accessor macros. * cp-gimplify.c (cp_gimplify_init_expr): Use AGGR_INIT_EXPR_SLOT to set the slot operand. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro. (AGGR_INIT_EXPR_SLOT): New macro. (AGGR_INIT_EXPR_ARG): New macro. (aggr_init_expr_nargs): New macro. (AGGR_INIT_EXPR_ARGP): New macro. (aggr_init_expr_arg_iterator): New. (init_aggr_init_expr_arg_iterator): New. (next_aggr_init_expr_arg): New. (first_aggr_init_expr_arg): New. (more_aggr_init_expr_args_p): New. (FOR_EACH_AGGR_INIT_EXPR_ARG): New. (stabilize_aggr_init): New declaration. (build_min_non_dep_call_list): Likewise. * tree.c (process_aggr_init_operands): New function. (build_aggr_init_array) New function. (build_cplus_new): Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. Replace use of build3 with build_aggr_init_array. (build_min_non_dep_call_list) New function. (build_min_nt): Assert input code parameter is not a variable length expression class. (build_min, build_min_non_dep): Likewise. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments to check for equality instead of recursing. Handle tcc_vl_exp tree code classes. (stabilize_call): Update to only handle CALL_EXPRs, not AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros. (stabilize_aggr_init): New function. (stabilize_init): Use it. * cxx-pretty-print.c (pp_cxx_postfix_expression) <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros and argument iterators. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with build_vl_exp. Iterate through the operands, recursively processing each one. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new CALL_EXPR accessor macros. (value_dependent_expression_p) <default>: Handle tcc_vl_exp tree code classes. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * semantics.c (finish_call_expr): Use build_nt_call_list instead of build_nt. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR accessor macros. Use build_call_array to construct the CALL_EXPR node instead of build3 * decl2.c (build_offset_ref_call_from_tree): Use build_nt_call_list and build_min_non_dep_call_list instead of build_min_nt and build_min_non_dep. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>: Use build_nt_call_list instead of build_min_nt. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead of build3. (BUILD_MONITOR_EXIT): Likewise. * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. (java_gimplify_modify_expr): Likewise. * class.c (cache_this_class_ref): Use build_call_expr. (build_static_field_ref): Likewise. (emit_indirect_register_classes): Likewise. (emit_register_classes): Likewise. * resource.c (write_resource_constructor): Use build_call_expr. * builtins.c (builtin_creator_function): Change interpretation of the second parameter to be the whole CALL_EXPR instead of the arglist. (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (min_builtin): Likewise. (abs_builtin): Likewise. (java_build_function_call_expr): Likewise. (convert_real): Likewise. (UNMARSHAL3): Likewise. (UNMARSHAL4): Likewise. (UNMARSHAL5): Likewise. (build_arglist_for_builtin): Delete. Fix callers to use build_call_expr instead. (putObject_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (compareAndSwapInt_builtin): Likewise. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. (putVolatile_builtin): Likewise. (getVolatile_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. (check_for_builtin): Pass entire CALL_EXPR to builtin expander instead of arglist. * expr.c (build_java_athrow): Use build_call_nary instead of build3. (build_java_throw_out_of_bounds_exception): Likewise. (java_check_reference): Likewise. (build_java_arraystore_check): Likewise. (build_newarray): Likewise. (build_anewarray): Likewise. (expand_java_multinewarray): Use build_call_list instead of build3. (build_java_monitor): Use build_call_nary instead of build3. (java_create_object): Likewise. (expand_java_NEW): Likewise. (build_instanceof): Likewise. (expand_java_CHECKCAST): Likewise. (build_java_soft_divmod): Likewise. (build_java_binop): Likewise. (build_field_ref): Likewise. (build_class_init): Likewise. (rewrite_arglist_getcaller): Use build_call_expr. (build_invokeinterface): Use build_call_nary instead of build3. (expand_invoke): Use build_call_list instead of build3. (build_jni_stub): Use build_call_nary, build_call_list, or build_call_expr instead of build3. (expand_java_field_op): Use build_call_expr instead of build3. (force_evaluation_order): Use new CALL_EXPR accessors. * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors. (objc_get_callee_fndecl): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * trans-expr.c (gfc_conv_power_op): Use build_call_expr. (gfc_conv_string_tmp): Likewise. (gfc_conv_concat_op): Likewise. (gfc_build_compare_string): Likewise. (gfc_conv_function_call): Use build_call_list instead of build3. * trans-array.c (gfc_trans_allocate_array_storage): Use build_call_expr. (gfc_grow_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (gfc_array_allocate): Likewise. (gfc_array_deallocate): Likewise. (gfc_trans_auto_array_allocation): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (gfc_trans_dealloc_allocated): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr. (gfc_trans_omp_flush): Likewise. * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr. (gfc_trans_pause): Likewise. (gfc_trans_stop): Likewise. (gfc_trans_character_select): Likewise. (gfc_do_allocate): Likewise. (gfc_trans_assign_need_temp): Likewise. (gfc_trans_pointer_assign_need_temp): Likewise. (gfc_trans_forall_1): Likewise. (gfc_trans_where_2): Likewise. (gfc_trans_allocate): Likewise. (gfc_trans_deallocate): Likewise. * trans.c (gfc_trans_runtime_check): Use build_call_expr. * trans-io.c (gfc_trans_open): Use build_call_expr. (gfc_trans_close): Likewise. (build_filepos): Likewise. (gfc_trans_inquire): Likewise. (NML_FIRST_ARG): Delete. (NML_ADD_ARG): Delete. (transfer_namelist_element): Use build_call_expr. (build_dt): Likewise. (gfc_trans_dt_end): Likewise. (transfer_expr): Likewise. (transfer_array-desc): Likewise. * trans-decl.c (gfc_generate_function_code): Use build_call_expr. (gfc_generate_constructors): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_associated): Likewise. (gfc_conv_intrinsic_si_kind): Likewise. (gfc_conv_intrinsic_trim): Likewise. (gfc_conv_intrinsic_repeat: Likewise. (gfc_conv_intrinsic_iargc): Likewise. Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com> Co-Authored-By: Lee Millward <lee.millward@codesourcery.com> From-SVN: r122018
2007-02-16 00:50:49 +01:00
arity++;
2002-06-04 06:06:38 +02:00
}
if (nonvoid)
{
enum machine_mode tmode = insn_data[icode].operand[0].mode;
if (!target
|| GET_MODE (target) != tmode
|| !(*insn_data[icode].operand[0].predicate) (target, tmode))
target = gen_reg_rtx (tmode);
}
2002-06-04 06:06:38 +02:00
switch (arity)
{
case 0:
pat = GEN_FCN (icode) (target);
break;
case 1:
if (nonvoid)
pat = GEN_FCN (icode) (target, op[0]);
else
pat = GEN_FCN (icode) (op[0]);
2002-06-04 06:06:38 +02:00
break;
case 2:
pat = GEN_FCN (icode) (target, op[0], op[1]);
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
2002-06-04 06:06:38 +02:00
}
if (!pat)
return NULL_RTX;
emit_insn (pat);
if (nonvoid)
return target;
else
return const0_rtx;
2002-06-04 06:06:38 +02:00
}
/* Several bits below assume HWI >= 64 bits. This should be enforced
by config.gcc. */
#if HOST_BITS_PER_WIDE_INT < 64
# error "HOST_WIDE_INT too small"
#endif
/* Fold the builtin for the CMPBGE instruction. This is a vector comparison
with an 8-bit output vector. OPINT contains the integer operands; bit N
of OP_CONST is set if OPINT[N] is valid. */
static tree
alpha_fold_builtin_cmpbge (unsigned HOST_WIDE_INT opint[], long op_const)
{
if (op_const == 3)
{
int i, val;
for (i = 0, val = 0; i < 8; ++i)
{
unsigned HOST_WIDE_INT c0 = (opint[0] >> (i * 8)) & 0xff;
unsigned HOST_WIDE_INT c1 = (opint[1] >> (i * 8)) & 0xff;
if (c0 >= c1)
val |= 1 << i;
}
return build_int_cst (long_integer_type_node, val);
}
else if (op_const == 2 && opint[1] == 0)
return build_int_cst (long_integer_type_node, 0xff);
return NULL;
}
/* Fold the builtin for the ZAPNOT instruction. This is essentially a
specialized form of an AND operation. Other byte manipulation instructions
are defined in terms of this instruction, so this is also used as a
subroutine for other builtins.
OP contains the tree operands; OPINT contains the extracted integer values.
Bit N of OP_CONST it set if OPINT[N] is valid. OP may be null if only
OPINT may be considered. */
static tree
alpha_fold_builtin_zapnot (tree *op, unsigned HOST_WIDE_INT opint[],
long op_const)
{
if (op_const & 2)
{
unsigned HOST_WIDE_INT mask = 0;
int i;
for (i = 0; i < 8; ++i)
if ((opint[1] >> i) & 1)
mask |= (unsigned HOST_WIDE_INT)0xff << (i * 8);
if (op_const & 1)
return build_int_cst (long_integer_type_node, opint[0] & mask);
if (op)
return fold_build2 (BIT_AND_EXPR, long_integer_type_node, op[0],
build_int_cst (long_integer_type_node, mask));
}
else if ((op_const & 1) && opint[0] == 0)
return build_int_cst (long_integer_type_node, 0);
return NULL;
}
/* Fold the builtins for the EXT family of instructions. */
static tree
alpha_fold_builtin_extxx (tree op[], unsigned HOST_WIDE_INT opint[],
long op_const, unsigned HOST_WIDE_INT bytemask,
bool is_high)
{
long zap_const = 2;
tree *zap_op = NULL;
if (op_const & 2)
{
unsigned HOST_WIDE_INT loc;
loc = opint[1] & 7;
loc *= BITS_PER_UNIT;
if (loc != 0)
{
if (op_const & 1)
{
unsigned HOST_WIDE_INT temp = opint[0];
if (is_high)
temp <<= loc;
else
temp >>= loc;
opint[0] = temp;
zap_const = 3;
}
}
else
zap_op = op;
}
opint[1] = bytemask;
return alpha_fold_builtin_zapnot (zap_op, opint, zap_const);
}
/* Fold the builtins for the INS family of instructions. */
static tree
alpha_fold_builtin_insxx (tree op[], unsigned HOST_WIDE_INT opint[],
long op_const, unsigned HOST_WIDE_INT bytemask,
bool is_high)
{
if ((op_const & 1) && opint[0] == 0)
return build_int_cst (long_integer_type_node, 0);
if (op_const & 2)
{
unsigned HOST_WIDE_INT temp, loc, byteloc;
tree *zap_op = NULL;
loc = opint[1] & 7;
bytemask <<= loc;
temp = opint[0];
if (is_high)
{
byteloc = (64 - (loc * 8)) & 0x3f;
if (byteloc == 0)
zap_op = op;
else
temp >>= byteloc;
bytemask >>= 8;
}
else
{
byteloc = loc * 8;
if (byteloc == 0)
zap_op = op;
else
temp <<= byteloc;
}
opint[0] = temp;
opint[1] = bytemask;
return alpha_fold_builtin_zapnot (zap_op, opint, op_const);
}
return NULL;
}
static tree
alpha_fold_builtin_mskxx (tree op[], unsigned HOST_WIDE_INT opint[],
long op_const, unsigned HOST_WIDE_INT bytemask,
bool is_high)
{
if (op_const & 2)
{
unsigned HOST_WIDE_INT loc;
loc = opint[1] & 7;
bytemask <<= loc;
if (is_high)
bytemask >>= 8;
opint[1] = bytemask ^ 0xff;
}
return alpha_fold_builtin_zapnot (op, opint, op_const);
}
static tree
alpha_fold_builtin_umulh (unsigned HOST_WIDE_INT opint[], long op_const)
{
switch (op_const)
{
case 3:
{
unsigned HOST_WIDE_INT l;
HOST_WIDE_INT h;
mul_double (opint[0], 0, opint[1], 0, &l, &h);
#if HOST_BITS_PER_WIDE_INT > 64
# error fixme
#endif
return build_int_cst (long_integer_type_node, h);
}
case 1:
opint[1] = opint[0];
/* FALLTHRU */
case 2:
/* Note that (X*1) >> 64 == 0. */
if (opint[1] == 0 || opint[1] == 1)
return build_int_cst (long_integer_type_node, 0);
break;
}
return NULL;
}
static tree
alpha_fold_vector_minmax (enum tree_code code, tree op[], tree vtype)
{
tree op0 = fold_convert (vtype, op[0]);
tree op1 = fold_convert (vtype, op[1]);
tree val = fold_build2 (code, vtype, op0, op1);
return fold_build1 (VIEW_CONVERT_EXPR, long_integer_type_node, val);
}
static tree
alpha_fold_builtin_perr (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp = 0;
int i;
if (op_const != 3)
return NULL;
for (i = 0; i < 8; ++i)
{
unsigned HOST_WIDE_INT a = (opint[0] >> (i * 8)) & 0xff;
unsigned HOST_WIDE_INT b = (opint[1] >> (i * 8)) & 0xff;
if (a >= b)
temp += a - b;
else
temp += b - a;
}
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_pklb (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp;
if (op_const == 0)
return NULL;
temp = opint[0] & 0xff;
temp |= (opint[0] >> 24) & 0xff00;
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_pkwb (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp;
if (op_const == 0)
return NULL;
temp = opint[0] & 0xff;
temp |= (opint[0] >> 8) & 0xff00;
temp |= (opint[0] >> 16) & 0xff0000;
temp |= (opint[0] >> 24) & 0xff000000;
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_unpkbl (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp;
if (op_const == 0)
return NULL;
temp = opint[0] & 0xff;
temp |= (opint[0] & 0xff00) << 24;
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_unpkbw (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp;
if (op_const == 0)
return NULL;
temp = opint[0] & 0xff;
temp |= (opint[0] & 0x0000ff00) << 8;
temp |= (opint[0] & 0x00ff0000) << 16;
temp |= (opint[0] & 0xff000000) << 24;
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_cttz (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp;
if (op_const == 0)
return NULL;
if (opint[0] == 0)
temp = 64;
else
temp = exact_log2 (opint[0] & -opint[0]);
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_ctlz (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp;
if (op_const == 0)
return NULL;
if (opint[0] == 0)
temp = 64;
else
temp = 64 - floor_log2 (opint[0]) - 1;
return build_int_cst (long_integer_type_node, temp);
}
static tree
alpha_fold_builtin_ctpop (unsigned HOST_WIDE_INT opint[], long op_const)
{
unsigned HOST_WIDE_INT temp, op;
if (op_const == 0)
return NULL;
op = opint[0];
temp = 0;
while (op)
temp++, op &= op - 1;
return build_int_cst (long_integer_type_node, temp);
}
/* Fold one of our builtin functions. */
static tree
alpha_fold_builtin (tree fndecl, int n_args, tree *op,
bool ignore ATTRIBUTE_UNUSED)
{
unsigned HOST_WIDE_INT opint[MAX_ARGS];
long op_const = 0;
int i;
if (n_args >= MAX_ARGS)
return NULL;
for (i = 0; i < n_args; i++)
{
tree arg = op[i];
if (arg == error_mark_node)
return NULL;
opint[i] = 0;
if (TREE_CODE (arg) == INTEGER_CST)
{
op_const |= 1L << i;
opint[i] = int_cst_value (arg);
}
}
switch (DECL_FUNCTION_CODE (fndecl))
{
case ALPHA_BUILTIN_CMPBGE:
return alpha_fold_builtin_cmpbge (opint, op_const);
case ALPHA_BUILTIN_EXTBL:
return alpha_fold_builtin_extxx (op, opint, op_const, 0x01, false);
case ALPHA_BUILTIN_EXTWL:
return alpha_fold_builtin_extxx (op, opint, op_const, 0x03, false);
case ALPHA_BUILTIN_EXTLL:
return alpha_fold_builtin_extxx (op, opint, op_const, 0x0f, false);
case ALPHA_BUILTIN_EXTQL:
return alpha_fold_builtin_extxx (op, opint, op_const, 0xff, false);
case ALPHA_BUILTIN_EXTWH:
return alpha_fold_builtin_extxx (op, opint, op_const, 0x03, true);
case ALPHA_BUILTIN_EXTLH:
return alpha_fold_builtin_extxx (op, opint, op_const, 0x0f, true);
case ALPHA_BUILTIN_EXTQH:
return alpha_fold_builtin_extxx (op, opint, op_const, 0xff, true);
case ALPHA_BUILTIN_INSBL:
return alpha_fold_builtin_insxx (op, opint, op_const, 0x01, false);
case ALPHA_BUILTIN_INSWL:
return alpha_fold_builtin_insxx (op, opint, op_const, 0x03, false);
case ALPHA_BUILTIN_INSLL:
return alpha_fold_builtin_insxx (op, opint, op_const, 0x0f, false);
case ALPHA_BUILTIN_INSQL:
return alpha_fold_builtin_insxx (op, opint, op_const, 0xff, false);
case ALPHA_BUILTIN_INSWH:
return alpha_fold_builtin_insxx (op, opint, op_const, 0x03, true);
case ALPHA_BUILTIN_INSLH:
return alpha_fold_builtin_insxx (op, opint, op_const, 0x0f, true);
case ALPHA_BUILTIN_INSQH:
return alpha_fold_builtin_insxx (op, opint, op_const, 0xff, true);
case ALPHA_BUILTIN_MSKBL:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0x01, false);
case ALPHA_BUILTIN_MSKWL:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0x03, false);
case ALPHA_BUILTIN_MSKLL:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0x0f, false);
case ALPHA_BUILTIN_MSKQL:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0xff, false);
case ALPHA_BUILTIN_MSKWH:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0x03, true);
case ALPHA_BUILTIN_MSKLH:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0x0f, true);
case ALPHA_BUILTIN_MSKQH:
return alpha_fold_builtin_mskxx (op, opint, op_const, 0xff, true);
case ALPHA_BUILTIN_UMULH:
return alpha_fold_builtin_umulh (opint, op_const);
case ALPHA_BUILTIN_ZAP:
opint[1] ^= 0xff;
/* FALLTHRU */
case ALPHA_BUILTIN_ZAPNOT:
return alpha_fold_builtin_zapnot (op, opint, op_const);
case ALPHA_BUILTIN_MINUB8:
return alpha_fold_vector_minmax (MIN_EXPR, op, alpha_v8qi_u);
case ALPHA_BUILTIN_MINSB8:
return alpha_fold_vector_minmax (MIN_EXPR, op, alpha_v8qi_s);
case ALPHA_BUILTIN_MINUW4:
return alpha_fold_vector_minmax (MIN_EXPR, op, alpha_v4hi_u);
case ALPHA_BUILTIN_MINSW4:
return alpha_fold_vector_minmax (MIN_EXPR, op, alpha_v4hi_s);
case ALPHA_BUILTIN_MAXUB8:
return alpha_fold_vector_minmax (MAX_EXPR, op, alpha_v8qi_u);
case ALPHA_BUILTIN_MAXSB8:
return alpha_fold_vector_minmax (MAX_EXPR, op, alpha_v8qi_s);
case ALPHA_BUILTIN_MAXUW4:
return alpha_fold_vector_minmax (MAX_EXPR, op, alpha_v4hi_u);
case ALPHA_BUILTIN_MAXSW4:
return alpha_fold_vector_minmax (MAX_EXPR, op, alpha_v4hi_s);
case ALPHA_BUILTIN_PERR:
return alpha_fold_builtin_perr (opint, op_const);
case ALPHA_BUILTIN_PKLB:
return alpha_fold_builtin_pklb (opint, op_const);
case ALPHA_BUILTIN_PKWB:
return alpha_fold_builtin_pkwb (opint, op_const);
case ALPHA_BUILTIN_UNPKBL:
return alpha_fold_builtin_unpkbl (opint, op_const);
case ALPHA_BUILTIN_UNPKBW:
return alpha_fold_builtin_unpkbw (opint, op_const);
case ALPHA_BUILTIN_CTTZ:
return alpha_fold_builtin_cttz (opint, op_const);
case ALPHA_BUILTIN_CTLZ:
return alpha_fold_builtin_ctlz (opint, op_const);
case ALPHA_BUILTIN_CTPOP:
return alpha_fold_builtin_ctpop (opint, op_const);
case ALPHA_BUILTIN_AMASK:
case ALPHA_BUILTIN_IMPLVER:
case ALPHA_BUILTIN_RPCC:
case ALPHA_BUILTIN_THREAD_POINTER:
case ALPHA_BUILTIN_SET_THREAD_POINTER:
/* None of these are foldable at compile-time. */
default:
return NULL;
}
}
2002-06-04 06:06:38 +02:00
1992-10-26 22:01:33 +01:00
/* This page contains routines that are used to determine what the function
prologue and epilogue code will do and write them out. */
/* Compute the size of the save area in the stack. */
/* These variables are used for communication between the following functions.
They indicate various things about the current function being compiled
that are used to tell what kind of prologue, epilogue and procedure
descriptor to generate. */
/* Nonzero if we need a stack procedure. */
enum alpha_procedure_types {PT_NULL = 0, PT_REGISTER = 1, PT_STACK = 2};
static enum alpha_procedure_types alpha_procedure_type;
/* Register number (either FP or SP) that is used to unwind the frame. */
static int vms_unwind_regno;
/* Register number used to save FP. We need not have one for RA since
we don't modify it for register procedures. This is only defined
for register frame procedures. */
static int vms_save_fp_regno;
/* Register number used to reference objects off our PV. */
static int vms_base_regno;
/* Compute register masks for saved registers. */
static void
alpha_sa_mask (unsigned long *imaskP, unsigned long *fmaskP)
{
unsigned long imask = 0;
unsigned long fmask = 0;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
unsigned int i;
/* When outputting a thunk, we don't have valid register life info,
but assemble_start_function wants to output .frame and .mask
directives. */
if (cfun->is_thunk)
{
*imaskP = 0;
*fmaskP = 0;
return;
}
if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK)
imask |= (1UL << HARD_FRAME_POINTER_REGNUM);
/* One for every register we have to save. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (! fixed_regs[i] && ! call_used_regs[i]
&& df_regs_ever_live_p (i) && i != REG_RA)
{
if (i < 32)
imask |= (1UL << i);
else
fmask |= (1UL << (i - 32));
}
/* We need to restore these for the handler. */
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
if (crtl->calls_eh_return)
{
for (i = 0; ; ++i)
{
unsigned regno = EH_RETURN_DATA_REGNO (i);
if (regno == INVALID_REGNUM)
break;
imask |= 1UL << regno;
}
}
/* If any register spilled, then spill the return address also. */
/* ??? This is required by the Digital stack unwind specification
and isn't needed if we're doing Dwarf2 unwinding. */
if (imask || fmask || alpha_ra_ever_killed ())
imask |= (1UL << REG_RA);
*imaskP = imask;
*fmaskP = fmask;
}
int
alpha_sa_size (void)
{
unsigned long mask[2];
int sa_size = 0;
int i, j;
alpha_sa_mask (&mask[0], &mask[1]);
for (j = 0; j < 2; ++j)
for (i = 0; i < 32; ++i)
if ((mask[j] >> i) & 1)
sa_size++;
2001-09-11 10:52:39 +02:00
if (TARGET_ABI_OPEN_VMS)
{
/* Start with a stack procedure if we make any calls (REG_RA used), or
need a frame pointer, with a register procedure if we otherwise need
at least a slot, and with a null procedure in other cases. */
if ((mask[0] >> REG_RA) & 1 || frame_pointer_needed)
alpha_procedure_type = PT_STACK;
else if (get_frame_size() != 0)
alpha_procedure_type = PT_REGISTER;
else
alpha_procedure_type = PT_NULL;
/* Don't reserve space for saving FP & RA yet. Do that later after we've
made the final decision on stack procedure vs register procedure. */
if (alpha_procedure_type == PT_STACK)
sa_size -= 2;
/* Decide whether to refer to objects off our PV via FP or PV.
If we need FP for something else or if we receive a nonlocal
goto (which expects PV to contain the value), we must use PV.
Otherwise, start by assuming we can use FP. */
vms_base_regno
= (frame_pointer_needed
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
|| cfun->has_nonlocal_label
|| alpha_procedure_type == PT_STACK
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
|| crtl->outgoing_args_size)
? REG_PV : HARD_FRAME_POINTER_REGNUM;
/* If we want to copy PV into FP, we need to find some register
in which to save FP. */
vms_save_fp_regno = -1;
if (vms_base_regno == HARD_FRAME_POINTER_REGNUM)
for (i = 0; i < 32; i++)
if (! fixed_regs[i] && call_used_regs[i] && ! df_regs_ever_live_p (i))
vms_save_fp_regno = i;
/* A VMS condition handler requires a stack procedure in our
implementation. (not required by the calling standard). */
if ((vms_save_fp_regno == -1 && alpha_procedure_type == PT_REGISTER)
|| cfun->machine->uses_condition_handler)
vms_base_regno = REG_PV, alpha_procedure_type = PT_STACK;
else if (alpha_procedure_type == PT_NULL)
vms_base_regno = REG_PV;
/* Stack unwinding should be done via FP unless we use it for PV. */
vms_unwind_regno = (vms_base_regno == REG_PV
? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM);
/* If this is a stack procedure, allow space for saving FP, RA and
a condition handler slot if needed. */
if (alpha_procedure_type == PT_STACK)
sa_size += 2 + cfun->machine->uses_condition_handler;
}
else
{
/* Our size must be even (multiple of 16 bytes). */
if (sa_size & 1)
sa_size++;
}
return sa_size * 8;
}
/* Define the offset between two registers, one to be eliminated,
and the other its replacement, at the start of a routine. */
HOST_WIDE_INT
alpha_initial_elimination_offset (unsigned int from,
unsigned int to ATTRIBUTE_UNUSED)
{
HOST_WIDE_INT ret;
ret = alpha_sa_size ();
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
ret += ALPHA_ROUND (crtl->outgoing_args_size);
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
switch (from)
{
case FRAME_POINTER_REGNUM:
break;
case ARG_POINTER_REGNUM:
ret += (ALPHA_ROUND (get_frame_size ()
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
+ crtl->args.pretend_args_size)
- crtl->args.pretend_args_size);
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
break;
default:
gcc_unreachable ();
}
return ret;
}
#if TARGET_ABI_OPEN_VMS
hooks.h (hook_bool_const_int_const_int_true): Declare. * hooks.h (hook_bool_const_int_const_int_true): Declare. * hooks.c (hook_bool_const_int_const_int_true): New function. * target.h (struct gcc_target): Add can_eliminate field. * target-def.h (TARGET_CAN_ELIMINATE): Define. (TARGET_INITIALIZER): Use TARGET_CAN_ELIMINATE. * ira.c (setup_eliminable_regset): Use can_eliminate target hook. * reload1.c (update_eliminables, init_elim_table): (Ditto.). (elim_table): Revise comment. * system.h (CAN_ELIMINATE): Poison. * defaults.h (CAN_ELIMINATE): Remove. * doc/tm.texi (CAN_ELIMINATE): Revise documentation. * config/alpha/vms.h (CAN_ELIMINATE): Remove macro. * config/alpha/alpha.c (TARGET_CAN_ELIMINATE) [TARGET_ABI_OPEN_VMS]: Define macro. (alpha_vms_can_eliminate): Declare as static, change return type to bool. * config/alpha/alpha-protos.h (alpha_vms_can_eliminate): Remove. * config/arm/arm.h (CAN_ELIMINATE): Remove macro. * config/arm/arm.c (TARGET_CAN_ELIMINATE): Define macro. (arm_can_eliminate): New function. * config/avr/avr.h (CAN_ELIMINATE): Remove macro. * config/avr/avr.c (TARGET_CAN_ELIMINATE): Define macro. (avr_can_eliminate): Declare as static. * config/avr/avr-protos.h (avr_can_eliminate): Remove. * config/bfin/bfin.h (CAN_ELIMINATE): Remove macro. * config/bfin/bfin.c (TARGET_CAN_ELIMINATE): Define macro. (bfin_can_eliminate): New function. * config/crx/crx.h (CAN_ELIMINATE): Remove macro. * config/crx/crx.c (TARGET_CAN_ELIMINATE): Define macro. (crx_can_eliminate): New function. * config/fr30/fr30.h (CAN_ELIMINATE): Remove macro. * config/fr30/fr30.c (TARGET_CAN_ELIMINATE): Define macro. (fr30_can_eliminate): New function. * config/frv/frv.h (CAN_ELIMINATE): Remove macro. * config/frv/frv.c (TARGET_CAN_ELIMINATE): Define macro. (frv_can_eliminate): New function. * config/h8300/h8300.h (CAN_ELIMINATE): Remove macro. * config/h8300/h8300.c (TARGET_CAN_ELIMINATE): Define macro. (h8300_can_eliminate): New function. * config/i386/i386.h (CAN_ELIMINATE): Remove macro. * config/i386/i386.c (TARGET_CAN_ELIMINATE): Define macro. (i386_can_eliminate): Declare as static, change return type to bool. * config/i386/i386-protos.h (i386_can_eliminate): Remove. * config/ia64/ia64.h (CAN_ELIMINATE): Remove macro. * config/ia64/ia64.c (TARGET_CAN_ELIMINATE): Define macro. (ia64_can_eliminate): New function. * config/iq2000/iq2000.h (CAN_ELIMINATE): Remove macro. * config/iq2000/iq2000.c (TARGET_CAN_ELIMINATE): Define macro. (iq2000_can_eliminate): New function. * config/m32r/m32r.h (CAN_ELIMINATE): Remove macro. * config/m32r/m32r.c (TARGET_CAN_ELIMINATE): Define macro. (m32r_can_eliminate): New function. * config/m68hc11/m68hc11.h (CAN_ELIMINATE): Remove macro. * config/m68hc11/m68hc11.c (TARGET_CAN_ELIMINATE): Define macro. (m68hc11_can_eliminate): New function. * config/m68k/m68k.h (CAN_ELIMINATE): Remove macro. * config/m68k/m68k.c (TARGET_CAN_ELIMINATE): Define macro. (m68k_can_eliminate): New function. * config/mep/mep.h (CAN_ELIMINATE): Remove macro. * config/mep/mep.c (TARGET_CAN_ELIMINATE): Define macro. (mep_can_eliminate): New function. * config/mips/mips.h (CAN_ELIMINATE): Remove macro. * config/mips/mips.c (TARGET_CAN_ELIMINATE): Define macro. (mips_can_eliminate): New function. * config/rs6000/rs6000.h (CAN_ELIMINATE): Remove macro. * config/rs6000/rs6000.c (TARGET_CAN_ELIMINATE): Define macro. (rs6000_can_eliminate): New function. * config/s390/s390.h (CAN_ELIMINATE): Remove macro. * config/s390/s390.c (TARGET_CAN_ELIMINATE): Define macro. (s390_can_eliminate): Declare as static. * config/s390/s390-protos.h (sparc_can_eliminate): Remove. * config/score/score.h (CAN_ELIMINATE): Remove macro. * config/score/score.c (TARGET_CAN_ELIMINATE): Define macro. (score_can_eliminate): New function. * config/sparc/sparc.h (CAN_ELIMINATE): Remove macro. * config/sparc/sparc.c (TARGET_CAN_ELIMINATE): Define macro. (sparc_can_eliminate): Declare as static. * config/sparc/sparc-protos.h (sparc_can_eliminate): Remove. * config/stormy16/stormy16.h (CAN_ELIMINATE): Remove macro. * config/stormy16/stormy16.c (TARGET_CAN_ELIMINATE): Define macro. (xstormy16_can_eliminate): New function. * config/v850/v850.h (CAN_ELIMINATE): Remove macro. * config/v850/v850.c (TARGET_CAN_ELIMINATE): Define macro. (v850_can_eliminate): New function. From-SVN: r151096
2009-08-25 23:09:00 +02:00
/* Worker function for TARGET_CAN_ELIMINATE. */
static bool
alpha_vms_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to)
{
/* We need the alpha_procedure_type to decide. Evaluate it now. */
alpha_sa_size ();
switch (alpha_procedure_type)
{
case PT_NULL:
/* NULL procedures have no frame of their own and we only
know how to resolve from the current stack pointer. */
return to == STACK_POINTER_REGNUM;
case PT_REGISTER:
case PT_STACK:
/* We always eliminate except to the stack pointer if there is no
usable frame pointer at hand. */
return (to != STACK_POINTER_REGNUM
|| vms_unwind_regno != HARD_FRAME_POINTER_REGNUM);
}
gcc_unreachable ();
}
/* FROM is to be eliminated for TO. Return the offset so that TO+offset
designates the same location as FROM. */
HOST_WIDE_INT
alpha_vms_initial_elimination_offset (unsigned int from, unsigned int to)
{
/* The only possible attempts we ever expect are ARG or FRAME_PTR to
HARD_FRAME or STACK_PTR. We need the alpha_procedure_type to decide
on the proper computations and will need the register save area size
in most cases. */
HOST_WIDE_INT sa_size = alpha_sa_size ();
/* PT_NULL procedures have no frame of their own and we only allow
elimination to the stack pointer. This is the argument pointer and we
resolve the soft frame pointer to that as well. */
if (alpha_procedure_type == PT_NULL)
return 0;
/* For a PT_STACK procedure the frame layout looks as follows
-----> decreasing addresses
< size rounded up to 16 | likewise >
--------------#------------------------------+++--------------+++-------#
incoming args # pretended args | "frame" | regs sa | PV | outgoing args #
--------------#---------------------------------------------------------#
^ ^ ^ ^
ARG_PTR FRAME_PTR HARD_FRAME_PTR STACK_PTR
PT_REGISTER procedures are similar in that they may have a frame of their
own. They have no regs-sa/pv/outgoing-args area.
We first compute offset to HARD_FRAME_PTR, then add what we need to get
to STACK_PTR if need be. */
{
HOST_WIDE_INT offset;
HOST_WIDE_INT pv_save_size = alpha_procedure_type == PT_STACK ? 8 : 0;
switch (from)
{
case FRAME_POINTER_REGNUM:
offset = ALPHA_ROUND (sa_size + pv_save_size);
break;
case ARG_POINTER_REGNUM:
offset = (ALPHA_ROUND (sa_size + pv_save_size
+ get_frame_size ()
+ crtl->args.pretend_args_size)
- crtl->args.pretend_args_size);
break;
default:
gcc_unreachable ();
}
if (to == STACK_POINTER_REGNUM)
offset += ALPHA_ROUND (crtl->outgoing_args_size);
return offset;
}
}
#define COMMON_OBJECT "common_object"
static tree
common_object_handler (tree *node, tree name ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED,
bool *no_add_attrs ATTRIBUTE_UNUSED)
{
tree decl = *node;
gcc_assert (DECL_P (decl));
DECL_COMMON (decl) = 1;
return NULL_TREE;
}
ansidecl.h (EXPORTED_CONST): Define. include/: * ansidecl.h (EXPORTED_CONST): Define. gcc/: * dummy-checksum.c (executable_checksum): Use EXPORTED_CONST. * genattrtab.c (write_length_unit_log): Likewise. * genchecksum.c (dosum): Likewise. * gengtype.c (write_rtx_next): Likewise. (finish_root_table, write_roots): Likewise. * gimple.c (gimple_ops_offset_): Likewise. * tree-nomudflap.c (gt_ggc_r_gt_tree_mudflap_h): Likewise. * config/arc/arc.c (arc_attribute_table): Likewise. * config/arm/arm.c (arm_attribute_table): Likewise. * config/avr/avr.c (avr_attribute_table): Likewise. * config/crx/crx.c (crx_attribute_table): Likewise. * config/m32r/m32r.c (m32r_attribute_table): Likewise. * config/m68hc11/m68hc11.c (m68hc11_attribute_table): Likewise. * config/mcore/mcore.c (mcore_attribute_table): Likewise. * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise. * config/sh/sh.c (sh_attribute_table): Likewise. * config/sparc/sparc.c (sparc_attribute_table): Likewise. * config/spu/spu.c (spu_attribute_table): Likewise. * config/v850/v850.c (v850_attribute_table): Likewise. * config/alpha/alpha.c (vms_attribute_table): Make static. * config/bfin/bfin.c (bfin_attribute_table): Likewise. * config/h8300/h8300.c (h8300_attribute_table): Likewise. * config/mips/mips.c (mips_attribute_table): Likewise. * Makefile.in (dummy-checksum.o): Depend upon $(CONFIG_H) and $(SYSTEM_H). (cc1-checksum.o): Likewise. gcc/cp/: * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and $(SYSTEM_H). gcc/objc/: * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and $(SYSTEM_H). gcc/objcp/: * Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H) and $(SYSTEM_H). From-SVN: r148146
2009-06-03 22:19:55 +02:00
static const struct attribute_spec vms_attribute_table[] =
1992-10-26 22:01:33 +01:00
{
ChangeLog gcc/ 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * doc/plugins.texi: Adjust documentation for plugin register_callback. * tree.h (attribute_spec): Add new member affects_type_identity. - Zitierten Text anzeigen - * attribs.c (empty_attribute_table): Adjust attribute_spec initializers. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin.h: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/cygming.h: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/sh/sh.c: Likewise. * config/sol2.h: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850.c: Likewise. ChangeLog gcc/cp 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * tree.c (cxx_attribute_table): Adjust table. ChangeLog gcc/testsuite 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * g++.dg/plugin/attribute_plugin.c: Adjust test. ChangeLog gcc/java 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lang.c (java_attribute_table): Adjust table. ChangeLog gcc/lto 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * lto-lang.c (lto_attribute_table): Adjust table. ChangeLog gcc/ada 2011-03-21 Kai Tietz <ktietz@redhat.com> PR target/12171 * gcc-interface/utils.c (gnat_internal_attribute_table): Add new element. ChangeLog gcc/c-family 2011-03-17 Kai Tietz PR target/12171 * c-common.c (c_common_attribute_table): Add new element. (c_common_format_attribute_table): Likewise. From-SVN: r171209
2011-03-21 09:29:36 +01:00
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
affects_type_identity } */
{ COMMON_OBJECT, 0, 1, true, false, false, common_object_handler, false },
{ NULL, 0, 0, false, false, false, NULL, false }
Table-driven attributes. * c-decl.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/arm/pe.c, config/avr/avr.c, config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h, config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c, config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c, config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi, doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c, tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. * tree.h (struct tree_decl): Change machine_attributes to attributes. * doc/c-tree.texi: Document that all attributes are now attached to decls and types. * c-common.c (add_attribute, attrtab, attrtab_idx, default_valid_lang_attribute, valid_lang_attribute): Remove. (attribute_tables, attributes_initialized, c_common_attribute_table, default_lang_attribute_table): New variables. (handle_packed_attribute, handle_nocommon_attribute, handle_common_attribute, handle_noreturn_attribute, handle_unused_attribute, handle_const_attribute, handle_transparent_union_attribute, handle_constructor_attribute, handle_destructor_attribute, handle_mode_attribute, handle_section_attribute, handle_aligned_attribute, handle_weak_attribute, handle_alias_attribute, handle_no_instrument_function_attribute, handle_no_check_memory_usage_attribute, handle_malloc_attribute, handle_no_limit_stack_attribute, handle_pure_attribute): New functions. (init_attributes, decl_attributes): Rewrite to implement table-driven attributes. * c-common.h (enum attribute_flags): Move to tree.h. * c-format.c (decl_handle_format_attribute, decl_handle_format_arg_attribute): Rename to handle_format_attribute and handle_format_arg_attribute. Update for table-driven attributes. * c-common.h (decl_handle_format_attribute, decl_handle_format_arg_attribute): Remove prototypes. (handle_format_attribute, handle_format_arg_attribute): Add prototypes. * c-decl.c (grokdeclarator): Handle attributes nested inside declarators. * c-parse.in (setattrs, maybe_setattrs): Remove. (maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs. Update to handle nested attributes properly. (maybe_resetattrs, after_type_declarator, parm_declarator_nostarttypename, notype_declarator, absdcl1_noea, absdcl1_ea, direct_absdcl1): Update to handle nested attributes properly. (make_pointer_declarator): Update to handle nested attributes properly. * doc/extend.texi: Update documentation of limits of attributes syntax. Warn about problems with attribute semantics in C++. * target.h (struct target): Remove valid_decl_attribute and valid_type_attribute. Add attribute_table and function_attribute_inlinable_p. * target-def.h (TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Remove. (TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): Add. (TARGET_INITIALIZER): Update. * integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default definition. (function_attribute_inlinable_p): New function. Check for the presence of any machine attributes before using targetm.function_attribute_inlinable_p. (function_cannot_inline_p): Update. * Makefile.in (integrate.o): Update dependencies. * doc/tm.texi: Update documentation of target attributes and example definition of TARGET_VALID_TYPE_ATTRIBUTE. * tree.c (default_valid_attribute_p, valid_machine_attribute): Remove. (default_target_attribute_table, default_function_attribute_inlinable_p): New. (lookup_attribute): Update comment to clarify handling of multiple attributes with the same name. (merge_attributes, attribute_list_contained): Allow multiple attributes with the same name but different arguments to appear in the same attribute list. * tree.h (default_valid_attribute_p): Remove prototype. (struct attribute_spec): New. (default_target_attribute_table): Declare. (enum attribute_flags): Move from c-common.h. Add ATTR_FLAG_TYPE_IN_PLACE. (default_function_attribute_inlinable_p): Declare. * config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (vms_attribute_table): New. * config/arc/arc.c (arc_valid_decl_attribute): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (arc_attribute_table, arc_handle_interrupt_attribute): New. * config/arm/arm.c (arm_valid_type_attribute_p, arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p): Remove. (TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (arm_attribute_table, arm_handle_fndecl_attribute, arm_handle_isr_attribute): New. * config/avr/avr.c (avr_valid_type_attribute, avr_valid_decl_attribute): Remove. (TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (avr_attribute_table, avr_handle_progmem_attribute, avr_handle_fndecl_attribute): New. * config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove. (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (c4x_attribute_table, c4x_handle_fntype_attribute): New. * config/h8300/h8300.c (h8300_valid_decl_attribute): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (h8300_attribute_table, h8300_handle_fndecl_attribute, h8300_handle_eightbit_data_attribute, h8300_handle_tiny_data_attribute): New. * config/i386/i386-protos.h (ix86_valid_type_attribute_p, i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p): Remove prototypes. (ix86_handle_dll_attribute, ix86_handle_shared_attribute): New declarations. * config/i386/i386.c (ix86_valid_type_attribute_p: Remove. (TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (ix86_attribute_table, ix86_handle_cdecl_attribute, ix86_handle_regparm_attribute): New. * config/i386/winnt.c (i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p): Remove. (ix86_handle_dll_attribute, ix86_handle_shared_attribute): New. * config/ia64/ia64.c (ia64_valid_type_attribute): Remove. (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (ia64_attribute_table): New. * config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1, interrupt_ident2, model_ident1, model_ident2): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (init_idents): Update. (m32r_attribute_table, m32r_handle_model_attribute): New. * config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p): Remove. (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New. * config/mcore/mcore.c (mcore_valid_decl_attribute): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (mcore_attribute_table, mcore_handle_naked_attribute): New. * config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove. (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (ns32k_attribute_table, ns32k_handle_fntype_attribute): New. * config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove. (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (rs6000_attribute_table, rs6000_handle_longcall_attribute): New. * config/sh/sh.c (sh_valid_decl_attribute): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (sh_attribute_table, sh_handle_interrupt_handler_attribute, sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute): New. * config/stormy16/stormy16.c (stormy16_valid_type_attribute): Remove. (TARGET_VALID_TYPE_ATTRIBUTE): Don't define (TARGET_ATTRIBUTE_TABLE): Define. (stormy16_attribute_table, stormy16_handle_interrupt_attribute): New. * config/v850/v850.c (v850_valid_decl_attribute): Remove. (TARGET_VALID_DECL_ATTRIBUTE): Don't define. (TARGET_ATTRIBUTE_TABLE): Define. (v850_attribute_table, v850_handle_interrupt_attribute, v850_handle_data_area_attribute): New. * config/v850/v850-c.c (mark_current_function_as_interrupt): Return void. Call decl_attributes instead of valid_machine_attribute. cp: Table-driven attributes. * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. * decl2.c (cplus_decl_attributes): Only take one attributes parameter. * cp-tree.c (cplus_decl_attributes): Update prototype. * class.c (finish_struct), decl.c (start_decl, start_function), decl2.c (grokfield), friend.c (do_friend), parse.y (parse_bitfield): Update calls to cplus_decl_attributes. * decl.c (grokdeclarator): Take a pointer to a single ordinary attribute list. * decl.h (grokdeclarator): Update prototype. * decl2.c (grokfield): Take a single ordinary attribute list. * friend.c (do_friend): Likewise. * decl.c (shadow_tag, groktypename, start_decl, start_handler_parms, grokdeclarator, grokparms, start_function, start_method), decl2.c (grokfield, grokbitfield, grokoptypename), parse.y (parse_field, parse_bitfield, component_decl_1), pt.c (process_template_parm, do_decl_instantiation): Pass single ordinary attribute lists around. * decl.c (grokdeclarator): Correct handling of nested attributes. Revert the patch 1998-10-18 Jason Merrill <jason@yorick.cygnus.com> * decl.c (grokdeclarator): Embedded attrs bind to the right, not the left. . * cp-tree.h (cp_valid_lang_attribute): Remove declaration (cp_attribute_table): Declare. * decl.c (valid_lang_attribute): Don't define. (lang_attribute_table): Define. (init_decl_processing): Initialize lang_attribute_table instead of valid_lang_attribute. * tree.c (cp_valid_lang_attribute): Remove. (handle_java_interface_attribute, handle_com_interface_attribute, handle_init_priority_attribute): New functions. (cp_attribute_table): New array. * decl2.c (import_export_class): Don't use targetm.valid_type_attribute. testsuite: Table-driven attributes. * g++.dg/ext/attrib1.C: New test. From-SVN: r45718
2001-09-21 03:27:06 +02:00
};
1992-10-26 22:01:33 +01:00
void
vms_output_aligned_decl_common(FILE *file, tree decl, const char *name,
unsigned HOST_WIDE_INT size,
unsigned int align)
{
tree attr = DECL_ATTRIBUTES (decl);
fprintf (file, "%s", COMMON_ASM_OP);
assemble_name (file, name);
fprintf (file, "," HOST_WIDE_INT_PRINT_UNSIGNED, size);
/* ??? Unlike on OSF/1, the alignment factor is not in log units. */
fprintf (file, ",%u", align / BITS_PER_UNIT);
if (attr)
{
attr = lookup_attribute (COMMON_OBJECT, attr);
if (attr)
fprintf (file, ",%s",
IDENTIFIER_POINTER (TREE_VALUE (TREE_VALUE (attr))));
}
fputc ('\n', file);
}
#undef COMMON_OBJECT
#endif
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
static int
find_lo_sum_using_gp (rtx *px, void *data ATTRIBUTE_UNUSED)
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
{
return GET_CODE (*px) == LO_SUM && XEXP (*px, 0) == pic_offset_table_rtx;
}
int
alpha_find_lo_sum_using_gp (rtx insn)
{
return for_each_rtx (&PATTERN (insn), find_lo_sum_using_gp, NULL) > 0;
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
}
static int
alpha_does_function_need_gp (void)
{
rtx insn;
1992-10-26 22:01:33 +01:00
2001-09-11 10:52:39 +02:00
/* The GP being variable is an OSF abi thing. */
if (! TARGET_ABI_OSF)
return 0;
1992-10-26 22:01:33 +01:00
/* We need the gp to load the address of __mcount. */
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
if (TARGET_PROFILING_NEEDS_GP && crtl->profile)
return 1;
/* The code emitted by alpha_output_mi_thunk_osf uses the gp. */
if (cfun->is_thunk)
return 1;
/* The nonlocal receiver pattern assumes that the gp is valid for
the nested function. Reasonable because it's almost always set
correctly already. For the cases where that's wrong, make sure
the nested function loads its gp on entry. */
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
if (crtl->has_nonlocal_goto)
return 1;
/* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first.
Even if we are a static function, we still need to do this in case
our address is taken and passed to something like qsort. */
1992-10-26 22:01:33 +01:00
push_topmost_sequence ();
insn = get_insns ();
pop_topmost_sequence ();
for (; insn; insn = NEXT_INSN (insn))
if (NONDEBUG_INSN_P (insn)
&& ! JUMP_TABLE_DATA_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER
&& get_attr_usegp (insn))
return 1;
1992-10-26 22:01:33 +01:00
return 0;
1992-10-26 22:01:33 +01:00
}
/* Helper function to set RTX_FRAME_RELATED_P on instructions, including
sequences. */
static rtx
set_frame_related_p (void)
{
Delete SEQUENCE rtl usage outside of reorg and ssa passes. 2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-11 14:22:48 +02:00
rtx seq = get_insns ();
rtx insn;
end_sequence ();
Delete SEQUENCE rtl usage outside of reorg and ssa passes. 2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-11 14:22:48 +02:00
if (!seq)
return NULL_RTX;
if (INSN_P (seq))
{
Delete SEQUENCE rtl usage outside of reorg and ssa passes. 2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-11 14:22:48 +02:00
insn = seq;
while (insn != NULL_RTX)
{
RTX_FRAME_RELATED_P (insn) = 1;
insn = NEXT_INSN (insn);
}
seq = emit_insn (seq);
}
else
{
seq = emit_insn (seq);
RTX_FRAME_RELATED_P (seq) = 1;
}
Delete SEQUENCE rtl usage outside of reorg and ssa passes. 2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-11 14:22:48 +02:00
return seq;
}
#define FRP(exp) (start_sequence (), exp, set_frame_related_p ())
/* Generates a store with the proper unwind info attached. VALUE is
stored at BASE_REG+BASE_OFS. If FRAME_BIAS is nonzero, then BASE_REG
contains SP+FRAME_BIAS, and that is the unwind info that should be
generated. If FRAME_REG != VALUE, then VALUE is being stored on
behalf of FRAME_REG, and FRAME_REG should be present in the unwind. */
static void
emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias,
HOST_WIDE_INT base_ofs, rtx frame_reg)
{
rtx addr, mem, insn;
addr = plus_constant (base_reg, base_ofs);
mem = gen_frame_mem (DImode, addr);
insn = emit_move_insn (mem, value);
RTX_FRAME_RELATED_P (insn) = 1;
if (frame_bias || value != frame_reg)
{
if (frame_bias)
{
addr = plus_constant (stack_pointer_rtx, frame_bias + base_ofs);
mem = gen_rtx_MEM (DImode, addr);
}
add_reg_note (insn, REG_FRAME_RELATED_EXPR,
gen_rtx_SET (VOIDmode, mem, frame_reg));
}
}
static void
emit_frame_store (unsigned int regno, rtx base_reg,
HOST_WIDE_INT frame_bias, HOST_WIDE_INT base_ofs)
{
rtx reg = gen_rtx_REG (DImode, regno);
emit_frame_store_1 (reg, base_reg, frame_bias, base_ofs, reg);
}
Stack usage support Stack usage support * common.opt (-fstack-usage): New option. * doc/invoke.texi (Debugging options): Document it. * builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE and propagate it to allocate_dynamic_stack_space. (expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change. * calls.c (initialize_argument_information): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_call): Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a variable-sized argument onto the stack. Pass TRUE as 4th argument to allocate_dynamic_stack_space. Update current_function_pushed_stack_size. (emit_library_call_value_1): Likewise. * explow.c (allocate_dynamic_stack_space): Add 4th bool parameter CANNOT_ACCUMULATE. If flag_stack_usage, look into the size and attempt to find an upper bound. Remove redundant code for the SETJMP_VIA_SAVE_AREA case. * expr.h (allocate_dynamic_stack_space): Add 4th bool parameter. * function.h (struct stack_usage): New structure. (current_function_static_stack_size): New macro. (current_function_dynamic_stack_size): Likewise. (current_function_pushed_stack_size): Likewise. (current_function_dynamic_alloc_count): Likewise. (current_function_has_unbounded_dynamic_stack_size): Likewise. (current_function_allocates_dynamic_stack_space): Likewise. (struct function): Add new field 'su'. * function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA, add the value of the dynamic offset to the dynamic stack usage. (gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. (prepare_function_start): Allocate cfun->su if flag_stack_usage. (rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage. * gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. * output.h (output_stack_usage): Declare. * toplev.c (stack_usage_file): New file pointer. (output_stack_usage): New function. (open_auxiliary_file): Likewise. (lang_dependent_init): Open file if flag_stack_usage is set. (finalize): Close file if stack_usage_file is not null. * tree.h (ALLOCA_FOR_VAR_P): New macro. * config/alpha/alpha.c (compute_frame_size): New function. (alpha_expand_prologue): Use it. (alpha_start_function): Likewise. (alpha_expand_epilogue): Likewise. Set stack usage info. * config/i386/i386.c (ix86_expand_prologue): Likewise. * config/ia64/ia64.c (ia64_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/pa/pa.c (hppa_expand_prologue): Likewise. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. testsuite/ * lib/gcc-dg.exp (cleanup-stack-usage): New procedure. * lib/scanasm.exp (scan-stack-usage): Likewise. (scan-stack-usage-not): Likewise. * gcc.dg/stack-usage-1.c: New test. * gcc.target/i386/stack-usage-realign.c: Likewise. From-SVN: r163660
2010-08-30 22:04:49 +02:00
/* Compute the frame size. SIZE is the size of the "naked" frame
and SA_SIZE is the size of the register save area. */
static HOST_WIDE_INT
compute_frame_size (HOST_WIDE_INT size, HOST_WIDE_INT sa_size)
{
if (TARGET_ABI_OPEN_VMS)
return ALPHA_ROUND (sa_size
+ (alpha_procedure_type == PT_STACK ? 8 : 0)
+ size
+ crtl->args.pretend_args_size);
else
return ALPHA_ROUND (crtl->outgoing_args_size)
+ sa_size
+ ALPHA_ROUND (size
+ crtl->args.pretend_args_size);
}
1992-10-26 22:01:33 +01:00
/* Write function prologue. */
/* On vms we have two kinds of functions:
- stack frame (PROC_STACK)
these are 'normal' functions with local vars and which are
calling other functions
- register frame (PROC_REGISTER)
keeps all data in registers, needs no stack
We must pass this to the assembler so it can generate the
proper pdsc (procedure descriptor)
This is done with the '.pdesc' command.
On not-vms, we don't really differentiate between the two, as we can
simply allocate stack without saving registers. */
void
alpha_expand_prologue (void)
{
/* Registers to save. */
unsigned long imask = 0;
unsigned long fmask = 0;
/* Stack space needed for pushing registers clobbered by us. */
HOST_WIDE_INT sa_size, sa_bias;
/* Complete stack size needed. */
HOST_WIDE_INT frame_size;
/* Probed stack size; it additionally includes the size of
the "reserve region" if any. */
HOST_WIDE_INT probed_size;
/* Offset from base reg to register save area. */
HOST_WIDE_INT reg_offset;
rtx sa_reg;
int i;
sa_size = alpha_sa_size ();
Stack usage support Stack usage support * common.opt (-fstack-usage): New option. * doc/invoke.texi (Debugging options): Document it. * builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE and propagate it to allocate_dynamic_stack_space. (expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change. * calls.c (initialize_argument_information): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_call): Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a variable-sized argument onto the stack. Pass TRUE as 4th argument to allocate_dynamic_stack_space. Update current_function_pushed_stack_size. (emit_library_call_value_1): Likewise. * explow.c (allocate_dynamic_stack_space): Add 4th bool parameter CANNOT_ACCUMULATE. If flag_stack_usage, look into the size and attempt to find an upper bound. Remove redundant code for the SETJMP_VIA_SAVE_AREA case. * expr.h (allocate_dynamic_stack_space): Add 4th bool parameter. * function.h (struct stack_usage): New structure. (current_function_static_stack_size): New macro. (current_function_dynamic_stack_size): Likewise. (current_function_pushed_stack_size): Likewise. (current_function_dynamic_alloc_count): Likewise. (current_function_has_unbounded_dynamic_stack_size): Likewise. (current_function_allocates_dynamic_stack_space): Likewise. (struct function): Add new field 'su'. * function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA, add the value of the dynamic offset to the dynamic stack usage. (gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. (prepare_function_start): Allocate cfun->su if flag_stack_usage. (rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage. * gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. * output.h (output_stack_usage): Declare. * toplev.c (stack_usage_file): New file pointer. (output_stack_usage): New function. (open_auxiliary_file): Likewise. (lang_dependent_init): Open file if flag_stack_usage is set. (finalize): Close file if stack_usage_file is not null. * tree.h (ALLOCA_FOR_VAR_P): New macro. * config/alpha/alpha.c (compute_frame_size): New function. (alpha_expand_prologue): Use it. (alpha_start_function): Likewise. (alpha_expand_epilogue): Likewise. Set stack usage info. * config/i386/i386.c (ix86_expand_prologue): Likewise. * config/ia64/ia64.c (ia64_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/pa/pa.c (hppa_expand_prologue): Likewise. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. testsuite/ * lib/gcc-dg.exp (cleanup-stack-usage): New procedure. * lib/scanasm.exp (scan-stack-usage): Likewise. (scan-stack-usage-not): Likewise. * gcc.dg/stack-usage-1.c: New test. * gcc.target/i386/stack-usage-realign.c: Likewise. From-SVN: r163660
2010-08-30 22:04:49 +02:00
frame_size = compute_frame_size (get_frame_size (), sa_size);
if (flag_stack_usage_info)
Stack usage support Stack usage support * common.opt (-fstack-usage): New option. * doc/invoke.texi (Debugging options): Document it. * builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE and propagate it to allocate_dynamic_stack_space. (expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change. * calls.c (initialize_argument_information): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_call): Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a variable-sized argument onto the stack. Pass TRUE as 4th argument to allocate_dynamic_stack_space. Update current_function_pushed_stack_size. (emit_library_call_value_1): Likewise. * explow.c (allocate_dynamic_stack_space): Add 4th bool parameter CANNOT_ACCUMULATE. If flag_stack_usage, look into the size and attempt to find an upper bound. Remove redundant code for the SETJMP_VIA_SAVE_AREA case. * expr.h (allocate_dynamic_stack_space): Add 4th bool parameter. * function.h (struct stack_usage): New structure. (current_function_static_stack_size): New macro. (current_function_dynamic_stack_size): Likewise. (current_function_pushed_stack_size): Likewise. (current_function_dynamic_alloc_count): Likewise. (current_function_has_unbounded_dynamic_stack_size): Likewise. (current_function_allocates_dynamic_stack_space): Likewise. (struct function): Add new field 'su'. * function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA, add the value of the dynamic offset to the dynamic stack usage. (gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. (prepare_function_start): Allocate cfun->su if flag_stack_usage. (rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage. * gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. * output.h (output_stack_usage): Declare. * toplev.c (stack_usage_file): New file pointer. (output_stack_usage): New function. (open_auxiliary_file): Likewise. (lang_dependent_init): Open file if flag_stack_usage is set. (finalize): Close file if stack_usage_file is not null. * tree.h (ALLOCA_FOR_VAR_P): New macro. * config/alpha/alpha.c (compute_frame_size): New function. (alpha_expand_prologue): Use it. (alpha_start_function): Likewise. (alpha_expand_epilogue): Likewise. Set stack usage info. * config/i386/i386.c (ix86_expand_prologue): Likewise. * config/ia64/ia64.c (ia64_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/pa/pa.c (hppa_expand_prologue): Likewise. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. testsuite/ * lib/gcc-dg.exp (cleanup-stack-usage): New procedure. * lib/scanasm.exp (scan-stack-usage): Likewise. (scan-stack-usage-not): Likewise. * gcc.dg/stack-usage-1.c: New test. * gcc.target/i386/stack-usage-realign.c: Likewise. From-SVN: r163660
2010-08-30 22:04:49 +02:00
current_function_static_stack_size = frame_size;
if (TARGET_ABI_OPEN_VMS)
reg_offset = 8 + 8 * cfun->machine->uses_condition_handler;
else
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
alpha_sa_mask (&imask, &fmask);
/* Emit an insn to reload GP, if needed. */
if (TARGET_ABI_OSF)
{
alpha_function_needs_gp = alpha_does_function_need_gp ();
if (alpha_function_needs_gp)
emit_insn (gen_prologue_ldgp ());
}
/* TARGET_PROFILING_NEEDS_GP actually implies that we need to insert
the call to mcount ourselves, rather than having the linker do it
magically in response to -pg. Since _mcount has special linkage,
don't represent the call as a call. */
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
if (TARGET_PROFILING_NEEDS_GP && crtl->profile)
emit_insn (gen_prologue_mcount ());
2001-09-11 10:52:39 +02:00
/* Adjust the stack by the frame size. If the frame size is > 4096
bytes, we need to be sure we probe somewhere in the first and last
4096 bytes (we can probably get away without the latter test) and
every 8192 bytes in between. If the frame size is > 32768, we
do this in a loop. Otherwise, we generate the explicit probe
instructions.
Note that we are only allowed to adjust sp once in the prologue. */
probed_size = frame_size;
if (flag_stack_check)
probed_size += STACK_CHECK_PROTECT;
if (probed_size <= 32768)
{
if (probed_size > 4096)
{
int probed;
for (probed = 4096; probed < probed_size; probed += 8192)
emit_insn (gen_probe_stack (GEN_INT (-probed)));
/* We only have to do this probe if we aren't saving registers or
if we are probing beyond the frame because of -fstack-check. */
if ((sa_size == 0 && probed_size > probed - 4096)
|| flag_stack_check)
emit_insn (gen_probe_stack (GEN_INT (-probed_size)));
}
if (frame_size != 0)
FRP (emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
GEN_INT (-frame_size))));
}
else
{
/* Here we generate code to set R22 to SP + 4096 and set R23 to the
number of 8192 byte blocks to probe. We then probe each block
in the loop and then set SP to the proper location. If the
amount remaining is > 4096, we have to do one more probe if we
are not saving any registers or if we are probing beyond the
frame because of -fstack-check. */
HOST_WIDE_INT blocks = (probed_size + 4096) / 8192;
HOST_WIDE_INT leftover = probed_size + 4096 - blocks * 8192;
rtx ptr = gen_rtx_REG (DImode, 22);
rtx count = gen_rtx_REG (DImode, 23);
rtx seq;
emit_move_insn (count, GEN_INT (blocks));
emit_insn (gen_adddi3 (ptr, stack_pointer_rtx, GEN_INT (4096)));
/* Because of the difficulty in emitting a new basic block this
late in the compilation, generate the loop as a single insn. */
emit_insn (gen_prologue_stack_probe_loop (count, ptr));
if ((leftover > 4096 && sa_size == 0) || flag_stack_check)
{
rtx last = gen_rtx_MEM (DImode, plus_constant (ptr, -leftover));
MEM_VOLATILE_P (last) = 1;
emit_move_insn (last, const0_rtx);
}
if (flag_stack_check)
{
/* If -fstack-check is specified we have to load the entire
constant into a register and subtract from the sp in one go,
because the probed stack size is not equal to the frame size. */
HOST_WIDE_INT lo, hi;
lo = ((frame_size & 0xffff) ^ 0x8000) - 0x8000;
hi = frame_size - lo;
emit_move_insn (ptr, GEN_INT (hi));
emit_insn (gen_adddi3 (ptr, ptr, GEN_INT (lo)));
seq = emit_insn (gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx,
ptr));
}
else
{
seq = emit_insn (gen_adddi3 (stack_pointer_rtx, ptr,
GEN_INT (-leftover)));
}
/* This alternative is special, because the DWARF code cannot
possibly intuit through the loop above. So we invent this
note it looks at instead. */
RTX_FRAME_RELATED_P (seq) = 1;
add_reg_note (seq, REG_FRAME_RELATED_EXPR,
gen_rtx_SET (VOIDmode, stack_pointer_rtx,
plus_constant (stack_pointer_rtx,
-frame_size)));
}
/* Cope with very large offsets to the register save area. */
sa_bias = 0;
sa_reg = stack_pointer_rtx;
if (reg_offset + sa_size > 0x8000)
{
int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000;
rtx sa_bias_rtx;
if (low + sa_size <= 0x8000)
sa_bias = reg_offset - low, reg_offset = low;
else
sa_bias = reg_offset, reg_offset = 0;
sa_reg = gen_rtx_REG (DImode, 24);
sa_bias_rtx = GEN_INT (sa_bias);
if (add_operand (sa_bias_rtx, DImode))
emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_bias_rtx));
else
2001-09-11 10:52:39 +02:00
{
emit_move_insn (sa_reg, sa_bias_rtx);
emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_reg));
2001-09-11 10:52:39 +02:00
}
}
/* Save regs in stack order. Beginning with VMS PV. */
if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK)
emit_frame_store (REG_PV, stack_pointer_rtx, 0, 0);
/* Save register RA next. */
if (imask & (1UL << REG_RA))
2001-09-11 10:52:39 +02:00
{
emit_frame_store (REG_RA, sa_reg, sa_bias, reg_offset);
imask &= ~(1UL << REG_RA);
reg_offset += 8;
2001-09-11 10:52:39 +02:00
}
/* Now save any other registers required to be saved. */
for (i = 0; i < 31; i++)
if (imask & (1UL << i))
{
emit_frame_store (i, sa_reg, sa_bias, reg_offset);
reg_offset += 8;
}
for (i = 0; i < 31; i++)
if (fmask & (1UL << i))
{
emit_frame_store (i+32, sa_reg, sa_bias, reg_offset);
reg_offset += 8;
}
if (TARGET_ABI_OPEN_VMS)
{
/* Register frame procedures save the fp. */
if (alpha_procedure_type == PT_REGISTER)
{
rtx insn = emit_move_insn (gen_rtx_REG (DImode, vms_save_fp_regno),
hard_frame_pointer_rtx);
add_reg_note (insn, REG_CFA_REGISTER, NULL);
RTX_FRAME_RELATED_P (insn) = 1;
}
if (alpha_procedure_type != PT_NULL && vms_base_regno != REG_PV)
emit_insn (gen_force_movdi (gen_rtx_REG (DImode, vms_base_regno),
gen_rtx_REG (DImode, REG_PV)));
if (alpha_procedure_type != PT_NULL
&& vms_unwind_regno == HARD_FRAME_POINTER_REGNUM)
FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx));
/* If we have to allocate space for outgoing args, do it now. */
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
if (crtl->outgoing_args_size != 0)
{
rtx seq
= emit_move_insn (stack_pointer_rtx,
plus_constant
(hard_frame_pointer_rtx,
- (ALPHA_ROUND
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
(crtl->outgoing_args_size))));
/* Only set FRAME_RELATED_P on the stack adjustment we just emitted
if ! frame_pointer_needed. Setting the bit will change the CFA
computation rule to use sp again, which would be wrong if we had
frame_pointer_needed, as this means sp might move unpredictably
later on.
Also, note that
frame_pointer_needed
=> vms_unwind_regno == HARD_FRAME_POINTER_REGNUM
and
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
crtl->outgoing_args_size != 0
=> alpha_procedure_type != PT_NULL,
so when we are not setting the bit here, we are guaranteed to
have emitted an FRP frame pointer update just before. */
RTX_FRAME_RELATED_P (seq) = ! frame_pointer_needed;
}
}
else
{
/* If we need a frame pointer, set it from the stack pointer. */
if (frame_pointer_needed)
{
if (TARGET_CAN_FAULT_IN_PROLOGUE)
FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx));
else
/* This must always be the last instruction in the
prologue, thus we emit a special move + clobber. */
FRP (emit_insn (gen_init_fp (hard_frame_pointer_rtx,
stack_pointer_rtx, sa_reg)));
}
}
/* The ABIs for VMS and OSF/1 say that while we can schedule insns into
the prologue, for exception handling reasons, we cannot do this for
any insn that might fault. We could prevent this for mems with a
(clobber:BLK (scratch)), but this doesn't work for fp insns. So we
have to prevent all such scheduling with a blockage.
Linux, on the other hand, never bothered to implement OSF/1's
exception handling, and so doesn't care about such things. Anyone
planning to use dwarf2 frame-unwind info can also omit the blockage. */
if (! TARGET_CAN_FAULT_IN_PROLOGUE)
emit_insn (gen_blockage ());
}
dbxout.c (asmfile): Delete. * dbxout.c (asmfile): Delete. All uses changed to asm_out_file. (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE): Default to 0. (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined. When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit an internal label and an N_SLINE .stabn whose value is the difference between that label and the function entry label. (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined, but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a label and an N_SO stab with an empty string referring to it. (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE. (dbxout_type_methods, dbxout_symbol): Remove #if 0 block. (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this macro is never defined. * sdbout.c (sdbout_source_line_counter): Delete. (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition. (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes only two arguments. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE. * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs. * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro definitions (identical to default). * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h: Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not DBX_OUTPUT_MAIN_SOURCE_FILE_END. * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h: Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno. * config/alpha/alpha.c: Move declaration of num_source_filenames up. (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE. (sym_lineno): Delete. (alpha_output_filename): Do not emit N_SOL stabs here. Remove now-unused variable. (alpha_output_lineno): Delete. * config/mips/mips-protos.h: Don't prototype mips_output_lineno. * config/mips/mips.c (mips_output_filename): Don't use ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here. (mips_output_lineno): Delete. (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME. * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE. * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE. * config/mmix/mmix.h: Likewise. * config/mmix/mmix.c (mmix_asm_output_source_line): Delete. * config/mmix/mmix-protos.h: Don't prototype it. * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE; no need to #undef ASM_OUTPUT_SOURCE_LINE. * config/arm/aout.h: Remove RISCiX-specific definition of DBX_OUTPUT_MAIN_SOURCE_FILENAME. * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label. * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END. * doc/tm.texi: Update. From-SVN: r89357
2004-10-21 02:53:47 +02:00
/* Count the number of .file directives, so that .loc is up to date. */
dbxout.c: Include obstack.h. * dbxout.c: Include obstack.h. (ASM_STABS_OP): Take XCOFF_DEBUGGING_INFO into account in default definition. (ASM_STABD_OP, NO_DBX_MAIN_SOURCE_DIRECTORY, DBX_CONTIN_CHAR): Default-define here. (DBX_CONTIN_LENGTH): Move definition with others. (DBX_FINISH_STABS): New target macro. (current_sym_code, current_sym_value, current_sym_addr) (current_sym_nchars, CHARS, dbxout_continue) (print_int_cst_octal, print_octal, print_wide_int) (dbxout_prepare_symbol, dbxout_finish_symbol): Delete. (stabstr_ob, stabstr_last_contin_point): New variables. (NUMBER_FMT_LOOP): New improper macro. (dbxout_int, dbxout_stab_value_zero, dbxout_stab_value_label) (dbxout_stab_value_label_diff, dbxout_stab_value_internal_label) (dbxout_stab_value_internal_label_diff, dbxout_stabd) (dbxout_begin_stabn, dbxout_begin_stabn_sline) (dbxout_begin_simple_stabs, dbxout_begin_simple_stabs_desc) (dbxout_begin_complex_stabs, dbxout_finish_complex_stabs) (stabstr_C, stabstr_S, stabstr_I, stabstr_D, stabstr_U, stabstr_O) (stabstr_continue, DECL_ACCESSIBILITY_CHAR) New functions and/or proper function-like macros. (CONTIN): Use stabstr_continue, unconditionally. (get_lang_number): Define unconditionally, with ATTRIBUTE_UNUSED. (dbxout_init): Initialize stabstr_ob. Check NO_DBX_MAIN_SOURCE_DIRECTORY. Only write out the Ltext label if it was used. Use the new interfaces. (dbxout_source_file): Remove file argument; always write to asm_out_file. Use the new interfaces. (dbxout_type_method_1): Remove second argument which is always DECL_ASSEMBLER_NAME of the first argument. Use the new interfaces. (dbxout_type_methods): Remove write-only variables. Use the new interfaces. (dbxout_parms): Refactor to remove code duplicated in each of several successive if-else-if blocks. Use the new interfaces. (dbxout_function_end, emit_bincl_stab, dbxout_end_source_file) (dbxout_source_line, dbxout_finish, dbxout_type_index) (dbxout_type_fields, dbxout_range_type, dbxout_type, dbxout_type_name) (dbxout_class_name_qualifiers, dbxout_symbol, dbxout_symbol_location) (dbxout_symbol_name, dbxout_reg_parms, dbxout_args) (dbx_output_lbrac, dbx_output_rbrac, dbxout_block): Use the new interfaces. * Makefile.in (dbxout.o): Update dependencies. * defaults.h: Don't define ASM_STABD_OP. * output.h: Prototype new dbxout_* interfaces. * system.h: Poison DBX_OUTPUT_GCC_MARKER and DBX_FINISH_SYMBOL. * varasm.c: Don't define ASM_STABS_OP. (default_stabs_asm_out_constructor, default_stabs_asm_out_destructor): Use the new dbxout.c interfaces. Call sorry if neither DBX_DEBUGGING_INFO nor XCOFF_DEBUGGING_INFO is defined. * xcoffout.h: Don't define ASM_STABS_OP. (DBX_FINISH_SYMBOL): Rewrite and rename DBX_FINISH_STABS. (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY, DBX_OUTPUT_GCC_MARKER): Delete. (NO_DBX_MAIN_SOURCE_DIRECTORY, NO_DBX_GCC_MARKER): Define. (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Change bare block to do { ... } while (0) idiom. * config/alpha/alpha.c (num_source_filenames): Export. * config/alpha/alpha.h (num_source_filenames): Declare. (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. Always use .debugsym. Update commentary. * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Use new interfaces. (SDB_OUTPUT_SOURCE_LINE): Add missing newline. * config/rs6000/linux64.h (DBX_OUTPUT_SOURCE_LINE, DBX_OUTPUT_BRAC): Use new interfaces. * config/rs6000/rs6000.c: If TARGET_MACHO, include gstab.h. (macho_branch_islands): Use new interfaces. * doc/tm.texi: Update. From-SVN: r89623
2004-10-27 03:29:42 +02:00
int num_source_filenames = 0;
dbxout.c (asmfile): Delete. * dbxout.c (asmfile): Delete. All uses changed to asm_out_file. (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE): Default to 0. (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined. When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit an internal label and an N_SLINE .stabn whose value is the difference between that label and the function entry label. (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined, but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a label and an N_SO stab with an empty string referring to it. (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE. (dbxout_type_methods, dbxout_symbol): Remove #if 0 block. (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this macro is never defined. * sdbout.c (sdbout_source_line_counter): Delete. (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition. (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes only two arguments. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE. * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs. * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro definitions (identical to default). * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h: Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not DBX_OUTPUT_MAIN_SOURCE_FILE_END. * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h: Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno. * config/alpha/alpha.c: Move declaration of num_source_filenames up. (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE. (sym_lineno): Delete. (alpha_output_filename): Do not emit N_SOL stabs here. Remove now-unused variable. (alpha_output_lineno): Delete. * config/mips/mips-protos.h: Don't prototype mips_output_lineno. * config/mips/mips.c (mips_output_filename): Don't use ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here. (mips_output_lineno): Delete. (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME. * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE. * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE. * config/mmix/mmix.h: Likewise. * config/mmix/mmix.c (mmix_asm_output_source_line): Delete. * config/mmix/mmix-protos.h: Don't prototype it. * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE; no need to #undef ASM_OUTPUT_SOURCE_LINE. * config/arm/aout.h: Remove RISCiX-specific definition of DBX_OUTPUT_MAIN_SOURCE_FILENAME. * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label. * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END. * doc/tm.texi: Update. From-SVN: r89357
2004-10-21 02:53:47 +02:00
/* Output the textual info surrounding the prologue. */
void
alpha_start_function (FILE *file, const char *fnname,
tree decl ATTRIBUTE_UNUSED)
{
unsigned long imask = 0;
unsigned long fmask = 0;
/* Stack space needed for pushing registers clobbered by us. */
HOST_WIDE_INT sa_size;
/* Complete stack size needed. */
unsigned HOST_WIDE_INT frame_size;
Remove obsolete Tru64 UNIX V5.1B support libstdc++-v3: * configure.host: Remove osf* handling. * config/os/osf: Remove. * doc/xml/manual/using.xml: Remove OSF reference. * testsuite/18_support/pthread_guard.cc: Remove alpha*-*-osf* handling. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/21_strings/basic_string/pthread18185.cc: Likewise. * testsuite/21_strings/basic_string/pthread4.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise. * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise. * testsuite/23_containers/list/pthread1.cc: Likewise. * testsuite/23_containers/list/pthread5.cc: Likewise. * testsuite/23_containers/map/pthread6.cc: Likewise. * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Likewise. * testsuite/27_io/basic_ofstream/pthread2.cc: Likewise. * testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise. * testsuite/30_threads/async/42819.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/any.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/async.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/launch.cc: Likewise. * libstdc++-v3/testsuite/30_threads/async/sync.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/39909.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/share.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/promise/members/swap.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc: Likewise. * libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/this_thread/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/7.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/8.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/9.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc: Likewise. * libstdc++-v3/testsuite/30_threads/thread/swap/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/try_lock/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise. * libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise. * libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc: Likewise. * libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. libobjc: * configure.ac (enable_objc_gc): Remove alpha*-dec-osf* handling. * configure: Regenerate. * thr.c (_XOPEN_SOURCE): Define unconditionally. libjava: * configure.ac (alpha*-dec-osf*): Remove. * configure: Regenerate. * configure.host (alpha*-dec-osf*): Remove. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use IPV6_MULTICAST_IF unconditionally. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption): Likewise. * gnu/java/net/natPlainSocketImplPosix.cc (gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of _Jv_accept. * include/posix-signal.h [__alpha__ && __osf__]: Remove. * include/posix.h (_POSIX_PII_SOCKET): Don't define. (_Jv_accept): Remove. * java/io/File.java (File._access): Rename to access. Change callers. (File._stat): Likewise. * java/io/File.h: Regenerate. * classpath/lib/java/io/File.class: Regenerate. * java/io/natFilePosix.cc (java::io::File::_access): Rename to access. (java::io::File::_stat): Rename to stat. * java/io/natFileWin32.cc: Likewise. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Remove alpha*-dec-osf* handling. * testsuite/libjava.jvmti/jvmti-interp.exp (gcj_jni_compile_c_to_so): Likewise. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. libitm: * configure.tgt (*-*-osf*): Remove. * configure: Regenerate. libgomp: * configure.tgt (alpha*-dec-osf*): Remove. * config/osf/sem.h: Remove. * config/posix/lock.c (_XOPEN_SOURCE): Define unconditionally. libgfortran: * configure.ac: Remove Tru64 reference. * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Remove alpha*-dec-osf* handling. * configure: Regenerate. * intrinsics/c99_functions.c [__osf__]: Remove. libgcc: * config.host: Remove alpha*-dec-osf5.1* handling. * config/alpha/gthr-posix.c: Remove. * config/alpha/libgcc-osf5.ver: Remove. * config/alpha/osf5-unwind.h: Remove. * config/alpha/t-osf-pthread: Remove. * config/alpha/t-slibgcc-osf: Remove. * config/t-crtfm (crtfastmath.o): Remove -frandom-seed. * gthr-posix.h [!_REENTRANT && __osf__] (_REENTRANT): Don't define. [__osf__ && _PTHREAD_USE_MANGLED_NAMES_]: Remove. * mkmap-flat.awk: Remove osf_export handling. gnattools: * configure.ac: Remove alpha*-dec-osf* handling. * configure: Regenerate. gcc/testsuite: * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/cdce3.C: Don't skip on*-dec-osf5*. Adapt line numbers. * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * g++.dg/cpp0x/constexpr-rom.C: Likewise. * g++.dg/eh/spbp.C: Likewise. * g++.dg/ext/label13.C: Likewise. * g++.dg/guality/guality.exp: Likewise. * g++.dg/other/anon5.C: Likewise. * g++.dg/other/pragma-ep-1.C: Remove. * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling. * g++.dg/warn/pr31246.C: Likewise. * g++.dg/warn/weak1.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.ext/attrib5.C: Likewise. * gcc.c-torture/compile/limits-declparen.c: Likewise. * gcc.c-torture/compile/limits-pointer.c: Likewise. * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling. * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling. * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling. * gcc.dg/c99-tgmath-1.c: Likewise. * gcc.dg/c99-tgmath-2.c: Likewise. * gcc.dg/c99-tgmath-3.c: Likewise. * gcc.dg/c99-tgmath-4.c: Likewise. * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf* handling. * gcc.dg/debug/pr49032.c: Likewise. * gcc.dg/guality/guality.exp: Likewise. * gcc.dg/intmax_t-1.c: Likewise. * gcc.dg/pr48616.c: Likewise. * gcc.dg/pragma-ep-1.c: Remove. * gcc.dg/pragma-ep-2.c: Remove. * gcc.dg/pragma-ep-3.c: Remove. * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling. * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling. * gcc.misc-tests/gcov-14.c: Likewise. * gfortran.dg/guality/guality.exp: Likewise. * lib/target-supports.exp (check_weak_available): Likewise. (add_options_for_tls): Likewise. (check_ascii_locale_available): Likewise. * obj-c++.dg/dwarf-2.mm: Likewise. * objc.dg/dwarf-1.m: Likewise. * objc.dg/dwarf-2.m: Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix handling. * c-pragma.c (handle_pragma_extern_prefix): Remove. (init_pragma): Don't register extern_prefix. gcc/po: * EXCLUDES (mips-tdump.c, mips-tfile.c): Remove. gcc: * config.gcc (alpha*-dec-osf5.1*): Remove. * config.host (alpha*-dec-osf*): Remove. * configure.ac (*-*-osf*): Remove. (alpha*-dec-osf*): Remove. * configure: Regenerate. * config/alpha/host-osf.c, config/alpha/osf5.h, config/alpha/osf5.opt, config/alpha/va_list.h, config/alpha/x-osf: Remove. * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Remove. * config/alpha/alpha.c (struct machine_function): Update comment. (alpha_start_function): Remove Tru64 UNIX as handling for max_frame_size. * config/alpha/alpha.md ("exception_receiver"): Remove TARGET_LD_BUGGY_LDGP. ("*exception_receiver_2"): Likewise. * except.c (finish_eh_generation): Remove Tru64 reference. * ginclude/stdarg.h [_HIDDEN_VA_LIST]: Don't undef _VA_LIST. * system.h (TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Poison. * target.def (handle_pragma_extern_prefix): Remove. * Makefile.in (mips-tfile.o-warn): Remove. (ALL_HOST_BACKEND_OBJS): Remove mips-tfile.o, mips-tdump.o. (mips-tfile, mips-tfile.o, mips-tdump, mips-tdump.o): Remove. * mips-tdump.c, mips-tfile.c: Remove. * doc/extend.texi (Symbol-Renaming Pragmas): Remove #pragma extern_prefix. * doc/install.texi (Binaries): Remove Tru64 UNIX reference. (Specific, alpha*-dec-osf5.1): Note removal. * doc/tm.texi.in (Misc, TARGET_HANDLE_PRAGMA_EXTERN_PREFIX): Remove. * doc/tm.texi: Regenerate. * doc/trouble.texi (Cross-Compiler Problems): Remove. gcc/ada: * gcc-interface/Makefile.in (alpha*-dec-osf*): Remove. * a-intnam-tru64.ads, mlib-tgt-specific-tru64.adb, s-mastop-tru64.adb, s-osinte-tru64.adb, s-osinte-tru64.ads, s-taprop-tru64.adb, s-tasinf-tru64.ads, s-taspri-tru64.ads, system-tru64.ads: Remove. * adaint.c (__gnat_number_of_cpus) [__alpha__ && __osf__]: Remove. [IS_CROSS] [!(__alpha__ && __osf__)]: Remove. * env.c [__alpha__ && __osf__]: Remove. * gsocket.h (_OSF_SOURCE): Remove. (HAVE_THREAD_SAFE_GETxxxBYyyy) [__osf__]: Remove. * init.c [__alpha__ && __osf__]: Remove. * link.c [__osf__]: Remove. * s-oscons-tmplt.c [__alpha__ && __osf__]: Remove. [__osf__ && !_SS_MAXSIZE]: Remove. * sysdep.c [__osf__]: Remove. * terminals.c [__alpha__ && __osf__]: Remove. [OSF1]: Remove. * g-traceb.ads: Remove Tru64 reference. * g-trasym.ads: Likewise. * gnat_ugn.texi (Linking a Mixed C++ & Ada Program): Likewise. (Summary of Run-Time Configurations): Likewise. * memtrack.adb: Likewise. fixincludes: * inclhack.def (alpha___extern_prefix): Remove. (alpha___extern_prefix_standards): Remove. (alpha___extern_prefix_sys_stat): Remove. (alpha_bad_lval): Remove. (alpha_pthread): Remove. (alpha_pthread_gcc): Remove. (alpha_pthread_init): Remove. * fixincl.x: Regenerate. * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. [ALPHA_PTHREAD_GCC_CHECK]: Remove. [ALPHA_PTHREAD_INIT_CHECK]: Remove. * tests/base/standards.h: Remove. * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: Remove. * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. [ALPHA_BAD_LVAL_CHECK]: Remove. contrib: * config-list.mk (LIST): Remove alpha-dec-osf5.1. config: * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. toplevel: * MAINTAINERS (OS Port Maintainers): Remove osf. * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. From-SVN: r185240
2012-03-12 16:35:56 +01:00
/* The maximum debuggable frame size. */
unsigned HOST_WIDE_INT max_frame_size = 1UL << 31;
/* Offset from base reg to register save area. */
HOST_WIDE_INT reg_offset;
char *entry_label = (char *) alloca (strlen (fnname) + 6);
char *tramp_label = (char *) alloca (strlen (fnname) + 6);
int i;
#if TARGET_ABI_OPEN_VMS
if (vms_debug_main
&& strncmp (vms_debug_main, fnname, strlen (vms_debug_main)) == 0)
{
targetm.asm_out.globalize_label (asm_out_file, VMS_DEBUG_MAIN_POINTER);
ASM_OUTPUT_DEF (asm_out_file, VMS_DEBUG_MAIN_POINTER, fnname);
switch_to_section (text_section);
vms_debug_main = NULL;
}
#endif
alpha_fnname = fnname;
sa_size = alpha_sa_size ();
Stack usage support Stack usage support * common.opt (-fstack-usage): New option. * doc/invoke.texi (Debugging options): Document it. * builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE and propagate it to allocate_dynamic_stack_space. (expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change. * calls.c (initialize_argument_information): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_call): Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a variable-sized argument onto the stack. Pass TRUE as 4th argument to allocate_dynamic_stack_space. Update current_function_pushed_stack_size. (emit_library_call_value_1): Likewise. * explow.c (allocate_dynamic_stack_space): Add 4th bool parameter CANNOT_ACCUMULATE. If flag_stack_usage, look into the size and attempt to find an upper bound. Remove redundant code for the SETJMP_VIA_SAVE_AREA case. * expr.h (allocate_dynamic_stack_space): Add 4th bool parameter. * function.h (struct stack_usage): New structure. (current_function_static_stack_size): New macro. (current_function_dynamic_stack_size): Likewise. (current_function_pushed_stack_size): Likewise. (current_function_dynamic_alloc_count): Likewise. (current_function_has_unbounded_dynamic_stack_size): Likewise. (current_function_allocates_dynamic_stack_space): Likewise. (struct function): Add new field 'su'. * function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA, add the value of the dynamic offset to the dynamic stack usage. (gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. (prepare_function_start): Allocate cfun->su if flag_stack_usage. (rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage. * gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. * output.h (output_stack_usage): Declare. * toplev.c (stack_usage_file): New file pointer. (output_stack_usage): New function. (open_auxiliary_file): Likewise. (lang_dependent_init): Open file if flag_stack_usage is set. (finalize): Close file if stack_usage_file is not null. * tree.h (ALLOCA_FOR_VAR_P): New macro. * config/alpha/alpha.c (compute_frame_size): New function. (alpha_expand_prologue): Use it. (alpha_start_function): Likewise. (alpha_expand_epilogue): Likewise. Set stack usage info. * config/i386/i386.c (ix86_expand_prologue): Likewise. * config/ia64/ia64.c (ia64_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/pa/pa.c (hppa_expand_prologue): Likewise. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. testsuite/ * lib/gcc-dg.exp (cleanup-stack-usage): New procedure. * lib/scanasm.exp (scan-stack-usage): Likewise. (scan-stack-usage-not): Likewise. * gcc.dg/stack-usage-1.c: New test. * gcc.target/i386/stack-usage-realign.c: Likewise. From-SVN: r163660
2010-08-30 22:04:49 +02:00
frame_size = compute_frame_size (get_frame_size (), sa_size);
if (TARGET_ABI_OPEN_VMS)
reg_offset = 8 + 8 * cfun->machine->uses_condition_handler;
else
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
alpha_sa_mask (&imask, &fmask);
1992-10-26 22:01:33 +01:00
/* Ecoff can handle multiple .file directives, so put out file and lineno.
We have to do that before the .ent directive as we cannot switch
files within procedures with native ecoff because line numbers are
linked to procedure descriptors.
Outputting the lineno helps debugging of one line functions as they
would otherwise get no line number at all. Please note that we would
1995-05-16 14:14:26 +02:00
like to put out last_linenum from final.c, but it is not accessible. */
if (write_symbols == SDB_DEBUG)
{
2001-09-11 10:52:39 +02:00
#ifdef ASM_OUTPUT_SOURCE_FILENAME
ASM_OUTPUT_SOURCE_FILENAME (file,
DECL_SOURCE_FILE (current_function_decl));
2001-09-11 10:52:39 +02:00
#endif
dbxout.c (asmfile): Delete. * dbxout.c (asmfile): Delete. All uses changed to asm_out_file. (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE): Default to 0. (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined. When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit an internal label and an N_SLINE .stabn whose value is the difference between that label and the function entry label. (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined, but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a label and an N_SO stab with an empty string referring to it. (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE. (dbxout_type_methods, dbxout_symbol): Remove #if 0 block. (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this macro is never defined. * sdbout.c (sdbout_source_line_counter): Delete. (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition. (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes only two arguments. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE. * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs. * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro definitions (identical to default). * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h: Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not DBX_OUTPUT_MAIN_SOURCE_FILE_END. * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h: Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno. * config/alpha/alpha.c: Move declaration of num_source_filenames up. (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE. (sym_lineno): Delete. (alpha_output_filename): Do not emit N_SOL stabs here. Remove now-unused variable. (alpha_output_lineno): Delete. * config/mips/mips-protos.h: Don't prototype mips_output_lineno. * config/mips/mips.c (mips_output_filename): Don't use ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here. (mips_output_lineno): Delete. (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME. * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE. * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE. * config/mmix/mmix.h: Likewise. * config/mmix/mmix.c (mmix_asm_output_source_line): Delete. * config/mmix/mmix-protos.h: Don't prototype it. * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE; no need to #undef ASM_OUTPUT_SOURCE_LINE. * config/arm/aout.h: Remove RISCiX-specific definition of DBX_OUTPUT_MAIN_SOURCE_FILENAME. * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label. * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END. * doc/tm.texi: Update. From-SVN: r89357
2004-10-21 02:53:47 +02:00
#ifdef SDB_OUTPUT_SOURCE_LINE
if (debug_info_level != DINFO_LEVEL_TERSE)
dbxout.c (asmfile): Delete. * dbxout.c (asmfile): Delete. All uses changed to asm_out_file. (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE): Default to 0. (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined. When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit an internal label and an N_SLINE .stabn whose value is the difference between that label and the function entry label. (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined, but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a label and an N_SO stab with an empty string referring to it. (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE. (dbxout_type_methods, dbxout_symbol): Remove #if 0 block. (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this macro is never defined. * sdbout.c (sdbout_source_line_counter): Delete. (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition. (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes only two arguments. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE. * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs. * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro definitions (identical to default). * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h: Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not DBX_OUTPUT_MAIN_SOURCE_FILE_END. * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h: Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno. * config/alpha/alpha.c: Move declaration of num_source_filenames up. (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE. (sym_lineno): Delete. (alpha_output_filename): Do not emit N_SOL stabs here. Remove now-unused variable. (alpha_output_lineno): Delete. * config/mips/mips-protos.h: Don't prototype mips_output_lineno. * config/mips/mips.c (mips_output_filename): Don't use ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here. (mips_output_lineno): Delete. (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME. * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE. * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE. * config/mmix/mmix.h: Likewise. * config/mmix/mmix.c (mmix_asm_output_source_line): Delete. * config/mmix/mmix-protos.h: Don't prototype it. * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE; no need to #undef ASM_OUTPUT_SOURCE_LINE. * config/arm/aout.h: Remove RISCiX-specific definition of DBX_OUTPUT_MAIN_SOURCE_FILENAME. * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label. * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END. * doc/tm.texi: Update. From-SVN: r89357
2004-10-21 02:53:47 +02:00
SDB_OUTPUT_SOURCE_LINE (file,
DECL_SOURCE_LINE (current_function_decl));
2001-09-11 10:52:39 +02:00
#endif
}
/* Issue function start and label. */
if (TARGET_ABI_OPEN_VMS || !flag_inhibit_size_directive)
{
fputs ("\t.ent ", file);
assemble_name (file, fnname);
putc ('\n', file);
/* If the function needs GP, we'll write the "..ng" label there.
Otherwise, do it here. */
if (TARGET_ABI_OSF
&& ! alpha_function_needs_gp
&& ! cfun->is_thunk)
{
putc ('$', file);
assemble_name (file, fnname);
fputs ("..ng:\n", file);
}
}
/* Nested functions on VMS that are potentially called via trampoline
get a special transfer entry point that loads the called functions
procedure descriptor and static chain. */
if (TARGET_ABI_OPEN_VMS
&& !TREE_PUBLIC (decl)
&& DECL_CONTEXT (decl)
&& !TYPE_P (DECL_CONTEXT (decl))
&& TREE_CODE (DECL_CONTEXT (decl)) != TRANSLATION_UNIT_DECL)
{
strcpy (tramp_label, fnname);
strcat (tramp_label, "..tr");
ASM_OUTPUT_LABEL (file, tramp_label);
fprintf (file, "\tldq $1,24($27)\n");
fprintf (file, "\tldq $27,16($27)\n");
}
strcpy (entry_label, fnname);
if (TARGET_ABI_OPEN_VMS)
strcat (entry_label, "..en");
2001-09-11 10:52:39 +02:00
ASM_OUTPUT_LABEL (file, entry_label);
inside_function = TRUE;
if (TARGET_ABI_OPEN_VMS)
fprintf (file, "\t.base $%d\n", vms_base_regno);
1992-10-26 22:01:33 +01:00
if (TARGET_ABI_OSF
&& TARGET_IEEE_CONFORMANT
&& !flag_inhibit_size_directive)
{
/* Set flags in procedure descriptor to request IEEE-conformant
math-library routines. The value we set it to is PDSC_EXC_IEEE
(/usr/include/pdsc.h). */
fputs ("\t.eflag 48\n", file);
}
1992-10-26 22:01:33 +01:00
/* Set up offsets to alpha virtual arg/local debugging pointer. */
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
alpha_auto_offset = -frame_size + crtl->args.pretend_args_size;
alpha_arg_offset = -frame_size + 48;
/* Describe our frame. If the frame size is larger than an integer,
print it as zero to avoid an assembler error. We won't be
properly describing such a frame, but that's the best we can do. */
if (TARGET_ABI_OPEN_VMS)
fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26,"
HOST_WIDE_INT_PRINT_DEC "\n",
vms_unwind_regno,
frame_size >= (1UL << 31) ? 0 : frame_size,
reg_offset);
else if (!flag_inhibit_size_directive)
fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26,%d\n",
(frame_pointer_needed
? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
frame_size >= max_frame_size ? 0 : frame_size,
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
crtl->args.pretend_args_size);
/* Describe which registers were spilled. */
if (TARGET_ABI_OPEN_VMS)
{
if (imask)
2001-09-11 10:52:39 +02:00
/* ??? Does VMS care if mask contains ra? The old code didn't
set it, so I don't here. */
fprintf (file, "\t.mask 0x%lx,0\n", imask & ~(1UL << REG_RA));
if (fmask)
fprintf (file, "\t.fmask 0x%lx,0\n", fmask);
if (alpha_procedure_type == PT_REGISTER)
fprintf (file, "\t.fp_save $%d\n", vms_save_fp_regno);
}
else if (!flag_inhibit_size_directive)
{
if (imask)
{
fprintf (file, "\t.mask 0x%lx," HOST_WIDE_INT_PRINT_DEC "\n", imask,
frame_size >= max_frame_size ? 0 : reg_offset - frame_size);
for (i = 0; i < 32; ++i)
if (imask & (1UL << i))
reg_offset += 8;
}
if (fmask)
fprintf (file, "\t.fmask 0x%lx," HOST_WIDE_INT_PRINT_DEC "\n", fmask,
frame_size >= max_frame_size ? 0 : reg_offset - frame_size);
1992-10-26 22:01:33 +01:00
}
#if TARGET_ABI_OPEN_VMS
/* If a user condition handler has been installed at some point, emit
the procedure descriptor bits to point the Condition Handling Facility
at the indirection wrapper, and state the fp offset at which the user
handler may be found. */
if (cfun->machine->uses_condition_handler)
{
fprintf (file, "\t.handler __gcc_shell_handler\n");
fprintf (file, "\t.handler_data %d\n", VMS_COND_HANDLER_FP_OFFSET);
}
#ifdef TARGET_VMS_CRASH_DEBUG
/* Support of minimal traceback info. */
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
switch_to_section (readonly_data_section);
fprintf (file, "\t.align 3\n");
assemble_name (file, fnname); fputs ("..na:\n", file);
fputs ("\t.ascii \"", file);
assemble_name (file, fnname);
fputs ("\\0\"\n", file);
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
switch_to_section (text_section);
#endif
#endif /* TARGET_ABI_OPEN_VMS */
}
1992-10-26 22:01:33 +01:00
/* Emit the .prologue note at the scheduled end of the prologue. */
static void
alpha_output_function_end_prologue (FILE *file)
{
if (TARGET_ABI_OPEN_VMS)
fputs ("\t.prologue\n", file);
else if (!flag_inhibit_size_directive)
fprintf (file, "\t.prologue %d\n",
alpha_function_needs_gp || cfun->is_thunk);
1992-10-26 22:01:33 +01:00
}
/* Write function epilogue. */
void
alpha_expand_epilogue (void)
1992-10-26 22:01:33 +01:00
{
/* Registers to save. */
unsigned long imask = 0;
unsigned long fmask = 0;
/* Stack space needed for pushing registers clobbered by us. */
HOST_WIDE_INT sa_size;
/* Complete stack size needed. */
HOST_WIDE_INT frame_size;
/* Offset from base reg to register save area. */
HOST_WIDE_INT reg_offset;
int fp_is_frame_pointer, fp_offset;
rtx sa_reg, sa_reg_exp = NULL;
rtx sp_adj1, sp_adj2, mem, reg, insn;
rtx eh_ofs;
rtx cfa_restores = NULL_RTX;
1992-10-26 22:01:33 +01:00
int i;
sa_size = alpha_sa_size ();
Stack usage support Stack usage support * common.opt (-fstack-usage): New option. * doc/invoke.texi (Debugging options): Document it. * builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE and propagate it to allocate_dynamic_stack_space. (expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change. * calls.c (initialize_argument_information): Pass TRUE as 4th argument to allocate_dynamic_stack_space. (expand_call): Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a variable-sized argument onto the stack. Pass TRUE as 4th argument to allocate_dynamic_stack_space. Update current_function_pushed_stack_size. (emit_library_call_value_1): Likewise. * explow.c (allocate_dynamic_stack_space): Add 4th bool parameter CANNOT_ACCUMULATE. If flag_stack_usage, look into the size and attempt to find an upper bound. Remove redundant code for the SETJMP_VIA_SAVE_AREA case. * expr.h (allocate_dynamic_stack_space): Add 4th bool parameter. * function.h (struct stack_usage): New structure. (current_function_static_stack_size): New macro. (current_function_dynamic_stack_size): Likewise. (current_function_pushed_stack_size): Likewise. (current_function_dynamic_alloc_count): Likewise. (current_function_has_unbounded_dynamic_stack_size): Likewise. (current_function_allocates_dynamic_stack_space): Likewise. (struct function): Add new field 'su'. * function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA, add the value of the dynamic offset to the dynamic stack usage. (gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. (prepare_function_start): Allocate cfun->su if flag_stack_usage. (rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage. * gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA for variable-sized objects. * output.h (output_stack_usage): Declare. * toplev.c (stack_usage_file): New file pointer. (output_stack_usage): New function. (open_auxiliary_file): Likewise. (lang_dependent_init): Open file if flag_stack_usage is set. (finalize): Close file if stack_usage_file is not null. * tree.h (ALLOCA_FOR_VAR_P): New macro. * config/alpha/alpha.c (compute_frame_size): New function. (alpha_expand_prologue): Use it. (alpha_start_function): Likewise. (alpha_expand_epilogue): Likewise. Set stack usage info. * config/i386/i386.c (ix86_expand_prologue): Likewise. * config/ia64/ia64.c (ia64_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/pa/pa.c (hppa_expand_prologue): Likewise. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. testsuite/ * lib/gcc-dg.exp (cleanup-stack-usage): New procedure. * lib/scanasm.exp (scan-stack-usage): Likewise. (scan-stack-usage-not): Likewise. * gcc.dg/stack-usage-1.c: New test. * gcc.target/i386/stack-usage-realign.c: Likewise. From-SVN: r163660
2010-08-30 22:04:49 +02:00
frame_size = compute_frame_size (get_frame_size (), sa_size);
1992-10-26 22:01:33 +01:00
if (TARGET_ABI_OPEN_VMS)
{
if (alpha_procedure_type == PT_STACK)
reg_offset = 8 + 8 * cfun->machine->uses_condition_handler;
else
reg_offset = 0;
}
else
function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
2008-04-08 10:59:34 +02:00
reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
alpha_sa_mask (&imask, &fmask);
fp_is_frame_pointer
= (TARGET_ABI_OPEN_VMS
? alpha_procedure_type == PT_STACK
: frame_pointer_needed);
fp_offset = 0;
sa_reg = stack_pointer_rtx;
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
if (crtl->calls_eh_return)
eh_ofs = EH_RETURN_STACKADJ_RTX;
else
eh_ofs = NULL_RTX;
if (sa_size)
{
/* If we have a frame pointer, restore SP from it. */
if (TARGET_ABI_OPEN_VMS
? vms_unwind_regno == HARD_FRAME_POINTER_REGNUM
: frame_pointer_needed)
emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
/* Cope with very large offsets to the register save area. */
if (reg_offset + sa_size > 0x8000)
1992-10-26 22:01:33 +01:00
{
int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000;
HOST_WIDE_INT bias;
if (low + sa_size <= 0x8000)
bias = reg_offset - low, reg_offset = low;
else
bias = reg_offset, reg_offset = 0;
sa_reg = gen_rtx_REG (DImode, 22);
sa_reg_exp = plus_constant (stack_pointer_rtx, bias);
emit_move_insn (sa_reg, sa_reg_exp);
1992-10-26 22:01:33 +01:00
}
/* Restore registers in order, excepting a true frame pointer. */
1992-10-26 22:01:33 +01:00
mem = gen_frame_mem (DImode, plus_constant (sa_reg, reg_offset));
reg = gen_rtx_REG (DImode, REG_RA);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
reg_offset += 8;
imask &= ~(1UL << REG_RA);
for (i = 0; i < 31; ++i)
if (imask & (1UL << i))
1992-10-26 22:01:33 +01:00
{
if (i == HARD_FRAME_POINTER_REGNUM && fp_is_frame_pointer)
fp_offset = reg_offset;
else
{
mem = gen_frame_mem (DImode,
plus_constant (sa_reg, reg_offset));
reg = gen_rtx_REG (DImode, i);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg,
cfa_restores);
}
1992-10-26 22:01:33 +01:00
reg_offset += 8;
}
for (i = 0; i < 31; ++i)
if (fmask & (1UL << i))
1992-10-26 22:01:33 +01:00
{
mem = gen_frame_mem (DFmode, plus_constant (sa_reg, reg_offset));
reg = gen_rtx_REG (DFmode, i+32);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
1992-10-26 22:01:33 +01:00
reg_offset += 8;
}
}
1992-10-26 22:01:33 +01:00
if (frame_size || eh_ofs)
{
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
sp_adj1 = stack_pointer_rtx;
if (eh_ofs)
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
{
sp_adj1 = gen_rtx_REG (DImode, 23);
emit_move_insn (sp_adj1,
gen_rtx_PLUS (Pmode, stack_pointer_rtx, eh_ofs));
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
}
/* If the stack size is large, begin computation into a temporary
register so as not to interfere with a potential fp restore,
which must be consecutive with an SP restore. */
if (frame_size < 32768 && !cfun->calls_alloca)
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
sp_adj2 = GEN_INT (frame_size);
else if (frame_size < 0x40007fffL)
{
int low = ((frame_size & 0xffff) ^ 0x8000) - 0x8000;
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
sp_adj2 = plus_constant (sp_adj1, frame_size - low);
if (sa_reg_exp && rtx_equal_p (sa_reg_exp, sp_adj2))
sp_adj1 = sa_reg;
else
{
sp_adj1 = gen_rtx_REG (DImode, 23);
emit_move_insn (sp_adj1, sp_adj2);
}
sp_adj2 = GEN_INT (low);
}
else
{
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
rtx tmp = gen_rtx_REG (DImode, 23);
sp_adj2 = alpha_emit_set_const (tmp, DImode, frame_size, 3, false);
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
if (!sp_adj2)
{
/* We can't drop new things to memory this late, afaik,
so build it up by pieces. */
sp_adj2 = alpha_emit_set_long_const (tmp, frame_size,
-(frame_size < 0));
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (sp_adj2);
}
}
1992-10-26 22:01:33 +01:00
/* From now on, things must be in order. So emit blockages. */
/* Restore the frame pointer. */
if (fp_is_frame_pointer)
{
emit_insn (gen_blockage ());
mem = gen_frame_mem (DImode, plus_constant (sa_reg, fp_offset));
emit_move_insn (hard_frame_pointer_rtx, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE,
hard_frame_pointer_rtx, cfa_restores);
}
else if (TARGET_ABI_OPEN_VMS)
{
emit_insn (gen_blockage ());
emit_move_insn (hard_frame_pointer_rtx,
gen_rtx_REG (DImode, vms_save_fp_regno));
cfa_restores = alloc_reg_note (REG_CFA_RESTORE,
hard_frame_pointer_rtx, cfa_restores);
}
/* Restore the stack pointer. */
emit_insn (gen_blockage ());
2001-09-11 10:52:39 +02:00
if (sp_adj2 == const0_rtx)
insn = emit_move_insn (stack_pointer_rtx, sp_adj1);
2001-09-11 10:52:39 +02:00
else
insn = emit_move_insn (stack_pointer_rtx,
gen_rtx_PLUS (DImode, sp_adj1, sp_adj2));
REG_NOTES (insn) = cfa_restores;
add_reg_note (insn, REG_CFA_DEF_CFA, stack_pointer_rtx);
RTX_FRAME_RELATED_P (insn) = 1;
}
else
{
gcc_assert (cfa_restores == NULL);
if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_REGISTER)
{
emit_insn (gen_blockage ());
insn = emit_move_insn (hard_frame_pointer_rtx,
gen_rtx_REG (DImode, vms_save_fp_regno));
add_reg_note (insn, REG_CFA_RESTORE, hard_frame_pointer_rtx);
RTX_FRAME_RELATED_P (insn) = 1;
}
1992-10-26 22:01:33 +01:00
}
}
/* Output the rest of the textual info surrounding the epilogue. */
void
alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED)
{
rtx insn;
/* We output a nop after noreturn calls at the very end of the function to
ensure that the return address always remains in the caller's code range,
as not doing so might confuse unwinding engines. */
insn = get_last_insn ();
if (!INSN_P (insn))
insn = prev_active_insn (insn);
if (insn && CALL_P (insn))
output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL);
#if TARGET_ABI_OPEN_VMS
/* Write the linkage entries. */
alpha_write_linkage (file, fnname);
#endif
1992-10-26 22:01:33 +01:00
/* End the function. */
if (TARGET_ABI_OPEN_VMS
|| !flag_inhibit_size_directive)
{
fputs ("\t.end ", file);
assemble_name (file, fnname);
putc ('\n', file);
}
inside_function = FALSE;
1992-10-26 22:01:33 +01:00
}
#if TARGET_ABI_OSF
/* Emit a tail call to FUNCTION after adjusting THIS by DELTA.
In order to avoid the hordes of differences between generated code
with and without TARGET_EXPLICIT_RELOCS, and to avoid duplicating
lots of code loading up large constants, generate rtl and emit it
instead of going straight to text.
Not sure why this idea hasn't been explored before... */
static void
alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
HOST_WIDE_INT hi, lo;
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
rtx this_rtx, insn, funexp;
/* We always require a valid GP. */
emit_insn (gen_prologue_ldgp ());
rtl.h (emit_note): Remove FILE parameter. * rtl.h (emit_note): Remove FILE parameter. * emit-rtl.c (emit_line_note): Adjust emit_note call. (emit_note): Remove FILE parameter. Adjust. * builtins.c (expand_builtin_expect): Adjust emit_note call. * c-semantics.c (genrtl_scope_stmt): Likewise. (expand_stmt): Likewise. * cfglayout.c (reemit_insn_block_notes): Likewise. (duplicate_insn_chain): Likewise. * except.c (expand_eh_region_start, expand_eh_region_end, sjlj_emit_function_enter): Likewise. * explow.c (probe_stack_range): Likewise. * expr.c (emit_block_move_via_loop): Likewise. * function.c (init_function_start, expand_function_start, expand_function_end, thread_prologue_and_epilogue_insns): Likewise. * integrate.c (expand_inline_function, copy_insn_list): Likewise. * reg-stack.c (compensate_edge): Likewise. * reload1.c (reload): Likewise. * rtlanal.c (hoist_insn_to_edge): Likewise. * stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop, expand_loop_continue_here, expand_end_loop, expand_continue_loop, expand_exit_loop_top_cond, expand_value_return, expand_start_bindings_and_block, expand_end_bindings, expand_decl_cleanup, expand_start_case): Likewise. * unroll.c (copy_loop_body * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore, rs6000_emit_allocate_stack, rs6000_output_function_prologue, rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * ada/misc.c (record_code_position): Likewise. From-SVN: r68561
2003-06-27 11:49:44 +02:00
emit_note (NOTE_INSN_PROLOGUE_END);
/* Find the "this" pointer. If the function returns a structure,
the structure return pointer is in $16. */
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
this_rtx = gen_rtx_REG (Pmode, 17);
else
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
this_rtx = gen_rtx_REG (Pmode, 16);
/* Add DELTA. When possible we use ldah+lda. Otherwise load the
entire constant for the add. */
lo = ((delta & 0xffff) ^ 0x8000) - 0x8000;
hi = (((delta - lo) & 0xffffffff) ^ 0x80000000) - 0x80000000;
if (hi + lo == delta)
{
if (hi)
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
emit_insn (gen_adddi3 (this_rtx, this_rtx, GEN_INT (hi)));
if (lo)
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
emit_insn (gen_adddi3 (this_rtx, this_rtx, GEN_INT (lo)));
}
else
{
rtx tmp = alpha_emit_set_long_const (gen_rtx_REG (Pmode, 0),
delta, -(delta < 0));
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
emit_insn (gen_adddi3 (this_rtx, this_rtx, tmp));
}
/* Add a delta stored in the vtable at VCALL_OFFSET. */
if (vcall_offset)
{
rtx tmp, tmp2;
tmp = gen_rtx_REG (Pmode, 0);
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
emit_move_insn (tmp, gen_rtx_MEM (Pmode, this_rtx));
lo = ((vcall_offset & 0xffff) ^ 0x8000) - 0x8000;
hi = (((vcall_offset - lo) & 0xffffffff) ^ 0x80000000) - 0x80000000;
if (hi + lo == vcall_offset)
{
if (hi)
emit_insn (gen_adddi3 (tmp, tmp, GEN_INT (hi)));
}
else
{
tmp2 = alpha_emit_set_long_const (gen_rtx_REG (Pmode, 1),
vcall_offset, -(vcall_offset < 0));
emit_insn (gen_adddi3 (tmp, tmp, tmp2));
lo = 0;
}
if (lo)
tmp2 = gen_rtx_PLUS (Pmode, tmp, GEN_INT (lo));
else
tmp2 = tmp;
emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp2));
alpha.c (alpha_preferred_reload_class, [...]): Avoid C++ keywords. * config/alpha/alpha.c (alpha_preferred_reload_class, alpha_secondary_reload, alpha_emit_set_const_1, function_value, alpha_output_mi_thunk_osf): Avoid C++ keywords. * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr-protos.h (preferred_reload_class, test_hard_reg_class, avr_simplify_comparison_p, out_shift_with_cnt, class_max_nregs): Likewise. * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p, output_movqi, output_movhi, output_movsisf, out_shift_with_cnt, preferred_reload_class, test_hard_reg_class): Likewise. * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok, bfin_memory_move_cost, bfin_secondary_reload, bfin_output_mi_thunk): Likewise. * config/crx/crx.c (crx_secondary_reload_class, crx_memory_move_cost): Likewise. * config/frv/frv-protos.h (frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg, frv_secondary_reload_class, frv_class_likely_spilled_p, frv_class_max_nregs): Likewise. * config/h8300/h8300.c (h8300_classify_operand, h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count): Likewise. * config/i386/winnt.c (i386_pe_declare_function_type): Likewise. * config/ia64/ia64.c (ia64_preferred_reload_class, ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise. * config/iq2000/iq2000.c (gen_int_relational): Likewise. * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare): Likewise. * config/m68hc11/m68hc11.c (preferred_reload_class, m68hc11_memory_move_cost): Likewise. * config/mcore/mcore.c (mcore_secondary_reload_class, mcore_reload_class): Likewise. * config/mips/mips.c (mips_hard_regno_mode_ok_p, mips_class_max_nregs, mips_cannot_change_mode_class, mips_preferred_reload_class, mips_secondary_reload_class, mips_output_mi_thunk): Likewise. * config/mmix/mmix.c (mmix_preferred_reload_class, mmix_preferred_output_reload_class, mmix_secondary_reload_class): Likewise. * config/mn10300/mn10300.c (mn10300_secondary_reload_class): Likewise. * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions, pa_can_combine_p, pa_cannot_change_mode_class): Likewise. * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/rs6000/rs6000.c (paired_expand_vector_init, rs6000_secondary_reload_class, rs6000_output_mi_thunk, compare_section_name, rs6000_memory_move_cost): Likewise. * config/s390/s390.c (s390_emit_compare_and_swap, s390_preferred_reload_class, s390_secondary_reload, legitimize_pic_address, legitimize_tls_address, legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic, s390_class_max_nregs): Likewise. * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. * config/s390/s390.md: Likewise. * config/score/score-protos.h (score_secondary_reload_class, score_preferred_reload_class): Likewise. * config/score/score.c (score_preferred_reload_class, score_secondary_reload_class): Likewise. * config/score/score3.c (score3_output_mi_thunk, score3_preferred_reload_class, score3_secondary_reload_class, score3_hard_regno_mode_ok): Likewise. * config/score/score3.h (score3_preferred_reload_class, score3_secondary_reload_class): Likewise. * config/score/score7.c (score7_output_mi_thunk, score7_preferred_reload_class, score7_secondary_reload_class, score7_hard_regno_mode_ok): Likewise. * config/score/score7.h (score7_preferred_reload_class, score7_secondary_reload_class): Likewise. * config/sh/sh.c (prepare_move_operands, output_far_jump, output_branchy_insn, add_constant, gen_block_redirect, sh_insn_length_adjustment, sh_cannot_change_mode_class, sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi, xstormy16_output_cbranch_si, xstormy16_secondary_reload_class, xstormy16_preferred_reload_class): Likewise. * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap, xtensa_expand_atomic, override_options, xtensa_preferred_reload_class, xtensa_secondary_reload_class): Likewise. * reorg.c (try_merge_delay_insns): Likewise. * tree.c (merge_dllimport_decl_attributes): Likewise. * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA. From-SVN: r138813
2008-08-06 18:12:51 +02:00
emit_insn (gen_adddi3 (this_rtx, this_rtx, tmp));
}
/* Generate a tail call to the target function. */
if (! TREE_USED (function))
{
assemble_external (function);
TREE_USED (function) = 1;
}
funexp = XEXP (DECL_RTL (function), 0);
funexp = gen_rtx_MEM (FUNCTION_MODE, funexp);
insn = emit_call_insn (gen_sibcall (funexp, const0_rtx));
SIBLING_CALL_P (insn) = 1;
/* Run just enough of rest_of_compilation to get the insns emitted.
There's not really enough bulk here to make other passes such as
instruction scheduling worth while. Note that use_thunk calls
assemble_start_function and assemble_end_function. */
insn = get_insns ();
insn_locators_alloc ();
shorten_branches (insn);
final_start_function (insn, file, 1);
final (insn, file, 1);
final_end_function ();
}
#endif /* TARGET_ABI_OSF */
/* Debugging support. */
#include "gstab.h"
/* Count the number of sdb related labels are generated (to find block
start and end boundaries). */
int sdb_label_count = 0;
/* Name of the file containing the current function. */
static const char *current_function_file = "";
/* Offsets to alpha virtual arg/local debugging pointers. */
long alpha_arg_offset;
long alpha_auto_offset;
/* Emit a new filename to a stream. */
void
alpha_output_filename (FILE *stream, const char *name)
{
static int first_time = TRUE;
if (first_time)
{
first_time = FALSE;
++num_source_filenames;
current_function_file = name;
fprintf (stream, "\t.file\t%d ", num_source_filenames);
output_quoted_string (stream, name);
fprintf (stream, "\n");
if (!TARGET_GAS && write_symbols == DBX_DEBUG)
fprintf (stream, "\t#@stabs\n");
}
else if (write_symbols == DBX_DEBUG)
dbxout.c (asmfile): Delete. * dbxout.c (asmfile): Delete. All uses changed to asm_out_file. (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE): Default to 0. (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined. When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit an internal label and an N_SLINE .stabn whose value is the difference between that label and the function entry label. (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined, but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a label and an N_SO stab with an empty string referring to it. (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE. (dbxout_type_methods, dbxout_symbol): Remove #if 0 block. (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this macro is never defined. * sdbout.c (sdbout_source_line_counter): Delete. (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition. (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes only two arguments. * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE. * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs. * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro definitions (identical to default). * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h: Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not DBX_OUTPUT_MAIN_SOURCE_FILE_END. * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h: Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE. * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno. * config/alpha/alpha.c: Move declaration of num_source_filenames up. (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE. (sym_lineno): Delete. (alpha_output_filename): Do not emit N_SOL stabs here. Remove now-unused variable. (alpha_output_lineno): Delete. * config/mips/mips-protos.h: Don't prototype mips_output_lineno. * config/mips/mips.c (mips_output_filename): Don't use ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here. (mips_output_lineno): Delete. (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE. * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME. * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE. * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE. * config/mmix/mmix.h: Likewise. * config/mmix/mmix.c (mmix_asm_output_source_line): Delete. * config/mmix/mmix-protos.h: Don't prototype it. * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE; no need to #undef ASM_OUTPUT_SOURCE_LINE. * config/arm/aout.h: Remove RISCiX-specific definition of DBX_OUTPUT_MAIN_SOURCE_FILENAME. * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE. * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label. * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END. * doc/tm.texi: Update. From-SVN: r89357
2004-10-21 02:53:47 +02:00
/* dbxout.c will emit an appropriate .stabs directive. */
return;
else if (name != current_function_file
&& strcmp (name, current_function_file) != 0)
{
if (inside_function && ! TARGET_GAS)
fprintf (stream, "\t#.file\t%d ", num_source_filenames);
else
{
++num_source_filenames;
current_function_file = name;
fprintf (stream, "\t.file\t%d ", num_source_filenames);
}
output_quoted_string (stream, name);
fprintf (stream, "\n");
}
}
/* Structure to show the current status of registers and memory. */
struct shadow_summary
{
struct {
unsigned int i : 31; /* Mask of int regs */
unsigned int fp : 31; /* Mask of fp regs */
unsigned int mem : 1; /* mem == imem | fpmem */
} used, defd;
};
/* Summary the effects of expression X on the machine. Update SUM, a pointer
to the summary structure. SET is nonzero if the insn is setting the
object, otherwise zero. */
static void
summarize_insn (rtx x, struct shadow_summary *sum, int set)
{
rtl.h (rtx_format): Constify a char*. * rtl.h (rtx_format): Constify a char*. * rtl.c (rtx_format): Likewise. (copy_rtx, copy_most_rtx, read_rtx): Likewise. (init_rtl): Use accessor macro, not `rtx_format'. * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a char*. * caller-save.c (mark_referenced_regs): Likewise. * combine.c (subst, make_compound_operation, known_cond, gen_rtx_combine, update_table_tick, get_last_value_validate, use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, refers_to_p, canon_reg, fold_rtx, cse_process_notes, count_reg_usage): Likewise. * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): Likewise. * final.c (leaf_renumber_regs_insn): Likewise. * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, dump_edge_info, count_reg_references): Likewise. * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): Likewise. * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, add_label_notes): Likewise. * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, clear_struct_flag, count_sub_rtxs, count_alternatives, compares_alternatives_p, contained_in_p, walk_attr_value, write_expr_attr_cache): Likewise. * genconfig.c (walk_insn_part): Likewise. * genemit.c (max_operand_1, gen_exp): Likewise. * genextract.c (walk_rtx): Likewise. * genflags.c (num_operands): Likewise. * genoutput.c (scan_operands): Likewise. * genpeep.c (match_rtx): Likewise. * genrecog.c (add_to_sequence): Likewise. * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): Likewise. * integrate.c (save_constants, copy_for_inline, copy_rtx_and_substitute, subst_constants, restore_constants): Likewise. * jump.c (mark_jump_label, invert_exp, redirect_exp, rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. * local-alloc.c (contains_replace_regs, memref_referenced_p): Likewise. * loop.c (record_excess_regs, rtx_equal_for_loop_p, add_label_notes, replace_call_address, count_nonfixed_reads, invariant_p, find_single_use_in_loop, find_mem_givs, find_life_end, maybe_eliminate_biv_1, update_reg_last_use): Likewise. * print-rtl.c (reg_names, print_rtx): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. * reg-stack.c (stack_regs_mentioned_p, record_label_references, record_reg_life_pat, swap_rtx_condition, goto_block_pat, print_blocks): Likewise. * regclass.c (fix_register, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (stable_but_for_p): Likewise. * reload.c (loc_mentioned_in_p, operands_match_p, find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, copy_replacements, refers_to_regno_for_reload_p, refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, reload_when_needed_name, reg_class_names, debug_reload_to_stream): Likewise. * reload1.c (eliminate_regs, scan_paradoxical_subregs, delete_address_reloads_1, count_occurrences, reload_cse_mem_conflict_p, reload_combine_note_use, add_auto_inc_notes): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, reg_mentioned_p, regs_set_between_p, modified_between_p, modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. * sched.c (sched_analyze_2, attach_deaths): Likewise. * stupid.c (stupid_mark_refs): Likewise. * unroll.c (remap_split_bivs): Likewise. * varasm.c (mark_constants): Likewise. * a29k/a29k.c (uses_local_reg_p): Likewise. * alpha/alpha.c (summarize_insn): Likewise. * arm/arm.c (symbol_mentioned_p, label_mentioned_p, eliminate_lr2ip): Likewise. * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, reg_mentioned_in_mem): Likewise. * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, symbolic_reference_mentioned_p): Likewise. * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. * sh/sh.c (regs_used, mark_use): Likewise. * vax/vax.c (vax_rtx_cost): Likewise. From-SVN: r28784
1999-08-21 01:05:25 +02:00
const char *format_ptr;
int i, j;
if (x == 0)
return;
switch (GET_CODE (x))
{
/* ??? Note that this case would be incorrect if the Alpha had a
ZERO_EXTRACT in SET_DEST. */
case SET:
summarize_insn (SET_SRC (x), sum, 0);
summarize_insn (SET_DEST (x), sum, 1);
break;
case CLOBBER:
summarize_insn (XEXP (x, 0), sum, 1);
break;
case USE:
summarize_insn (XEXP (x, 0), sum, 0);
break;
case ASM_OPERANDS:
for (i = ASM_OPERANDS_INPUT_LENGTH (x) - 1; i >= 0; i--)
summarize_insn (ASM_OPERANDS_INPUT (x, i), sum, 0);
break;
case PARALLEL:
for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
summarize_insn (XVECEXP (x, 0, i), sum, 0);
break;
case SUBREG:
summarize_insn (SUBREG_REG (x), sum, 0);
break;
case REG:
{
int regno = REGNO (x);
unsigned long mask = ((unsigned long) 1) << (regno % 32);
if (regno == 31 || regno == 63)
break;
if (set)
{
if (regno < 32)
sum->defd.i |= mask;
else
sum->defd.fp |= mask;
}
else
{
if (regno < 32)
sum->used.i |= mask;
else
sum->used.fp |= mask;
}
}
break;
case MEM:
if (set)
sum->defd.mem = 1;
else
sum->used.mem = 1;
/* Find the regs used in memory address computation: */
summarize_insn (XEXP (x, 0), sum, 0);
break;
case CONST_INT: case CONST_DOUBLE:
case SYMBOL_REF: case LABEL_REF: case CONST:
case SCRATCH: case ASM_INPUT:
break;
/* Handle common unary and binary ops for efficiency. */
case COMPARE: case PLUS: case MINUS: case MULT: case DIV:
case MOD: case UDIV: case UMOD: case AND: case IOR:
case XOR: case ASHIFT: case ROTATE: case ASHIFTRT: case LSHIFTRT:
case ROTATERT: case SMIN: case SMAX: case UMIN: case UMAX:
case NE: case EQ: case GE: case GT: case LE:
case LT: case GEU: case GTU: case LEU: case LTU:
summarize_insn (XEXP (x, 0), sum, 0);
summarize_insn (XEXP (x, 1), sum, 0);
break;
case NEG: case NOT: case SIGN_EXTEND: case ZERO_EXTEND:
case TRUNCATE: case FLOAT_EXTEND: case FLOAT_TRUNCATE: case FLOAT:
case FIX: case UNSIGNED_FLOAT: case UNSIGNED_FIX: case ABS:
case SQRT: case FFS:
summarize_insn (XEXP (x, 0), sum, 0);
break;
default:
format_ptr = GET_RTX_FORMAT (GET_CODE (x));
for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
switch (format_ptr[i])
{
case 'e':
summarize_insn (XEXP (x, i), sum, 0);
break;
case 'E':
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
summarize_insn (XVECEXP (x, i, j), sum, 0);
break;
case 'i':
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
}
}
/* Ensure a sufficient number of `trapb' insns are in the code when
the user requests code with a trap precision of functions or
instructions.
In naive mode, when the user requests a trap-precision of
"instruction", a trapb is needed after every instruction that may
generate a trap. This ensures that the code is resumption safe but
it is also slow.
When optimizations are turned on, we delay issuing a trapb as long
as possible. In this context, a trap shadow is the sequence of
instructions that starts with a (potentially) trap generating
instruction and extends to the next trapb or call_pal instruction
(but GCC never generates call_pal by itself). We can delay (and
therefore sometimes omit) a trapb subject to the following
conditions:
(a) On entry to the trap shadow, if any Alpha register or memory
location contains a value that is used as an operand value by some
instruction in the trap shadow (live on entry), then no instruction
in the trap shadow may modify the register or memory location.
(b) Within the trap shadow, the computation of the base register
for a memory load or store instruction may not involve using the
result of an instruction that might generate an UNPREDICTABLE
result.
(c) Within the trap shadow, no register may be used more than once
as a destination register. (This is to make life easier for the
trap-handler.)
(d) The trap shadow may not include any branch instructions. */
static void
alpha_handle_trap_shadows (void)
{
struct shadow_summary shadow;
int trap_pending, exception_nesting;
rtx i, n;
trap_pending = 0;
exception_nesting = 0;
shadow.used.i = 0;
shadow.used.fp = 0;
shadow.used.mem = 0;
shadow.defd = shadow.used;
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
for (i = get_insns (); i ; i = NEXT_INSN (i))
{
if (NOTE_P (i))
{
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
switch (NOTE_KIND (i))
{
case NOTE_INSN_EH_REGION_BEG:
exception_nesting++;
if (trap_pending)
goto close_shadow;
break;
case NOTE_INSN_EH_REGION_END:
exception_nesting--;
if (trap_pending)
goto close_shadow;
break;
case NOTE_INSN_EPILOGUE_BEG:
if (trap_pending && alpha_tp >= ALPHA_TP_FUNC)
goto close_shadow;
break;
}
}
else if (trap_pending)
{
if (alpha_tp == ALPHA_TP_FUNC)
{
if (JUMP_P (i)
&& GET_CODE (PATTERN (i)) == RETURN)
goto close_shadow;
}
else if (alpha_tp == ALPHA_TP_INSN)
{
if (optimize > 0)
{
struct shadow_summary sum;
sum.used.i = 0;
sum.used.fp = 0;
sum.used.mem = 0;
sum.defd = sum.used;
switch (GET_CODE (i))
{
case INSN:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
/* Annoyingly, get_attr_trap will die on these. */
if (GET_CODE (PATTERN (i)) == USE
|| GET_CODE (PATTERN (i)) == CLOBBER)
break;
summarize_insn (PATTERN (i), &sum, 0);
if ((sum.defd.i & shadow.defd.i)
|| (sum.defd.fp & shadow.defd.fp))
{
/* (c) would be violated */
goto close_shadow;
}
/* Combine shadow with summary of current insn: */
shadow.used.i |= sum.used.i;
shadow.used.fp |= sum.used.fp;
shadow.used.mem |= sum.used.mem;
shadow.defd.i |= sum.defd.i;
shadow.defd.fp |= sum.defd.fp;
shadow.defd.mem |= sum.defd.mem;
if ((sum.defd.i & shadow.used.i)
|| (sum.defd.fp & shadow.used.fp)
|| (sum.defd.mem & shadow.used.mem))
{
/* (a) would be violated (also takes care of (b)) */
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (get_attr_trap (i) != TRAP_YES
|| (!(sum.defd.i & sum.used.i)
&& !(sum.defd.fp & sum.used.fp)));
goto close_shadow;
}
break;
case JUMP_INSN:
case CALL_INSN:
case CODE_LABEL:
goto close_shadow;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
}
else
{
close_shadow:
n = emit_insn_before (gen_trapb (), i);
PUT_MODE (n, TImode);
PUT_MODE (i, TImode);
trap_pending = 0;
shadow.used.i = 0;
shadow.used.fp = 0;
shadow.used.mem = 0;
shadow.defd = shadow.used;
}
}
}
if ((exception_nesting > 0 || alpha_tp >= ALPHA_TP_FUNC)
&& NONJUMP_INSN_P (i)
&& GET_CODE (PATTERN (i)) != USE
&& GET_CODE (PATTERN (i)) != CLOBBER
&& get_attr_trap (i) == TRAP_YES)
{
if (optimize && !trap_pending)
summarize_insn (PATTERN (i), &shadow, 0);
trap_pending = 1;
}
}
}
/* Alpha can only issue instruction groups simultaneously if they are
suitably aligned. This is very processor-specific. */
/* There are a number of entries in alphaev4_insn_pipe and alphaev5_insn_pipe
that are marked "fake". These instructions do not exist on that target,
but it is possible to see these insns with deranged combinations of
command-line options, such as "-mtune=ev4 -mmax". Instead of aborting,
choose a result at random. */
enum alphaev4_pipe {
EV4_STOP = 0,
EV4_IB0 = 1,
EV4_IB1 = 2,
EV4_IBX = 4
};
enum alphaev5_pipe {
EV5_STOP = 0,
EV5_NONE = 1,
EV5_E01 = 2,
EV5_E0 = 4,
EV5_E1 = 8,
EV5_FAM = 16,
EV5_FA = 32,
EV5_FM = 64
};
static enum alphaev4_pipe
alphaev4_insn_pipe (rtx insn)
{
if (recog_memoized (insn) < 0)
return EV4_STOP;
if (get_attr_length (insn) != 4)
return EV4_STOP;
switch (get_attr_type (insn))
{
case TYPE_ILD:
case TYPE_LDSYM:
case TYPE_FLD:
case TYPE_LD_L:
return EV4_IBX;
case TYPE_IADD:
case TYPE_ILOG:
case TYPE_ICMOV:
case TYPE_ICMP:
case TYPE_FST:
case TYPE_SHIFT:
case TYPE_IMUL:
case TYPE_FBR:
case TYPE_MVI: /* fake */
return EV4_IB0;
case TYPE_IST:
case TYPE_MISC:
case TYPE_IBR:
case TYPE_JSR:
case TYPE_CALLPAL:
case TYPE_FCPYS:
case TYPE_FCMOV:
case TYPE_FADD:
case TYPE_FDIV:
case TYPE_FMUL:
case TYPE_ST_C:
case TYPE_MB:
case TYPE_FSQRT: /* fake */
case TYPE_FTOI: /* fake */
case TYPE_ITOF: /* fake */
return EV4_IB1;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
}
static enum alphaev5_pipe
alphaev5_insn_pipe (rtx insn)
{
if (recog_memoized (insn) < 0)
return EV5_STOP;
if (get_attr_length (insn) != 4)
return EV5_STOP;
switch (get_attr_type (insn))
{
case TYPE_ILD:
case TYPE_FLD:
case TYPE_LDSYM:
case TYPE_IADD:
case TYPE_ILOG:
case TYPE_ICMOV:
case TYPE_ICMP:
return EV5_E01;
case TYPE_IST:
case TYPE_FST:
case TYPE_SHIFT:
case TYPE_IMUL:
case TYPE_MISC:
case TYPE_MVI:
case TYPE_LD_L:
case TYPE_ST_C:
case TYPE_MB:
case TYPE_FTOI: /* fake */
case TYPE_ITOF: /* fake */
return EV5_E0;
case TYPE_IBR:
case TYPE_JSR:
case TYPE_CALLPAL:
return EV5_E1;
case TYPE_FCPYS:
return EV5_FAM;
case TYPE_FBR:
case TYPE_FCMOV:
case TYPE_FADD:
case TYPE_FDIV:
case TYPE_FSQRT: /* fake */
return EV5_FA;
case TYPE_FMUL:
return EV5_FM;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
}
/* IN_USE is a mask of the slots currently filled within the insn group.
The mask bits come from alphaev4_pipe above. If EV4_IBX is set, then
the insn in EV4_IB0 can be swapped by the hardware into EV4_IB1.
LEN is, of course, the length of the group in bytes. */
static rtx
alphaev4_next_group (rtx insn, int *pin_use, int *plen)
{
int len, in_use;
len = in_use = 0;
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (! INSN_P (insn)
|| GET_CODE (PATTERN (insn)) == CLOBBER
|| GET_CODE (PATTERN (insn)) == USE)
goto next_and_done;
while (1)
{
enum alphaev4_pipe pipe;
pipe = alphaev4_insn_pipe (insn);
switch (pipe)
{
case EV4_STOP:
/* Force complex instructions to start new groups. */
if (in_use)
goto done;
/* If this is a completely unrecognized insn, it's an asm.
We don't know how long it is, so record length as -1 to
signal a needed realignment. */
if (recog_memoized (insn) < 0)
len = -1;
else
len = get_attr_length (insn);
goto next_and_done;
case EV4_IBX:
if (in_use & EV4_IB0)
{
if (in_use & EV4_IB1)
goto done;
in_use |= EV4_IB1;
}
else
in_use |= EV4_IB0 | EV4_IBX;
break;
case EV4_IB0:
if (in_use & EV4_IB0)
{
if (!(in_use & EV4_IBX) || (in_use & EV4_IB1))
goto done;
in_use |= EV4_IB1;
}
in_use |= EV4_IB0;
break;
case EV4_IB1:
if (in_use & EV4_IB1)
goto done;
in_use |= EV4_IB1;
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
len += 4;
/* Haifa doesn't do well scheduling branches. */
if (JUMP_P (insn))
goto next_and_done;
next:
insn = next_nonnote_insn (insn);
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (!insn || ! INSN_P (insn))
goto done;
/* Let Haifa tell us where it thinks insn group boundaries are. */
if (GET_MODE (insn) == TImode)
goto done;
if (GET_CODE (insn) == CLOBBER || GET_CODE (insn) == USE)
goto next;
}
next_and_done:
insn = next_nonnote_insn (insn);
done:
*plen = len;
*pin_use = in_use;
return insn;
}
/* IN_USE is a mask of the slots currently filled within the insn group.
The mask bits come from alphaev5_pipe above. If EV5_E01 is set, then
the insn in EV5_E0 can be swapped by the hardware into EV5_E1.
LEN is, of course, the length of the group in bytes. */
static rtx
alphaev5_next_group (rtx insn, int *pin_use, int *plen)
{
int len, in_use;
len = in_use = 0;
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (! INSN_P (insn)
|| GET_CODE (PATTERN (insn)) == CLOBBER
|| GET_CODE (PATTERN (insn)) == USE)
goto next_and_done;
while (1)
{
enum alphaev5_pipe pipe;
pipe = alphaev5_insn_pipe (insn);
switch (pipe)
{
case EV5_STOP:
/* Force complex instructions to start new groups. */
if (in_use)
goto done;
/* If this is a completely unrecognized insn, it's an asm.
We don't know how long it is, so record length as -1 to
signal a needed realignment. */
if (recog_memoized (insn) < 0)
len = -1;
else
len = get_attr_length (insn);
goto next_and_done;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
/* ??? Most of the places below, we would like to assert never
happen, as it would indicate an error either in Haifa, or
in the scheduling description. Unfortunately, Haifa never
schedules the last instruction of the BB, so we don't have
an accurate TI bit to go off. */
case EV5_E01:
if (in_use & EV5_E0)
{
if (in_use & EV5_E1)
goto done;
in_use |= EV5_E1;
}
else
in_use |= EV5_E0 | EV5_E01;
break;
case EV5_E0:
if (in_use & EV5_E0)
{
if (!(in_use & EV5_E01) || (in_use & EV5_E1))
goto done;
in_use |= EV5_E1;
}
in_use |= EV5_E0;
break;
case EV5_E1:
if (in_use & EV5_E1)
goto done;
in_use |= EV5_E1;
break;
case EV5_FAM:
if (in_use & EV5_FA)
{
if (in_use & EV5_FM)
goto done;
in_use |= EV5_FM;
}
else
in_use |= EV5_FA | EV5_FAM;
break;
case EV5_FA:
if (in_use & EV5_FA)
goto done;
in_use |= EV5_FA;
break;
case EV5_FM:
if (in_use & EV5_FM)
goto done;
in_use |= EV5_FM;
break;
case EV5_NONE:
break;
default:
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_unreachable ();
}
len += 4;
/* Haifa doesn't do well scheduling branches. */
/* ??? If this is predicted not-taken, slotting continues, except
that no more IBR, FBR, or JSR insns may be slotted. */
if (JUMP_P (insn))
goto next_and_done;
next:
insn = next_nonnote_insn (insn);
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (!insn || ! INSN_P (insn))
goto done;
/* Let Haifa tell us where it thinks insn group boundaries are. */
if (GET_MODE (insn) == TImode)
goto done;
if (GET_CODE (insn) == CLOBBER || GET_CODE (insn) == USE)
goto next;
}
next_and_done:
insn = next_nonnote_insn (insn);
done:
*plen = len;
*pin_use = in_use;
return insn;
}
static rtx
alphaev4_next_nop (int *pin_use)
{
int in_use = *pin_use;
rtx nop;
if (!(in_use & EV4_IB0))
{
in_use |= EV4_IB0;
nop = gen_nop ();
}
else if ((in_use & (EV4_IBX|EV4_IB1)) == EV4_IBX)
{
in_use |= EV4_IB1;
nop = gen_nop ();
}
else if (TARGET_FP && !(in_use & EV4_IB1))
{
in_use |= EV4_IB1;
nop = gen_fnop ();
}
else
nop = gen_unop ();
*pin_use = in_use;
return nop;
}
static rtx
alphaev5_next_nop (int *pin_use)
{
int in_use = *pin_use;
rtx nop;
if (!(in_use & EV5_E1))
{
in_use |= EV5_E1;
nop = gen_nop ();
}
else if (TARGET_FP && !(in_use & EV5_FA))
{
in_use |= EV5_FA;
nop = gen_fnop ();
}
else if (TARGET_FP && !(in_use & EV5_FM))
{
in_use |= EV5_FM;
nop = gen_fnop ();
}
else
nop = gen_unop ();
*pin_use = in_use;
return nop;
}
/* The instruction group alignment main loop. */
static void
alpha_align_insns (unsigned int max_align,
rtx (*next_group) (rtx, int *, int *),
rtx (*next_nop) (int *))
{
/* ALIGN is the known alignment for the insn group. */
unsigned int align;
/* OFS is the offset of the current insn in the insn group. */
int ofs;
int prev_in_use, in_use, len, ldgp;
rtx i, next;
/* Let shorten branches care for assigning alignments to code labels. */
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
shorten_branches (get_insns ());
if (align_functions < 4)
align = 4;
else if ((unsigned int) align_functions < max_align)
align = align_functions;
else
align = max_align;
ofs = prev_in_use = 0;
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
i = get_insns ();
if (NOTE_P (i))
i = next_nonnote_insn (i);
ldgp = alpha_function_needs_gp ? 8 : 0;
while (i)
{
next = (*next_group) (i, &in_use, &len);
/* When we see a label, resync alignment etc. */
if (LABEL_P (i))
{
unsigned int new_align = 1 << label_to_alignment (i);
if (new_align >= align)
{
align = new_align < max_align ? new_align : max_align;
ofs = 0;
}
else if (ofs & (new_align-1))
ofs = (ofs | (new_align-1)) + 1;
alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. * config/alpha/alpha.c (tls_symbolic_operand_1): Use gcc_assert and gcc_unreachable as appropriate. (get_aligned_mem, get_unaligned_address, alpha_emit_set_long_const, alpha_emit_conditional_branch, alpha_emit_setcc, alpha_emit_conditional_move, alpha_lookup_xfloating_lib_func, alpha_compute_xfloating_mode_arg, alpha_emit_xfloating_libcall, alpha_split_tfmode_pair, alpha_expand_unaligned_load, alpha_expand_block_move, alpha_expand_zap_mask, get_trap_mode_suffix, get_round_mode_suffix, get_some_local_dynamic_name, print_operand_address, function_arg, alpha_return_in_memory, function_value, alpha_expand_builtin, alpha_initial_elimination_offset, alpha_expand_epilogue, summarize_insn, alpha_handle_trap_shadows, alphaev5_insn_pipe, alphaev5_next_group, alpha_align_insns, unicosmk_initial_elimination_offset, unicosmk_unique_section, unicosmk_ssib_name): Likewise. * config/alpha/alpha.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. * config/alpha/unicosmk.h (TRAMPOLINE_TEMPLATE, ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_DIFF_VEC): Likewise. * config/alpha/vms.h (INITIAL_ELIMINATION_OFFSET, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. * config/alpha/alpha.md (*divmodsi_internal_er, *divmoddi_internal_er, ashldi3, *insxl, sibcall, call_osf, call_nt, call_umk, call_vms, call_value, sibcall_value, call_value_osf, call_value_nt, call_value_vms, call_value_umk, *call_vms_1, *movmemdi_1, *clrmemdi_1, *call_value_vms_1): Likewise. * config/alpha/predicates.md (input_operand): Likewise. Co-Authored-By: Falk Hueffner <falk@debian.org> From-SVN: r99384
2005-05-08 11:48:22 +02:00
gcc_assert (!len);
}
/* Handle complex instructions special. */
else if (in_use == 0)
{
/* Asms will have length < 0. This is a signal that we have
lost alignment knowledge. Assume, however, that the asm
will not mis-align instructions. */
if (len < 0)
{
ofs = 0;
align = 4;
len = 0;
}
}
/* If the known alignment is smaller than the recognized insn group,
realign the output. */
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
else if ((int) align < len)
{
unsigned int new_log_align = len > 8 ? 4 : 3;
rtx prev, where;
where = prev = prev_nonnote_insn (i);
if (!where || !LABEL_P (where))
where = i;
/* Can't realign between a call and its gp reload. */
if (! (TARGET_EXPLICIT_RELOCS
&& prev && CALL_P (prev)))
{
emit_insn_before (gen_realign (GEN_INT (new_log_align)), where);
align = 1 << new_log_align;
ofs = 0;
}
}
/* We may not insert padding inside the initial ldgp sequence. */
else if (ldgp > 0)
ldgp -= len;
/* If the group won't fit in the same INT16 as the previous,
we need to add padding to keep the group together. Rather
than simply leaving the insn filling to the assembler, we
can make use of the knowledge of what sorts of instructions
were issued in the previous group to make sure that all of
the added nops are really free. */
alpha.c (alpha_next_sequence_number): New. * config/alpha/alpha.c (alpha_next_sequence_number): New. (alpha_this_literal_sequence_number): New. (alpha_this_gpdisp_sequence_number): New. (some_operand, input_operand): Add HIGH. (local_symbolic_operand): New. (alpha_encode_section_info): New. (alpha_legitimate_address_p): Allow LO_SUM. (alpha_legitimize_address): Generate HIGH+LO_SUM. (alpha_expand_mov): Likewise. (secondary_reload_class): Check memory_operand not general_operand for FP_REGS test. (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. (alpha_expand_unaligned_store): Likewise. (alpha_expand_unaligned_load_words): Likewise. (alpha_expand_unaligned_store_words): Likewise. (alpha_expand_block_clear): Likewise. (print_operand): Handle %#, %*, %H. (print_operand_address): Handle LO_SUM. (find_lo_sum): New. (alpha_does_function_need_gp): Use it. (alpha_expand_block_move): Fix signed compare warnings. (alpha_sa_mask, alpha_align_insns): Likewise. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. (MASK_EXPLICIT_RELOCS): New. (TARGET_SWITCHES): Add -mexplicit-relocs. (EXTRA_CONSTRAINT): Add 'T'. (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. (ENCODE_SECTION_INFO): Out line. (REDO_SECTION_INFO_P): New. (STRIP_NAME_ENCODING): New. (ASM_OUTPUT_LABELREF): New. (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. (PREDICATE_CODES): Update. * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, builtin_setjmp_receiver_er, exception_receiver_1_er, call_value_osf_1_er): New patterns. (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. (movqi, movhi, movsi): Add explicit $31 base register to lda. * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. (FINAL_PRESCAN_INSN): New. From-SVN: r45493
2001-09-09 10:42:40 +02:00
else if (ofs + len > (int) align)
{
int nop_count = (align - ofs) / 4;
rtx where;
/* Insert nops before labels, branches, and calls to truly merge
the execution of the nops with the previous instruction group. */
where = prev_nonnote_insn (i);
if (where)
{
if (LABEL_P (where))
{
rtx where2 = prev_nonnote_insn (where);
if (where2 && JUMP_P (where2))
where = where2;
}
else if (NONJUMP_INSN_P (where))
where = i;
}
else
where = i;
do
emit_insn_before ((*next_nop)(&prev_in_use), where);
while (--nop_count);
ofs = 0;
}
ofs = (ofs + len) & (align - 1);
prev_in_use = in_use;
i = next;
}
}
/* Insert an unop between a noreturn function call and GP load. */
static void
alpha_pad_noreturn (void)
{
rtx insn, next;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
if (! (CALL_P (insn)
&& find_reg_note (insn, REG_NORETURN, NULL_RTX)))
continue;
/* Make sure we do not split a call and its corresponding
CALL_ARG_LOCATION note. */
if (CALL_P (insn))
{
next = NEXT_INSN (insn);
if (next && NOTE_P (next)
&& NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
insn = next;
}
next = next_active_insn (insn);
if (next)
{
rtx pat = PATTERN (next);
if (GET_CODE (pat) == SET
&& GET_CODE (SET_SRC (pat)) == UNSPEC_VOLATILE
&& XINT (SET_SRC (pat), 1) == UNSPECV_LDGP1)
emit_insn_after (gen_unop (), insn);
}
}
}
/* Machine dependent reorg pass. */
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
static void
alpha_reorg (void)
{
/* Workaround for a linker error that triggers when an
exception handler immediatelly follows a noreturn function.
The instruction stream from an object file:
54: 00 40 5b 6b jsr ra,(t12),58 <__func+0x58>
58: 00 00 ba 27 ldah gp,0(ra)
5c: 00 00 bd 23 lda gp,0(gp)
60: 00 00 7d a7 ldq t12,0(gp)
64: 00 40 5b 6b jsr ra,(t12),68 <__func+0x68>
was converted in the final link pass to:
fdb24: a0 03 40 d3 bsr ra,fe9a8 <_called_func+0x8>
fdb28: 00 00 fe 2f unop
fdb2c: 00 00 fe 2f unop
fdb30: 30 82 7d a7 ldq t12,-32208(gp)
fdb34: 00 40 5b 6b jsr ra,(t12),fdb38 <__func+0x68>
GP load instructions were wrongly cleared by the linker relaxation
pass. This workaround prevents removal of GP loads by inserting
an unop instruction between a noreturn function call and
exception handler prologue. */
if (current_function_has_exception_handlers ())
alpha_pad_noreturn ();
if (alpha_tp != ALPHA_TP_PROG || flag_exceptions)
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
alpha_handle_trap_shadows ();
/* Due to the number of extra trapb insns, don't bother fixing up
alignment when trap precision is instruction. Moreover, we can
only do our job when sched2 is run. */
if (optimize && !optimize_size
&& alpha_tp != ALPHA_TP_INSN
&& flag_schedule_insns_after_reload)
{
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
if (alpha_tune == PROCESSOR_EV4)
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
alpha_align_insns (8, alphaev4_next_group, alphaev4_next_nop);
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
else if (alpha_tune == PROCESSOR_EV5)
target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. (TARGET_INITIALIZER): Include it. * target.h (struct gcc_target): Add machine_dependent_reorg field. * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (alpha_handle_trap_shadows): Remove "first insn" parameter. (alpha_align_insns): Likewise. (alpha_reorg): Likewise. Make static. Update calls to above functions. * config/arm/arm-protos.h (arm_reorg): Remove declaration. * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (arm_reorg): Remove parameter. Make static. * config/avr/avr-protos.h (machine_dependent_reorg): Remove. * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (avr_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (c4x_reorg): Renamed from c4x_process_after_reload. Make static. Remove parameter. * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. * config/frv/frv.c: Remove orphaned comment. * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. Remove parameter. * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (emit_insn_group_barriers): Remove "first insn" parameter. (emit_all_insn_group_barriers): Likewise. (ia64_reorg): Likewise. Make static. Update calls to above functions. (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (m68hc11_reorg): Make static. Remove parameter. * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (conditionalize_optimization): Remove parameter. (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. Make static. Update call to conditionalize_optimization. * config/mips/mips-protos.h (machine_dependent_reorg): Remove. * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. Make static. * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. Remove parameter. * config/pa/pa-protos.h (pa_reorg): Remove declaration. * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (pa_combine_instructions): Remove "first insn" parameter. (remove_useless_addtr_insns): Likewise. (pa_reorg): Likewise. Make static. Update calls to above functions. * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. Remove parameter. * config/sh/sh-protos.h (machine_dependent_reorg): Remove. * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (sh_reorg): Renamed from machine_dependent_reorg. Make static. Remove parameter. (sh_output_mi_thunk): Call sh_reorg directly. * config/sh/sh.md: Update comment. * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove commented-out definition. * config/v850/v850-protos.h (v850_reorg): Remove declaration. * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (v850_reorg): Make static. Remove parameter. * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. (xtensa_reorg): Make static. Remove parameter. * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. (TARGET_MACHINE_DEPENDENT_REORG): Document. From-SVN: r66800
2003-05-14 09:29:54 +02:00
alpha_align_insns (16, alphaev5_next_group, alphaev5_next_nop);
}
}
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
#ifdef HAVE_STAMP_H
#include <stamp.h>
#endif
static void
alpha_file_start (void)
{
#ifdef OBJECT_FORMAT_ELF
/* If emitting dwarf2 debug information, we cannot generate a .file
directive to start the file, as it will conflict with dwarf2out
file numbers. So it's only useful when emitting mdebug output. */
re PR other/44034 (target hooks are hard to maintain) gcc: PR other/44034 * target.def, doc/tm.texi.in, genhooks.c: New files. * target.h: Instead of defining individual hook members, define DEFHOOKPOD / DEFHOOK / DEFHOOK_UNDOC / HOOKSTRUCT and include target.def. * target-def.h: Instead of defining individual hook initializers, include target-hooks-def.h. * df-scan.c, haifa-sched.c, sel-sched.c: Rename targetm members: targetm.live_on_entry -> targetm.extra_live_on_entry targetm.sched.md_finish ->targetm.sched.finish targetm.sched.md_init -> targetm.sched.init targetm.sched.md_init_global -> targetm.sched.init_global targetm.asm_out.unwind_label -> targetm.asm_out.emit_unwind_label targetm.asm_out.except_table_label -> targetm.asm_out.emit_except_table_label targetm.asm_out.visibility -> targetm.asm_out.assemble_visibility targetm.target_help -> targetm.help targetm.vectorize.builtin_support_vector_misalignment -> targetm.vectorize.support_vector_misalignment targetm.file_start_app_off -> targetm.asm_file_start_app_off targetm.file_start_file_directive -> targetm.asm_file_start_file_directive * dwarf2out.c, opts.c, tree-vect-data-refs.c, except.c: Likewise. * varasm.c, config/alpha/alpha.c, config/cris/cris.c: Likewise. * gcc/config/spu/spu.c, config/ia64/ia64.c: Rename target macros: TARGET_VECTOR_ALIGNMENT_REACHABLE -> TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE TARGET_SUPPORT_VECTOR_MISALIGNMENT -> TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT TARGET_UNWIND_EMIT -> TARGET_ASM_UNWIND_EMIT * config/rs6000/rs6000.c, config/arm/arm.c: Likewise. * Makefile.in (TARGET_H): Depend on target.def. (TARGET_DEF_H): Depend on target-hooks-def.h. (target-hooks-def.h, tm.texi, s-target-hooks-def-h): New rules. (s-tm-texi, build/genhooks.o, build/genhooks): Likewise. * doc/tm.texi: Regenerate. gcc/c-family: * c-common.c: Rename targetm member: targetm.enum_va_list -> targetm.enum_va_list_p gcc/po: * EXCLUDES: Add genhooks.c. Index: gcc/doc/tm.texi From-SVN: r161547
2010-06-29 20:22:00 +02:00
targetm.asm_file_start_file_directive = (write_symbols == DBX_DEBUG);
#endif
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
default_file_start ();
#ifdef MS_STAMP
fprintf (asm_out_file, "\t.verstamp %d %d\n", MS_STAMP, LS_STAMP);
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
#endif
fputs ("\t.set noreorder\n", asm_out_file);
fputs ("\t.set volatile\n", asm_out_file);
if (TARGET_ABI_OSF)
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
fputs ("\t.set noat\n", asm_out_file);
if (TARGET_EXPLICIT_RELOCS)
fputs ("\t.set nomacro\n", asm_out_file);
if (TARGET_SUPPORT_ARCH | TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX)
alpha.opt: New file. * config/alpha/alpha.opt: New file. * config/alpha/alpha.c (alpha_tune): New. Rename all existing uses of alpha_cpu. (alpha_cpu_string, alpha_tune_string, alpha_tp_string, alpha_fprm_string, alpha_fptm_string): Make static. (alpha_tls_size_string): Remove. (alpha_handle_option): New. (override_options): Update for alpha_cpu/alpha_tune split. (alpha_file_start): Likewise. (TARGET_DEFAULT_TARGET_FLAGS): New. (TARGET_HANDLE_OPTION): New. * config/alpha/alpha.h (alpha_tune): Declare. (MASK_FP, MASK_FPREGS, TARGET_FPREGS, MASK_GAS, TARGET_GAS, MASK_IEEE_CONFORMANT, TARGET_IEEE_CONFORMANT, MASK_IEEE, TARGET_IEEE, MASK_IEEE_WITH_INEXACT, TARGET_IEEE_WITH_INEXACT, MASK_BUILD_CONSTANTS, TARGET_BUILD_CONSTANTS, MASK_FLOAT_VAX, TARGET_FLOAT_VAX, MASK_BWX, TARGET_BWX, MASK_MAX, TARGET_MAX, MASK_FIX, TARGET_FIX, MASK_CIX, TARGET_CIX, MASK_EXPLICIT_RELOCS, TARGET_EXPLICIT_RELOCS, MASK_SMALL_DATA, TARGET_SMALL_DATA, MASK_TLS_KERNEL, TARGET_TLS_KERNEL, MASK_SMALL_TEXT, TARGET_SMALL_TEXT, MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, MASK_CPU_EV5, TARGET_CPU_EV5, MASK_CPU_EV6, TARGET_CPU_EV6, MASK_SUPPORT_ARCH): Remove. (TARGET_SWITCHES, TARGET_OPTIONS): Remove. (TARGET_DEFAULT): Remove MASK_FP. (TARGET_FP): Redefined based on TARGET_SOFT_FP. (TARGET_SUPPORT_ARCH): Default on if HAVE_AS_EXPLICIT_RELOCS. (alpha_cpu_string, alpha_tune_string, alpha_fprm_string, alpha_fptm_string, alpha_tp_string, alpha_mlat_string, alpha_tls_size_string): Remove. * config/alpha/alpha.md (prefetch): Use alpha_cpu. (attribute tune): Rename from attribute cpu. * config/alpha/ev4.md: Update to match. * config/alpha/ev5.md, config/alpha/ev6.md: Likewise. * config/alpha/freebsd.h (TARGET_DEFAULT): Remove MASK_FP. * config/alpha/linux.h (TARGET_DEFAULT): Likewise. * config/alpha/netbsd.h (TARGET_DEFAULT): Likewise. * config/alpha/osf5.h (TARGET_DEFAULT): Likewise. * config/alpha/vms.h (TARGET_DEFAULT): Likewise. From-SVN: r96602
2005-03-17 11:43:19 +01:00
{
const char *arch;
if (alpha_cpu == PROCESSOR_EV6 || TARGET_FIX || TARGET_CIX)
arch = "ev6";
else if (TARGET_MAX)
arch = "pca56";
else if (TARGET_BWX)
arch = "ev56";
else if (alpha_cpu == PROCESSOR_EV5)
arch = "ev5";
else
arch = "ev4";
fprintf (asm_out_file, "\t.arch %s\n", arch);
}
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
}
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
#ifdef OBJECT_FORMAT_ELF
re PR target/26090 (IA-64 creates DT_TEXTREL binaries) PR target/26090 * target.h (targetm.asm.out.reloc_rw_mask): New. * target-def.h (TARGET_ASM_RELOC_RW_MASK): New. (TARGET_ASM_OUT): Use it. * targhooks.c, targhooks.h (default_reloc_rw_mask): New. * varasm.c (categorize_decl_for_section): Remove shlib argument; use the new reloc_rw_mask target hook instead. (default_section_type_flags_1): Merge into... (default_section_type_flags): ... here. (decl_readonly_section_1): Merge into... (decl_readonly_section): ... here. (default_elf_select_section_1): Merge into... (default_elf_select_section): ... here. (default_unique_section_1): Merge into... (default_unique_section): ... here. (compute_reloc_for_rtx_1, compute_reloc_for_rtx): New. (default_select_rtx_section): Use it. (default_elf_select_rtx_section): Likewise. * output.h: Update to match. * doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New. * config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New. (TARGET_ASM_RELOC_RW_MASK): New. * config/i386/i386.c (x86_64_elf_select_section): Adjust call to categorize_decl_for_section. (x86_64_elf_unique_section): Likewise. * config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove. (TARGET_ASM_RELOC_RW_MASK): New. * config/ia64/ia64.c (ia64_rwreloc_select_section, ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove. (ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New. (TARGET_RWRELOC): Remove. (ia64_section_type_flags): Adjust call to default_section_type_flags. * config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove. (rs6000_elf_select_section, rs6000_elf_unique_section): Remove. (rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New. (rs6000_xcoff_select_section): Use decl_readonly_section. (rs6000_xcoff_section_type_flags): Use default_section_type_flags. * config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove. (TARGET_SECTION_TYPE_FLAGS): Remove. * config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New. From-SVN: r122781
2007-03-10 01:53:09 +01:00
/* Since we don't have a .dynbss section, we should not allow global
relocations in the .rodata section. */
static int
alpha_elf_reloc_rw_mask (void)
{
return flag_pic ? 3 : 2;
}
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
/* Return a section for X. The only special thing we do here is to
honor small data. */
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
static section *
alpha_elf_select_rtx_section (enum machine_mode mode, rtx x,
unsigned HOST_WIDE_INT align)
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
{
if (TARGET_SMALL_DATA && GET_MODE_SIZE (mode) <= g_switch_value)
/* ??? Consider using mergeable sdata sections. */
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
return sdata_section;
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
else
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
return default_elf_select_rtx_section (mode, x, align);
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
}
static unsigned int
alpha_elf_section_type_flags (tree decl, const char *name, int reloc)
{
unsigned int flags = 0;
if (strcmp (name, ".sdata") == 0
|| strncmp (name, ".sdata.", 7) == 0
|| strncmp (name, ".gnu.linkonce.s.", 16) == 0
|| strcmp (name, ".sbss") == 0
|| strncmp (name, ".sbss.", 6) == 0
|| strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
flags = SECTION_SMALL;
flags |= default_section_type_flags (decl, name, reloc);
return flags;
}
system.h (SELECT_RTX_SECTION): Poison. * system.h (SELECT_RTX_SECTION): Poison. * target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New. * target.h (select_rtx_section): New. * varasm.c (output_constant_pool): Use it. (default_select_rtx_section, default_elf_select_rtx_section): New. * output.h: Declare them. * config/darwin.h (SELECT_RTX_SECTION): Move ... * config/darwin.c (machopic_select_rtx_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (SELECT_RTX_SECTION): Move ... * config/nextstep.c (machopic_select_rtx_section): ... here. (nextstep_select_section): Rename variable to avoid macro clash. * config/nextstep-protos.h: Update. * config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h, config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h, config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h, config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h, config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h, config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h, config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h, config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h (SELECT_RTX_SECTION): Remove. * config/darwin.h, config/elfos.h, config/nextstep.h, config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c, config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h, config/sparc/lynx.h, config/xtensa/xtensa.c (TARGET_ASM_SELECT_RTX_SECTION): New. * config/alpha/elf.h (SELECT_RTX_SECTION): Move ... * config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here. * config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ... * config/ia64/ia64.c (ia64_select_rtx_section): ... here. (ia64_aix_select_rtx_section): New. * config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before redefining. * config/mips/mips.c (mips_select_rtx_section): Make static. Support ELF SHF_MERGE features. * config/mips/mips-protos.h: Update. * config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ... * config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here. (rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section; make static, fall back to default_elf_select_rtx_section. * config/rs6000/rs6000-protos.h: Update. * config/sparc/sparc.h (SELECT_RTX_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here. * config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2. * config/romp/romp.c (romp_select_rtx_section): New. * config/s390/s390.c (s390_select_rtx_section): New. * config/xtensa/xtensa.c: Include output.h. Shuffle local function declarations before target macro definition. (xtensa_emit_call): Use static buffer. (xtensa_select_rtx_section): New. * config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove. (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove. (ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section. * doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from SELECT_RTX_SECTION docs. From-SVN: r53600
2002-05-19 01:47:22 +02:00
#endif /* OBJECT_FORMAT_ELF */
/* Structure to collect function names for final output in link section. */
/* Note that items marked with GTY can't be ifdef'ed out. */
enum reloc_kind
{
KIND_LINKAGE,
KIND_CODEADDR
};
hashtab.h: Update GTY annotations to new syntax 2009-04-21 Taras Glek <tglek@mozilla.com> * include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise From-SVN: r146607
2009-04-22 20:29:36 +02:00
struct GTY(()) alpha_links
{
rtx func;
rtx linkage;
enum reloc_kind rkind;
};
#if TARGET_ABI_OPEN_VMS
/* Return the VMS argument type corresponding to MODE. */
enum avms_arg_type
alpha_arg_type (enum machine_mode mode)
{
switch (mode)
{
case SFmode:
return TARGET_FLOAT_VAX ? FF : FS;
case DFmode:
return TARGET_FLOAT_VAX ? FD : FT;
default:
return I64;
}
}
/* Return an rtx for an integer representing the VMS Argument Information
register value. */
rtx
alpha_arg_info_reg_val (CUMULATIVE_ARGS cum)
{
unsigned HOST_WIDE_INT regval = cum.num_args;
int i;
for (i = 0; i < 6; i++)
regval |= ((int) cum.atypes[i]) << (i * 3 + 8);
return GEN_INT (regval);
}
/* Return a SYMBOL_REF representing the reference to the .linkage entry
of function FUNC built for calls made from CFUNDECL. LFLAG is 1 if
this is the reference to the linkage pointer value, 0 if this is the
reference to the function entry value. RFLAG is 1 if this a reduced
reference (code address only), 0 if this is a full reference. */
rtx
alpha_use_linkage (rtx func, bool lflag, bool rflag)
{
struct alpha_links *al = NULL;
const char *name = XSTR (func, 0);
if (cfun->machine->links)
{
splay_tree_node lnode;
/* Is this name already defined? */
lnode = splay_tree_lookup (cfun->machine->links, (splay_tree_key) name);
if (lnode)
al = (struct alpha_links *) lnode->value;
}
else
cfun->machine->links = splay_tree_new_ggc
((splay_tree_compare_fn) strcmp,
ggc_alloc_splay_tree_str_alpha_links_splay_tree_s,
ggc_alloc_splay_tree_str_alpha_links_splay_tree_node_s);
if (al == NULL)
{
size_t buf_len;
char *linksym;
tree id;
if (name[0] == '*')
name++;
/* Follow transparent alias, as this is used for CRTL translations. */
id = maybe_get_identifier (name);
if (id)
{
while (IDENTIFIER_TRANSPARENT_ALIAS (id))
id = TREE_CHAIN (id);
name = IDENTIFIER_POINTER (id);
}
buf_len = strlen (name) + 8 + 9;
linksym = (char *) alloca (buf_len);
snprintf (linksym, buf_len, "$%d..%s..lk", cfun->funcdef_no, name);
utils.c (init_gnat_to_gnu): Use typed GC allocation. gcc/ada: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. From-SVN: r160425
2010-06-08 09:25:24 +02:00
al = ggc_alloc_alpha_links ();
al->func = func;
al->linkage = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (linksym));
splay_tree_insert (cfun->machine->links,
(splay_tree_key) ggc_strdup (name),
(splay_tree_value) al);
}
al->rkind = rflag ? KIND_CODEADDR : KIND_LINKAGE;
if (lflag)
return gen_rtx_MEM (Pmode, plus_constant (al->linkage, 8));
else
return al->linkage;
}
static int
alpha_write_one_linkage (splay_tree_node node, void *data)
{
c-parse.in (yyerror): Const-ification and/or static-ization. * c-parse.in (yyerror): Const-ification and/or static-ization. * c-typeck.c (push_member_name): Likewise. * collect2.c (main): Likewise. * dbxout.c (dbxout_parms): Likewise. * diagnostic.c (format_with_decl): Likewise. * dwarf2out.c (output_ranges): Likewise. * dwarfout.c (fundamental_type_code): Likewise. * except.c (dw2_output_call_site_table): Likewise. * gcc.c (do_spec_1): Likewise. * genopinit.c (optabs): Likewise. * objc/objc-act.c (synth_id_with_class_suffix, start_class, gen_declaration_1, handle_impent): Likewise. * protoize.c (default_include, in_system_include_dir, abspath): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * sdbout.c (plain_type_1, sdbout_end_function, sdbout_end_epilogue): Likewise. * varasm.c (decode_reg_name): Likewise. * 1750a.c (mod_regno_adjust): Likewise. * alpha.c (alpha_write_one_linkage, unicosmk_output_default_externs): Likewise. * arm.c (arm_condition_codes): Likewise. * arm.h (arm_condition_codes): Likewise. * avr.c (output_movsisf, encode_section_info): Likewise. * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): Likewise. * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * m88k.c (output_function_profiler): Likewise. * mips.c (mips_output_conditional_branch): Likewise. * ns32k.c (ns32k_out_reg_names): Likewise. * ns32k.h (ns32k_out_reg_names): Likewise. * pj.c (pj_output_rval): Likewise. * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue): Likewise. cp: * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): Const-ification. * pt.c (tsubst_decl): Likewise. f: * bad.c (ffebad_finish): Const-ification and/or static-ization. * intrin.c (ffeintrin_cmp_name_): Likewise. * stc.c (ffestc_R904): Likewise. java: * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. From-SVN: r45581
2001-09-13 16:37:29 +02:00
const char *const name = (const char *) node->key;
struct alpha_links *link = (struct alpha_links *) node->value;
FILE *stream = (FILE *) data;
ASM_OUTPUT_INTERNAL_LABEL (stream, XSTR (link->linkage, 0));
if (link->rkind == KIND_CODEADDR)
{
/* External and used, request code address. */
fprintf (stream, "\t.code_address ");
}
else
{
if (!SYMBOL_REF_EXTERNAL_P (link->func)
&& SYMBOL_REF_LOCAL_P (link->func))
{
/* Locally defined, build linkage pair. */
fprintf (stream, "\t.quad %s..en\n", name);
fprintf (stream, "\t.quad ");
}
else
{
/* External, request linkage pair. */
fprintf (stream, "\t.linkage ");
}
}
assemble_name (stream, name);
fputs ("\n", stream);
return 0;
}
static void
alpha_write_linkage (FILE *stream, const char *funname)
{
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
fprintf (stream, "\t.link\n");
fprintf (stream, "\t.align 3\n");
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
in_section = NULL;
#ifdef TARGET_VMS_CRASH_DEBUG
fputs ("\t.name ", stream);
assemble_name (stream, funname);
fputs ("..na\n", stream);
#endif
ASM_OUTPUT_LABEL (stream, funname);
fprintf (stream, "\t.pdesc ");
assemble_name (stream, funname);
fprintf (stream, "..en,%s\n",
alpha_procedure_type == PT_STACK ? "stack"
: alpha_procedure_type == PT_REGISTER ? "reg" : "null");
if (cfun->machine->links)
{
splay_tree_foreach (cfun->machine->links, alpha_write_one_linkage, stream);
/* splay_tree_delete (func->links); */
}
}
target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. * Makefile.in (toplev.o): Depend on TARGET_H. (varasm.o, dbxout.o): Likewise. * c-common.c (decl_attributes): Check targetm.have_named_sections instead of ifdef ASM_OUTPUT_SECTION_NAME. * dbxout.c (dbxout_function_decl): Likewise. (dbxout_function_end): Likewise. * toplev.c (compile_file): Likewise. * varasm.c (exception_section): Likewise. * cp/decl2.c (finish_objects): Likewise. * defaults.h (EH_FRAME_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. (UNIQUE_SECTION_P): Remove. * dwarf2out.c (SECTION_FORMAT): Remove. (ASM_OUTPUT_SECTION): Remove. (output_call_frame_info): Use named_section_flags. (output_comp_unit, dwarf2out_start_source_file): Likewise. (dwarf2out_end_source_file, dwarf2out_define): Likewise. (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. * varasm.c (in_eh_frame, eh_frame_section): Remove. (named_section_flags): New. (named_section): Use it and targetm.section_type_flags. (resolve_unique_section): New. (assemble_start_function): Use it. (asm_emit_uninitialised, assemble_variable): Likewise. (default_section_type_flags): New. (default_no_named_section, default_elf_asm_named_section): New. (default_coff_asm_named_section, default_pe_asm_named_section): New. * output.h: Update varasm.c decls. (SECTION_*): New flags. * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. * config/elfos.h (UNIQUE_SECTION_P): Remove. * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/win32.h: Likewise. * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. * config/alpha/vms.h, config/arm/coff.h: Likewise. * config/arm/conix-elf.h, config/arm/elf.h: Likewise. * config/arm/linux-elf.h, config/arm/pe.h: Likewise. * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. * config/i386/sco5.h, config/i386/win32.h: Likewise. * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. * config/mcore/mcore.h, config/mips/elf.h: Likewise. * config/mips/elf64.h, config/mips/iris6.h: Likewise. * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/nextstep.h: Error until named sections implemented. * config/a29k/a29k.c (a29k_asm_named_section): New. * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. (vms_section_type_flags, vms_asm_named_section): New. * config/arm/arm.c (arm_elf_asm_named_section): New. * config/avr/avr.c (asm_output_section_name): Remove. * config/avr/avr-protos.h: Update. * config/c4x/c4x.c (c4x_asm_named_section): New. * config/h8300/h8300.c (h8300_asm_named_section): New. * config/i386/i386.c (sco_asm_named_section): New. * config/i386/winnt.c (SECTION_PE_SHARED): New. (i386_pe_section_type_flags): New. (i386_pe_asm_named_section): New. * config/i386/i386-protos.h: Update. * config/m68k/m68k.c (m68k_coff_asm_named_section): New. * config/mcore/mcore.c (mcore_asm_named_section): New. * config/mips/mips.c (iris6_asm_named_section): New. * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY instead of UNIQUE_SECTION_P. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. (xcoff_asm_named_section): New. * config/sh/sh.c (sh_asm_named_section): New. * config/sparc/sparc.c (sparc_elf_asm_named_section): New. * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. (EH_FRAME_SECTION_NAME): New. (EXCEPTION_SECTION): New. * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. (DEBUG_*_SECTION): Remove. * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/mips/iris6.h (DEBUG_*_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. * doc/tm.texi (UNIQUE_SECTION_P): Remove. (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. From-SVN: r44623
2001-08-04 03:31:41 +02:00
/* Switch to an arbitrary section NAME with attributes as specified
by FLAGS. ALIGN specifies any known alignment requirements for
the section; 0 if the default should be used. */
static void
configure.ac: Check for COMDAT support. * configure.ac: Check for COMDAT support. Robustify check for SHF_MERGE support. * configure: Regenerated. * config.in: Likewise. * langhooks-def.h (lhd_comdat_group): New function. (LANG_HOOKS_COMDAT_GROUP): New macro. (LANG_HOOKS_DECLS): Use it. * langhooks.c (lhd_comdat_group): Define. * langhooks.h (lang_hooks_for_decls): Add comdat_group. * output.h (named_section_flags): Make it a macro. (named_section_real): New function. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Likewise. (default_coff_asm_named_section): Likewise. (default_pe_asm_named_section): Likewise. * target.h (gcc_target): Adjust type of named_section. * varasm.c (named_section_flags): Rename to named_section_real. Add decl parameter. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Use COMDAT, if available. Deal with the case that ASM_COMMENT_START is "@". (default_coff_asm_named_section): Add decl parameter. (default_pe_asm_named_section): Likewise. * config/alpha/alpha.c (vms_asm_named_section): Add decl parameter. (unicosmk_asm_named_section): Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Remove. * config/arm/elf.h (TARGET_ASM_NAMED_SECTION): Likewise. * config/c4x/c4x.c (c4x_asm_named_section): Add decl parameter. * config/cris/cris-protos.h (cris_target_asm_named_section): Likewise. * config/cris/cris.c (cris_target_asm_named_section): Likewise. * config/h8300/h8300.c (h8300_asm_named_section): Likewise. * config/i386/i386-protos.h (i386_pe_asm_named_section): Likewise. * config/i386/winnt.c (i386_pe_asm_named_section): Likewise. * config/m68k/m68k.c (m68k_coff_asm_named_section): Likewise. * config/mcore/mcore.c (mcore_asm_named_section): Likewise. * config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Likewise. * config/sparc/sparc.c (sparce_elf_asm_named_section): Likewise. * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define. * cp-tree.h (cxx_comdat_group): Declare. * decl.c (cxx_comdat_group): New function. From-SVN: r87557
2004-09-15 19:03:22 +02:00
vms_asm_named_section (const char *name, unsigned int flags,
tree decl ATTRIBUTE_UNUSED)
target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. * Makefile.in (toplev.o): Depend on TARGET_H. (varasm.o, dbxout.o): Likewise. * c-common.c (decl_attributes): Check targetm.have_named_sections instead of ifdef ASM_OUTPUT_SECTION_NAME. * dbxout.c (dbxout_function_decl): Likewise. (dbxout_function_end): Likewise. * toplev.c (compile_file): Likewise. * varasm.c (exception_section): Likewise. * cp/decl2.c (finish_objects): Likewise. * defaults.h (EH_FRAME_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. (UNIQUE_SECTION_P): Remove. * dwarf2out.c (SECTION_FORMAT): Remove. (ASM_OUTPUT_SECTION): Remove. (output_call_frame_info): Use named_section_flags. (output_comp_unit, dwarf2out_start_source_file): Likewise. (dwarf2out_end_source_file, dwarf2out_define): Likewise. (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. * varasm.c (in_eh_frame, eh_frame_section): Remove. (named_section_flags): New. (named_section): Use it and targetm.section_type_flags. (resolve_unique_section): New. (assemble_start_function): Use it. (asm_emit_uninitialised, assemble_variable): Likewise. (default_section_type_flags): New. (default_no_named_section, default_elf_asm_named_section): New. (default_coff_asm_named_section, default_pe_asm_named_section): New. * output.h: Update varasm.c decls. (SECTION_*): New flags. * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. * config/elfos.h (UNIQUE_SECTION_P): Remove. * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/win32.h: Likewise. * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. * config/alpha/vms.h, config/arm/coff.h: Likewise. * config/arm/conix-elf.h, config/arm/elf.h: Likewise. * config/arm/linux-elf.h, config/arm/pe.h: Likewise. * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. * config/i386/sco5.h, config/i386/win32.h: Likewise. * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. * config/mcore/mcore.h, config/mips/elf.h: Likewise. * config/mips/elf64.h, config/mips/iris6.h: Likewise. * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/nextstep.h: Error until named sections implemented. * config/a29k/a29k.c (a29k_asm_named_section): New. * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. (vms_section_type_flags, vms_asm_named_section): New. * config/arm/arm.c (arm_elf_asm_named_section): New. * config/avr/avr.c (asm_output_section_name): Remove. * config/avr/avr-protos.h: Update. * config/c4x/c4x.c (c4x_asm_named_section): New. * config/h8300/h8300.c (h8300_asm_named_section): New. * config/i386/i386.c (sco_asm_named_section): New. * config/i386/winnt.c (SECTION_PE_SHARED): New. (i386_pe_section_type_flags): New. (i386_pe_asm_named_section): New. * config/i386/i386-protos.h: Update. * config/m68k/m68k.c (m68k_coff_asm_named_section): New. * config/mcore/mcore.c (mcore_asm_named_section): New. * config/mips/mips.c (iris6_asm_named_section): New. * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY instead of UNIQUE_SECTION_P. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. (xcoff_asm_named_section): New. * config/sh/sh.c (sh_asm_named_section): New. * config/sparc/sparc.c (sparc_elf_asm_named_section): New. * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. (EH_FRAME_SECTION_NAME): New. (EXCEPTION_SECTION): New. * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. (DEBUG_*_SECTION): Remove. * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/mips/iris6.h (DEBUG_*_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. * doc/tm.texi (UNIQUE_SECTION_P): Remove. (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. From-SVN: r44623
2001-08-04 03:31:41 +02:00
{
fputc ('\n', asm_out_file);
fprintf (asm_out_file, ".section\t%s", name);
target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. * Makefile.in (toplev.o): Depend on TARGET_H. (varasm.o, dbxout.o): Likewise. * c-common.c (decl_attributes): Check targetm.have_named_sections instead of ifdef ASM_OUTPUT_SECTION_NAME. * dbxout.c (dbxout_function_decl): Likewise. (dbxout_function_end): Likewise. * toplev.c (compile_file): Likewise. * varasm.c (exception_section): Likewise. * cp/decl2.c (finish_objects): Likewise. * defaults.h (EH_FRAME_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. (UNIQUE_SECTION_P): Remove. * dwarf2out.c (SECTION_FORMAT): Remove. (ASM_OUTPUT_SECTION): Remove. (output_call_frame_info): Use named_section_flags. (output_comp_unit, dwarf2out_start_source_file): Likewise. (dwarf2out_end_source_file, dwarf2out_define): Likewise. (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. * varasm.c (in_eh_frame, eh_frame_section): Remove. (named_section_flags): New. (named_section): Use it and targetm.section_type_flags. (resolve_unique_section): New. (assemble_start_function): Use it. (asm_emit_uninitialised, assemble_variable): Likewise. (default_section_type_flags): New. (default_no_named_section, default_elf_asm_named_section): New. (default_coff_asm_named_section, default_pe_asm_named_section): New. * output.h: Update varasm.c decls. (SECTION_*): New flags. * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. * config/elfos.h (UNIQUE_SECTION_P): Remove. * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/win32.h: Likewise. * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. * config/alpha/vms.h, config/arm/coff.h: Likewise. * config/arm/conix-elf.h, config/arm/elf.h: Likewise. * config/arm/linux-elf.h, config/arm/pe.h: Likewise. * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. * config/i386/sco5.h, config/i386/win32.h: Likewise. * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. * config/mcore/mcore.h, config/mips/elf.h: Likewise. * config/mips/elf64.h, config/mips/iris6.h: Likewise. * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/nextstep.h: Error until named sections implemented. * config/a29k/a29k.c (a29k_asm_named_section): New. * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. (vms_section_type_flags, vms_asm_named_section): New. * config/arm/arm.c (arm_elf_asm_named_section): New. * config/avr/avr.c (asm_output_section_name): Remove. * config/avr/avr-protos.h: Update. * config/c4x/c4x.c (c4x_asm_named_section): New. * config/h8300/h8300.c (h8300_asm_named_section): New. * config/i386/i386.c (sco_asm_named_section): New. * config/i386/winnt.c (SECTION_PE_SHARED): New. (i386_pe_section_type_flags): New. (i386_pe_asm_named_section): New. * config/i386/i386-protos.h: Update. * config/m68k/m68k.c (m68k_coff_asm_named_section): New. * config/mcore/mcore.c (mcore_asm_named_section): New. * config/mips/mips.c (iris6_asm_named_section): New. * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY instead of UNIQUE_SECTION_P. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. (xcoff_asm_named_section): New. * config/sh/sh.c (sh_asm_named_section): New. * config/sparc/sparc.c (sparc_elf_asm_named_section): New. * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. (EH_FRAME_SECTION_NAME): New. (EXCEPTION_SECTION): New. * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. (DEBUG_*_SECTION): Remove. * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/mips/iris6.h (DEBUG_*_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. * doc/tm.texi (UNIQUE_SECTION_P): Remove. (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. From-SVN: r44623
2001-08-04 03:31:41 +02:00
if (flags & SECTION_DEBUG)
fprintf (asm_out_file, ",NOWRT");
fputc ('\n', asm_out_file);
target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. * Makefile.in (toplev.o): Depend on TARGET_H. (varasm.o, dbxout.o): Likewise. * c-common.c (decl_attributes): Check targetm.have_named_sections instead of ifdef ASM_OUTPUT_SECTION_NAME. * dbxout.c (dbxout_function_decl): Likewise. (dbxout_function_end): Likewise. * toplev.c (compile_file): Likewise. * varasm.c (exception_section): Likewise. * cp/decl2.c (finish_objects): Likewise. * defaults.h (EH_FRAME_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. (UNIQUE_SECTION_P): Remove. * dwarf2out.c (SECTION_FORMAT): Remove. (ASM_OUTPUT_SECTION): Remove. (output_call_frame_info): Use named_section_flags. (output_comp_unit, dwarf2out_start_source_file): Likewise. (dwarf2out_end_source_file, dwarf2out_define): Likewise. (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. * varasm.c (in_eh_frame, eh_frame_section): Remove. (named_section_flags): New. (named_section): Use it and targetm.section_type_flags. (resolve_unique_section): New. (assemble_start_function): Use it. (asm_emit_uninitialised, assemble_variable): Likewise. (default_section_type_flags): New. (default_no_named_section, default_elf_asm_named_section): New. (default_coff_asm_named_section, default_pe_asm_named_section): New. * output.h: Update varasm.c decls. (SECTION_*): New flags. * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. * config/elfos.h (UNIQUE_SECTION_P): Remove. * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/win32.h: Likewise. * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. * config/alpha/vms.h, config/arm/coff.h: Likewise. * config/arm/conix-elf.h, config/arm/elf.h: Likewise. * config/arm/linux-elf.h, config/arm/pe.h: Likewise. * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. * config/i386/sco5.h, config/i386/win32.h: Likewise. * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. * config/mcore/mcore.h, config/mips/elf.h: Likewise. * config/mips/elf64.h, config/mips/iris6.h: Likewise. * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/nextstep.h: Error until named sections implemented. * config/a29k/a29k.c (a29k_asm_named_section): New. * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. (vms_section_type_flags, vms_asm_named_section): New. * config/arm/arm.c (arm_elf_asm_named_section): New. * config/avr/avr.c (asm_output_section_name): Remove. * config/avr/avr-protos.h: Update. * config/c4x/c4x.c (c4x_asm_named_section): New. * config/h8300/h8300.c (h8300_asm_named_section): New. * config/i386/i386.c (sco_asm_named_section): New. * config/i386/winnt.c (SECTION_PE_SHARED): New. (i386_pe_section_type_flags): New. (i386_pe_asm_named_section): New. * config/i386/i386-protos.h: Update. * config/m68k/m68k.c (m68k_coff_asm_named_section): New. * config/mcore/mcore.c (mcore_asm_named_section): New. * config/mips/mips.c (iris6_asm_named_section): New. * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY instead of UNIQUE_SECTION_P. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. (xcoff_asm_named_section): New. * config/sh/sh.c (sh_asm_named_section): New. * config/sparc/sparc.c (sparc_elf_asm_named_section): New. * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. (EH_FRAME_SECTION_NAME): New. (EXCEPTION_SECTION): New. * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. (DEBUG_*_SECTION): Remove. * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/mips/iris6.h (DEBUG_*_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. * doc/tm.texi (UNIQUE_SECTION_P): Remove. (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. From-SVN: r44623
2001-08-04 03:31:41 +02:00
}
/* Record an element in the table of global constructors. SYMBOL is
a SYMBOL_REF of the function to be called; PRIORITY is a number
between 0 and MAX_INIT_PRIORITY.
Differs from default_ctors_section_asm_out_constructor in that the
width of the .ctors entry is always 64 bits, rather than the 32 bits
used by a normal pointer. */
static void
vms_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
{
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
switch_to_section (ctors_section);
defaults.h (UNALIGNED_SHORT_ASM_OP, [...]): Move from ... * defaults.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_INT_ASM_OP, ASM_BYTE_OP): Move from ... * dwarf2asm.c: ... here. * dwarfout.c: Remove them. * varasm.c (assemble_integer): Add align parameter. (assemble_real, output_constant, output_constructor): Likewise. * output.h: Update decls. * dwarf2asm.c, final.c, varasm.c, config/darwin.c, config/nextstep.c, config/alpha/alpha.c, config/arm/arm.md, config/clipper/clipper.c, config/m88k/m88k.c, config/mcore/mcore.md, config/mips/mips.h, config/mips/mips.md, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.md: Update all callers. * final.c (end_final): Abort profile block generation if we havn't layed it out properly. * output.h (assemble_eh_integer): Remove stale decl. * varasm.c (assemble_zeros): Tidy; use assemble_integer. (min_align): New. (assemble_integer): Handle unaligned data. (assemble_real): Abort on unaligned data. (output_constructor): Don't assume ASM_OUTPUT_ALIGN 0 does anything useful. (default_dtor_section_asm_out_destructor): Use assemble_align. (default_named_section_asm_out_constructor): Likewise. (default_ctor_section_asm_out_constructor): Likewise. * config/darwin.c (machopic_asm_out_constructor): Likewise. (machopic_asm_out_destructor): Likewise. * config/nextstep.c (nextstep_asm_out_constructor): Likewise. (nextstep_asm_out_destructor): Likewise. * config/alpha/alpha.c (vms_asm_out_constructor): Likewise. (vms_asm_out_destructor): Likewise. * java/class.c (emit_register_classes): Add align parameter to call to assemble_integer. From-SVN: r44992
2001-08-18 02:53:20 +02:00
assemble_align (BITS_PER_WORD);
assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1);
}
static void
vms_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
{
alpha.c (alpha_start_function): Use switch_to_section. * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. (alpha_elf_select_rtx_section): Return the selected section rather than emitting assembly code. (alpha_write_linkage): Emit a ".link" directive directly and then set in_section to NULL. (vms_asm_out_constructor): Use switch_to_section. (vms_asm_out_destructor): Likewise. (unicosmk_output_common): Set in_section to NULL instead of calling the dummy common_section function. (unicosmk_text_section): Delete in favor of... (unicosmk_output_text_section_asm_op): ...this new function. (unicosmk_data_section): Delete in favor of... (unicosmk_output_data_section_asm_op): ...this new function. (unicosmk_init_sections): New function. (unicosmk_output_deferred_case_vectors): Use switch_to_section. (unicosmk_output_ssib): Set in_section to NULL instead of calling the dummy ssib_section function. (unicosmk_section_buf): Delete. * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. (unicosmk_data_section): Delete. * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) (SECTION_FUNCTION_TEMPLATE): Delete. * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. (TARGET_ASM_INIT_SECTIONS): Define. * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (link_section, literals_section): Delete. (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then set in_section to NULL. * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. (COMMON_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling the dummy common_section function. * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/arm/arm.c (get_jump_table_size): Use pointer comparison between readonly_data_section and text_section to check whether read-only data is being put in the text section. (arm_output_function_epilogue): Use switch_to_section. (arm_elf_asm_constructor): Likewise. (thumb_call_via_reg): Replace call to in_text_section with a comparison between in_section and text_section. (arm_file_end): Use switch_to_section. (aof_text_section): Delete in favor of... (aof_output_text_section_asm_op): ...this new function. (aof_data_section): Delete in favor of... (aof_output_data_section_asm_op): ...this new function. (aof_asm_init_sections): New function. (zero_init_section): Moved from config/arm/aof.h. (aof_dump_imports, aof_file_start): Use switch_to_section. * config/arm/arm.h (thumb_call_via_label): Update comment. * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. (common_section): Delete. * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) (SWITCH_TO_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro. * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and switch_to_section. * config/avr/avr.c (progmem_section): New variable. (avr_output_progmem_section_asm_op): New function. (avr_asm_init_sections): New function. (avr_output_addr_vec_elt): Use switch_to_section. * config/avr/avr.h (progmem_section): Declare. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/avr/avr-protos.h (progmem_section): Delete. * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. * config/darwin-sections.def: New file. * config/darwin.c: Define all sections in darwin-sections.def. (output_objc_section_asm_op, darwin_init_sections): New functions. (machopic_output_indirection): Use switch_to_section. (machopic_select_section): Return the selected section rather than emitting assembly code. Replace the static function table with inline conditional expressions. Update the tests of last_text_section and move them into the FUNCTION_DECL block. (machopic_select_rtx_section): Return the selected section rather than emitting assembly code. (machopic_asm_out_constructor, machopic_asm_out_destructor) (darwin_file_end): Use switch_to_section. * config/darwin.h: Use darwin-sections.def to declare sections. (INIT_SECTION_ASM_OP): Remove empty definition. (HAS_INIT_SECTION): Define this instead. (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. (TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/darwin-protos.h (darwin_init_sections): Declare. (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (constructor_section, destructor_section, mod_init_section): Delete. (mod_term_section): Delete. (darwin_exception_section, darwin_eh_frame_section): Delete. (machopic_select_section): Return a section. (machopic_select_rtx_section): Likewise. (text_coal_section, text_unlikely_section, text_unlikely_coal_section) (const_section, const_coal_section, const_data_section): Delete. (const_data_coal_section, data_coal_section, cstring_section): Delete. (literal4_section, literal8_section, constructor_section): Delete. (mod_init_section, mod_term_section, destructor_section): Delete. (objc_class_section, objc_meta_class_section, objc_category_section) (objc_class_vars_section, objc_instance_vars_section): Delete. (objc_cls_meth_section, objc_inst_meth_section): Delete. (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. (objc_selector_refs_section, objc_selector_fixup_section): Delete. (objc_symbols_section, objc_module_info_section): Delete. (objc_image_info_section, objc_protocol_section): Delete. (objc_string_object_section, objc_constant_string_object_section) (objc_class_names_section, objc_meth_var_names_section): Delete. (objc_meth_var_types_section, objc_cls_refs_section): Delete. (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) (machopic_symbol_stub_section, machopic_picsymbol_stub_section) (darwin_exception_section, darwin_eh_frame_section): Delete. * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. (frv_asm_out_destructor): Likewise. * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and get_named_section. (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) (data_section): Delete. * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (DRECTVE_SECTION_FUNCTION): Delete. (drectve_section): Redefine as a macro that sets in_section after emitting the directive. (SWITCH_TO_SECTION_FUNCTION): Delete. * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to in_text_section with comparison between in_section and text_section. * config/i386/i386.c (x86_64_elf_select_section): Return the section rather than emitting assembly code. Use get_named_section. (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and get_named_section. (machopic_output_stub): Use switch_to_section. * config/i386/nwld.c (nwld_named_section_asm_out_constructor) (nwld_named_section_asm_out_destructor): Use get_section and switch_to_section. * config/ia64/ia64.c (ia64_select_rtx_section): Return the section rather than emitting assembly code. (ia64_rwreloc_select_section): Likewise. (ia64_rwreloc_select_rtx_section): Likewise. * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the section rather than emitting assembly code. (iq2000_select_section): Likewise. * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. (sbss_section): Delete. * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section and get_named_section. * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. (MCORE_EXPORT_NAME): Emit the exports directive directly, then set in_section to NULL. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (SWITCH_SECTION_FUNCTION): Delete. * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set in_section to NULL. (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the global switch_to_section function instead of the old port-local one. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. * config/mips/mips.c (mips_file_start): Update comment. (mips_output_aligned_bss): Use switch_to_section and get_named_section. (mips_output_aligned_decl_common): Use switch_to_section. (mips_select_rtx_section): Return the section rather than emitting assembly code. Use get_named_section. (mips_function_rodata_section: Likewise get_section. (build_mips16_function_stub): Use switch_to_section. * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. (SDATA_SECTION_ASM_OP): Delete. * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. * config/mmix/mmix.c (mmix_file_start, mmix_file_end) (mmix_asm_output_aligned_local): Use switch_to_section. * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) (som_one_only_readonly_data_section): New variables. (pa_output_function_epilogue): Set in_section to NULL instead of calling forget_section. (output_deferred_plabels): Use select_section. (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead of calling forget_section. (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) (pa_asm_output_aligned_local): Use select_section. (som_text_section_asm_op): Delete in favor of... (som_output_text_section_asm_op): ...this new function. (pa_som_asm_init_sections): New function. (pa_select_section): Return the section rather than emitting assembly code. * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. * config/pa/pa-protos.h (som_text_section_asm_op): Delete. (som_readonly_data_section, som_one_only_readonly_data_section) (som_one_only_data_section, forget_section): Delete. * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. * config/rs6000/rs6000.c (read_only_data_section): New variable. (private_data_section, read_only_private_data_section): New variables. (sdata2_section, toc_section): New variables. (rs6000_file_start): Use switch_to_section. (rs6000_assemble_integer): Use comparisons against in_section instead of calling in_toc_section and in_text_section. Use unlikely_text_section_p. (rs6000_elf_output_toc_section_asm_op): New function, derived from the old rs6000/sysv4.h toc_section function. (rs6000_elf_asm_init_sections): New function. (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return the section rather than emitting assembly code. (machopic_output_stub): Use switch_to_section. (toc_section): Delete dummy function. (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use switch_to_section and get_section. (rs6000_xcoff_output_readonly_section_asm_op): New function. (rs6000_xcoff_output_readwrite_section_asm_op): New function. (rs6000_xcoff_output_toc_section_asm_op): New function, derived from the old rs6000/xcoff.h toc_section function. (rs6000_xcoff_asm_init_sections): New function. (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return the section rather than emitting assembly code. (rs6000_xcoff_file_start): Use switch_to_section. (rs6000_xcoff_file_end): Likewise. * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. (sdata2_section, sbss_section, private_data_section): Delete. (read_only_data_section, read_only_private_data_section): Delete. * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. (FINI_SECTION_FUNCTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) (READONLY_DATA_SECTION): Delete. (TARGET_ASM_INIT_SECTIONS): Define. (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section to NULL rather than no_section. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/sh/sh.c (sh_file_start): Use switch_to_section. * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. (sparc_output_deferred_case_vectors): Likewise. Remove argument from call to current_function_section. * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. (bss100_section): New variable. (xstormy16_asm_output_aligned_common): Use switch_to_section. (xstormy16_asm_init_sections): New function. (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use switch_to_section and get_section. (xstormy16_output_addr_vec): Use switch_to_section. Remove argument from calls to current_function_section. * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/stormy16/stormy16-protos.h (bss100_section): Delete. * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) (FINI_SECTION_FUNCTION): Delete. * config/v850/v850.c: Include gt-v850.h. (rosdata_section, rozdata_section, tdata_section, zdata_section) (zbss_section): New variables. (v850_output_aligned_bss): Use switch_to_section. (v850_asm_init_sections): New function. (v850_select_section): Return the section rather than emitting assembly code. * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. (TARGET_ASM_INIT_SECTIONS): Define. * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. (zbss_section): Delete. * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. * config/vx-common.h (vxworks_exception_section): Delete. (TARGET_ASM_EXCEPTION_SECTION): Delete. * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the section rather than emitting assembly code. * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use switch_to_section. * Makefile.in (GTFILES): Add $(srcdir)/output.h. * coretypes.h (section): New union and typedef. * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument from call to current_function_section. (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) (dbxout_symbol_location): Use switch_to_section. * dwarf2out.c (named_section_eh_frame_section): Delete, moving most of the code into... (default_eh_frame_section): ...here. Return a section. (collect2_eh_frame_section): Delete, moving most of the code into.. (switch_to_eh_frame_section): ...this new function. (debug_info_section, debug_abbrev_section, debug_aranges_section) (debug_macinfo_section, debug_line_section, debug_loc_section) (debug_pubnames_section, debug_str_section, debug_ranges_section): New variables. (output_call_frame_info): Call switch_to_eh_frame_section instead of eh_frame_section. Use switch_to_section and get_section. (dwarf2out_begin_prologue): Use switch_to_section. (AT_string_form): Check the flags in debug_str_section instead of DEBUG_STR_SECTION_FLAGS. (output_comp_unit): Use switch_to_section, get_section, and debug_info_section. (output_line_info, secname_for_decl): Use unlikely_text_section_p. (dwarf2out_begin_block): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_var_location): Use unlikely_text_section_p. (dwarf2out_source_line): Use switch_to_section. Remove argument from call to current_function_section. (dwarf2out_start_source_file, dwarf2out_end_source_file) (dwarf2out_define, dwarf2out_undef: Use switch_to_section and debug_macinfo_section. (dwarf2out_init): Initialize the new section variables. Use them instead of calls to named_section_flags. Use switch_to_section. (output_indirect_string): Use switch_to_section and debug_str_section. (dwarf2out_finish): Use switch_to_section and the new section variables. * except.c (default_exception_section): Return the section instead of emitting assembly code. (output_function_exception_table): Use the global exception_section variable instead of the target hook. Use switch_to_section. Remove argument from call to current_function_section. * final.c (HAVE_READONLY_DATA_SECTION): Delete. (shorten_branches): Use pointer comparisons to detect whether the text section is the same as readonly_data_section. (profile_function): Use switch_to_section. Remove argument from call to current_function_section. (final_scan_insn): Likewise. Update use of last_text_section. * gengtype.c (open_base_files): Add an include of output.h. * output.h (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section, sdata_section): Turn into section pointers. (in_text_section, in_unlikely_text_section, exports_section) (drectve_section, named_section, mergeable_string_section) (last_text_section_name): Delete. (default_exception_section, default_eh_frame_section): Return sections. (SECTION_DECLARED, SECTION_NAMED): New macros. (SECTION_MACH_DEP): Bump value. (section_common, named_section, unnamed_section): New structures. (unnamed_section_callback): New typedef. (section): New union. (sbss_section, exception_section, eh_frame_section): New variables. (in_section, last_text_section): Turn into section pointers. (get_unnamed_section, get_section, get_named_section): New functions. (mergeable_constant_section, function_section): Return a section. (unlikely_text_section): Likewise. (current_function_section): Likewise. Remove the decl argument. (unlikely_text_section_p, switch_to_section): New functions. (output_section_asm_op): New function. (set_named_section_flags, named_section_flags, named_section_real) (named_section_first_declaration): Delete. (default_select_section, default_elf_select_section): Return a section. (default_elf_select_section_1, default_function_rodata_section) (default_no_function_rodata_section, default_select_rtx_section) (default_elf_select_rtx_section): Likewise. * rtl.h (in_data_section): Delete. * sdbout.c (sdbout_one_type): Use switch_to_section. * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. (TARGET_ASM_EH_FRAME_SECTION): Poison. * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. (TARGET_ASM_OUT): Update after above changes. * target.h (init_sections): New hook. (exception_section, eh_frame_section): Delete. (select_section, select_rtx_section, function_rodata_section): Return a section rather than emitting assembly code. * varasm.c (text_section, data_section, readonly_data_section) (ctors_section, dtors_section, bss_section, init_section) (fini_section): Turn into section pointers. (sdata_section, sbss_section, exception_section): New variables. (eh_frame_section): New variable. (in_section): Make global and turn into a section pointer. (last_text_section): Turn into a section pointer. (unnamed_sections): New variable. (in_named_name, last_text_section_name): Delete. (EXTRA_SECTION_FUNCTIONS): Delete. (in_named_entry): Delete. (section_htab): New variable, replacing... (in_named_htab): ...this deleted variable. (section_entry_eq, section_entry_hash): New functions, based on... (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. (get_unnamed_section, get_section): New functions. (unlikely_text_section): Return a section instead of emitting assembly code. (in_text_section, in_unlikely_text_section, in_data_section): Delete. (get_named_section_flags, named_section_first_declaration): Delete. (unlikely_text_section_p): New function. (named_section_real, named_section): Delete. (get_named_section): New function. (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. (function_section): Return a section rather than emitting assembly code. (current_function_section): Likewise. Remove argument. Use last_text_section if nonnull, otherwise use function_section. (default_function_rodata_section): Return a section rather than emitting assembly code. Use get_section. (default_no_function_rodata_section): Return a section rather than emitting assembly code. (variable_section): Use switch_to_section and get_named_section. (mergeable_string_section): Return a section rather than emitting assembly code. Use get_section. Make static. Don't take special countermeasures for empty strings. (mergeable_constant_section): Return a section rather than emitting assembly code. Use get_section. (default_named_section_asm_out_destructor): Use switch_to_section and get_section. (default_dtor_section_asm_out_destructor): Use switch_to_section. (default_named_section_asm_out_constructor): Use switch_to_section and get_section. (default_ctor_section_asm_out_constructor): Use switch_to_section. (assemble_start_function): Likewise. Set last_text_section to NULL rather than no_section. Change the type of save_section. (assemble_zeros, assemble_variable): Use the section flags to detect whether or not a section is text. (assemble_static_space): Use switch_to_section. (assemble_trampoline_template): Likewise. (output_constant_def_contents): Use switch_to_section and get_named_section. (output_constant_pool_1): Use switch_to_section. Use the section flags to see whether sections contain mergeable data. (init_varasm_once): Initialize section_htab instead of in_named_htab. Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. (default_elf_asm_named_section): Use SECTION_DECLARED to detect whether a section has already been declared. (default_select_section, default_elf_select_section): Return a section rather than emitting assembly code. (default_elf_select_section_1): Likewise. Use bss_section for SECCAT_BSS if nonnull. Use get_named_section. (default_select_rtx_section): Return a section rather than emitting assembly code. (default_elf_select_rtx_section): Likewise. Use get_named_section. (file_end_indicate_exec_stack): Use switch_to_section and get_section. (output_section_asm_op, switch_to_section): New functions. * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and get_named_section. * doc/tm.texi: Expand the introduction to the sections documentation. (TRAMPOLINE_SECTION): Document new interface. (SDATA_SECTION_ASM_OP): Document new macro. (READONLY_DATA_SECTION): Delete. (SDATA_SECTION_ASM_OP): Document new macro. (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. (TARGET_ASM_INIT_SECTIONS): Document new hook. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. gcc/java/ * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. From-SVN: r108152
2005-12-07 08:53:14 +01:00
switch_to_section (dtors_section);
defaults.h (UNALIGNED_SHORT_ASM_OP, [...]): Move from ... * defaults.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_INT_ASM_OP, ASM_BYTE_OP): Move from ... * dwarf2asm.c: ... here. * dwarfout.c: Remove them. * varasm.c (assemble_integer): Add align parameter. (assemble_real, output_constant, output_constructor): Likewise. * output.h: Update decls. * dwarf2asm.c, final.c, varasm.c, config/darwin.c, config/nextstep.c, config/alpha/alpha.c, config/arm/arm.md, config/clipper/clipper.c, config/m88k/m88k.c, config/mcore/mcore.md, config/mips/mips.h, config/mips/mips.md, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.md: Update all callers. * final.c (end_final): Abort profile block generation if we havn't layed it out properly. * output.h (assemble_eh_integer): Remove stale decl. * varasm.c (assemble_zeros): Tidy; use assemble_integer. (min_align): New. (assemble_integer): Handle unaligned data. (assemble_real): Abort on unaligned data. (output_constructor): Don't assume ASM_OUTPUT_ALIGN 0 does anything useful. (default_dtor_section_asm_out_destructor): Use assemble_align. (default_named_section_asm_out_constructor): Likewise. (default_ctor_section_asm_out_constructor): Likewise. * config/darwin.c (machopic_asm_out_constructor): Likewise. (machopic_asm_out_destructor): Likewise. * config/nextstep.c (nextstep_asm_out_constructor): Likewise. (nextstep_asm_out_destructor): Likewise. * config/alpha/alpha.c (vms_asm_out_constructor): Likewise. (vms_asm_out_destructor): Likewise. * java/class.c (emit_register_classes): Add align parameter to call to assemble_integer. From-SVN: r44992
2001-08-18 02:53:20 +02:00
assemble_align (BITS_PER_WORD);
assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1);
}
#else
rtx
alpha_use_linkage (rtx func ATTRIBUTE_UNUSED,
bool lflag ATTRIBUTE_UNUSED,
bool rflag ATTRIBUTE_UNUSED)
{
return NULL_RTX;
}
#endif /* TARGET_ABI_OPEN_VMS */
2001-09-11 10:52:39 +02:00
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
static void
alpha_init_libfuncs (void)
{
if (TARGET_ABI_OPEN_VMS)
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
{
/* Use the VMS runtime library functions for division and
remainder. */
set_optab_libfunc (sdiv_optab, SImode, "OTS$DIV_I");
set_optab_libfunc (sdiv_optab, DImode, "OTS$DIV_L");
set_optab_libfunc (udiv_optab, SImode, "OTS$DIV_UI");
set_optab_libfunc (udiv_optab, DImode, "OTS$DIV_UL");
set_optab_libfunc (smod_optab, SImode, "OTS$REM_I");
set_optab_libfunc (smod_optab, DImode, "OTS$REM_L");
set_optab_libfunc (umod_optab, SImode, "OTS$REM_UI");
set_optab_libfunc (umod_optab, DImode, "OTS$REM_UL");
abort_libfunc = init_one_libfunc ("decc$abort");
memcmp_libfunc = init_one_libfunc ("decc$memcmp");
#ifdef MEM_LIBFUNCS_INIT
MEM_LIBFUNCS_INIT;
#endif
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
}
}
target.def (conditional_register_usage): Define. * target.def (conditional_register_usage): Define. * reginfo.c (init_reg_sets_1): Call targetm.conditional_register_usage. * system.h (CONDITIONAL_REGISTER_USAGE): Poison. * doc/tm.texi.in (CONDITIONAL_REGISTER_USAGE): Adjust language for making it a hook. * doc/tm.texi: Regenerate. * config/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/alpha/alpha.c (alpha_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arc/arc.c (arc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arm/arm.c (arm_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/bfin/bfin.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/bfin/bfin-protos.h (conditional_register_usage): Delete. * config/bfin/bfin.c (conditional_register_usage): Move code into... (bfin_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/cris/cris.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/cris/cris-protos.h (cris_conditional_register_usage): Delete. * config/cris/cris.c (cris_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/fr30/fr30.h (FIXED_REGISTERS): Adjust comment. * config/frv/frv.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/frv/frv-protos.h (frv_conditional_register_usage): Delete. * config/frv/frv.c (frv_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/h8300/h8300.c (h8300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/i386/i386-protos.h (ix86_conditional_register_usage): Delete. * config/i386/i386.c (ix86_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32c/m32c.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m32c/m32c-protos.h (m32c_conditional_register_usage): Delete. * config/m32c/m32c.c (m32c_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32r/m32r.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/m32r/m32r.c (m32r_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m68hc11/m68hc11.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_conditional_register_usage): Delete. * config/m68hc11/m68hc11.c (m68hc11_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mep/mep.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mep/mep-protos.h (mep_conditional_register_usage): Delete. * config/mep/mep.c (mep_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mips/mips-protos.h (mips_conditional_register_usage): Delete. * config/mips/mips.c (mips_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mmix/mmix.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mmix/mmix-protos.h (mmix_conditional_register_usage): Delete. * config/mmix/mmix.c (mmix_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/mn10300/mn10300.c (mn10300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pa/pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pa/pa64-regs.h (CONDITIONAL_REGISTER_USAGE): ...with this... * config/pa/pa.c (pa_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pdp11/pdp11.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pdp11/pdp11.c (pdp11_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rs6000/rs6000-protos.h (rs6000_conditional_register_usage): Delete. * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rx/rx.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rx/rx-protos.h (rx_conditional_register_usage): Delete. * config/rx/rx.c (rx_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/s390/s390-protos.h (s390_conditional_register_usage): Delete. * config/s390/s390.c (s390_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/score/score.c (score_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sh/sh.c (sh_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sparc/sparc.c (sparc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/spu/spu.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/spu/spu-protos.h (spu_conditional_register_usage): Delete. * config/spu/spu.c (spu_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/v850/v850.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/v850/v850.c (v850_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. From-SVN: r167020
2010-11-22 02:57:50 +01:00
/* On the Alpha, we use this to disable the floating-point registers
when they don't exist. */
static void
alpha_conditional_register_usage (void)
{
int i;
if (! TARGET_FPREGS)
for (i = 32; i < 63; i++)
fixed_regs[i] = call_used_regs[i] = 1;
}
/* Initialize the GCC target structure. */
#if TARGET_ABI_OPEN_VMS
# undef TARGET_ATTRIBUTE_TABLE
# define TARGET_ATTRIBUTE_TABLE vms_attribute_table
hooks.h (hook_bool_const_int_const_int_true): Declare. * hooks.h (hook_bool_const_int_const_int_true): Declare. * hooks.c (hook_bool_const_int_const_int_true): New function. * target.h (struct gcc_target): Add can_eliminate field. * target-def.h (TARGET_CAN_ELIMINATE): Define. (TARGET_INITIALIZER): Use TARGET_CAN_ELIMINATE. * ira.c (setup_eliminable_regset): Use can_eliminate target hook. * reload1.c (update_eliminables, init_elim_table): (Ditto.). (elim_table): Revise comment. * system.h (CAN_ELIMINATE): Poison. * defaults.h (CAN_ELIMINATE): Remove. * doc/tm.texi (CAN_ELIMINATE): Revise documentation. * config/alpha/vms.h (CAN_ELIMINATE): Remove macro. * config/alpha/alpha.c (TARGET_CAN_ELIMINATE) [TARGET_ABI_OPEN_VMS]: Define macro. (alpha_vms_can_eliminate): Declare as static, change return type to bool. * config/alpha/alpha-protos.h (alpha_vms_can_eliminate): Remove. * config/arm/arm.h (CAN_ELIMINATE): Remove macro. * config/arm/arm.c (TARGET_CAN_ELIMINATE): Define macro. (arm_can_eliminate): New function. * config/avr/avr.h (CAN_ELIMINATE): Remove macro. * config/avr/avr.c (TARGET_CAN_ELIMINATE): Define macro. (avr_can_eliminate): Declare as static. * config/avr/avr-protos.h (avr_can_eliminate): Remove. * config/bfin/bfin.h (CAN_ELIMINATE): Remove macro. * config/bfin/bfin.c (TARGET_CAN_ELIMINATE): Define macro. (bfin_can_eliminate): New function. * config/crx/crx.h (CAN_ELIMINATE): Remove macro. * config/crx/crx.c (TARGET_CAN_ELIMINATE): Define macro. (crx_can_eliminate): New function. * config/fr30/fr30.h (CAN_ELIMINATE): Remove macro. * config/fr30/fr30.c (TARGET_CAN_ELIMINATE): Define macro. (fr30_can_eliminate): New function. * config/frv/frv.h (CAN_ELIMINATE): Remove macro. * config/frv/frv.c (TARGET_CAN_ELIMINATE): Define macro. (frv_can_eliminate): New function. * config/h8300/h8300.h (CAN_ELIMINATE): Remove macro. * config/h8300/h8300.c (TARGET_CAN_ELIMINATE): Define macro. (h8300_can_eliminate): New function. * config/i386/i386.h (CAN_ELIMINATE): Remove macro. * config/i386/i386.c (TARGET_CAN_ELIMINATE): Define macro. (i386_can_eliminate): Declare as static, change return type to bool. * config/i386/i386-protos.h (i386_can_eliminate): Remove. * config/ia64/ia64.h (CAN_ELIMINATE): Remove macro. * config/ia64/ia64.c (TARGET_CAN_ELIMINATE): Define macro. (ia64_can_eliminate): New function. * config/iq2000/iq2000.h (CAN_ELIMINATE): Remove macro. * config/iq2000/iq2000.c (TARGET_CAN_ELIMINATE): Define macro. (iq2000_can_eliminate): New function. * config/m32r/m32r.h (CAN_ELIMINATE): Remove macro. * config/m32r/m32r.c (TARGET_CAN_ELIMINATE): Define macro. (m32r_can_eliminate): New function. * config/m68hc11/m68hc11.h (CAN_ELIMINATE): Remove macro. * config/m68hc11/m68hc11.c (TARGET_CAN_ELIMINATE): Define macro. (m68hc11_can_eliminate): New function. * config/m68k/m68k.h (CAN_ELIMINATE): Remove macro. * config/m68k/m68k.c (TARGET_CAN_ELIMINATE): Define macro. (m68k_can_eliminate): New function. * config/mep/mep.h (CAN_ELIMINATE): Remove macro. * config/mep/mep.c (TARGET_CAN_ELIMINATE): Define macro. (mep_can_eliminate): New function. * config/mips/mips.h (CAN_ELIMINATE): Remove macro. * config/mips/mips.c (TARGET_CAN_ELIMINATE): Define macro. (mips_can_eliminate): New function. * config/rs6000/rs6000.h (CAN_ELIMINATE): Remove macro. * config/rs6000/rs6000.c (TARGET_CAN_ELIMINATE): Define macro. (rs6000_can_eliminate): New function. * config/s390/s390.h (CAN_ELIMINATE): Remove macro. * config/s390/s390.c (TARGET_CAN_ELIMINATE): Define macro. (s390_can_eliminate): Declare as static. * config/s390/s390-protos.h (sparc_can_eliminate): Remove. * config/score/score.h (CAN_ELIMINATE): Remove macro. * config/score/score.c (TARGET_CAN_ELIMINATE): Define macro. (score_can_eliminate): New function. * config/sparc/sparc.h (CAN_ELIMINATE): Remove macro. * config/sparc/sparc.c (TARGET_CAN_ELIMINATE): Define macro. (sparc_can_eliminate): Declare as static. * config/sparc/sparc-protos.h (sparc_can_eliminate): Remove. * config/stormy16/stormy16.h (CAN_ELIMINATE): Remove macro. * config/stormy16/stormy16.c (TARGET_CAN_ELIMINATE): Define macro. (xstormy16_can_eliminate): New function. * config/v850/v850.h (CAN_ELIMINATE): Remove macro. * config/v850/v850.c (TARGET_CAN_ELIMINATE): Define macro. (v850_can_eliminate): New function. From-SVN: r151096
2009-08-25 23:09:00 +02:00
# undef TARGET_CAN_ELIMINATE
# define TARGET_CAN_ELIMINATE alpha_vms_can_eliminate
#endif
#undef TARGET_IN_SMALL_DATA_P
#define TARGET_IN_SMALL_DATA_P alpha_in_small_data_p
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
#undef TARGET_ASM_ALIGNED_DI_OP
#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t"
/* Default unaligned ops are provided for ELF systems. To get unaligned
data for non-ELF systems, we have to turn off auto alignment. */
#if !defined (OBJECT_FORMAT_ELF) || TARGET_ABI_OPEN_VMS
#undef TARGET_ASM_UNALIGNED_HI_OP
#define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.word\t"
#undef TARGET_ASM_UNALIGNED_SI_OP
#define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.long\t"
#undef TARGET_ASM_UNALIGNED_DI_OP
#define TARGET_ASM_UNALIGNED_DI_OP "\t.align 0\n\t.quad\t"
#endif
#ifdef OBJECT_FORMAT_ELF
re PR target/26090 (IA-64 creates DT_TEXTREL binaries) PR target/26090 * target.h (targetm.asm.out.reloc_rw_mask): New. * target-def.h (TARGET_ASM_RELOC_RW_MASK): New. (TARGET_ASM_OUT): Use it. * targhooks.c, targhooks.h (default_reloc_rw_mask): New. * varasm.c (categorize_decl_for_section): Remove shlib argument; use the new reloc_rw_mask target hook instead. (default_section_type_flags_1): Merge into... (default_section_type_flags): ... here. (decl_readonly_section_1): Merge into... (decl_readonly_section): ... here. (default_elf_select_section_1): Merge into... (default_elf_select_section): ... here. (default_unique_section_1): Merge into... (default_unique_section): ... here. (compute_reloc_for_rtx_1, compute_reloc_for_rtx): New. (default_select_rtx_section): Use it. (default_elf_select_rtx_section): Likewise. * output.h: Update to match. * doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New. * config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New. (TARGET_ASM_RELOC_RW_MASK): New. * config/i386/i386.c (x86_64_elf_select_section): Adjust call to categorize_decl_for_section. (x86_64_elf_unique_section): Likewise. * config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove. (TARGET_ASM_RELOC_RW_MASK): New. * config/ia64/ia64.c (ia64_rwreloc_select_section, ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove. (ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New. (TARGET_RWRELOC): Remove. (ia64_section_type_flags): Adjust call to default_section_type_flags. * config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove. (rs6000_elf_select_section, rs6000_elf_unique_section): Remove. (rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New. (rs6000_xcoff_select_section): Use decl_readonly_section. (rs6000_xcoff_section_type_flags): Use default_section_type_flags. * config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove. (TARGET_SECTION_TYPE_FLAGS): Remove. * config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New. From-SVN: r122781
2007-03-10 01:53:09 +01:00
#undef TARGET_ASM_RELOC_RW_MASK
#define TARGET_ASM_RELOC_RW_MASK alpha_elf_reloc_rw_mask
#undef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION alpha_elf_select_rtx_section
#undef TARGET_SECTION_TYPE_FLAGS
#define TARGET_SECTION_TYPE_FLAGS alpha_elf_section_type_flags
#endif
#undef TARGET_ASM_FUNCTION_END_PROLOGUE
#define TARGET_ASM_FUNCTION_END_PROLOGUE alpha_output_function_end_prologue
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
#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS alpha_init_libfuncs
tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. 2009-05-04 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete. * gcc/explow.c (memory_address): Use target hook. * gcc/targhooks.c (default_legitimize_address): New. * gcc/targhooks.h (default_legitimize_address): New. * gcc/target.h (legitimize_address): New. * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New. (TARGET_INITIALIZER): Include it. * gcc/system.h (LEGITIMIZE_ADDRESS): Poison. * config/bfin/bfin-protos.h (legitimize_address): Remove. * config/bfin/bfin.c (legitimize_address): Remove. * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove. * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390-protos.h (legitimize_address): Delete. * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete. * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete. * gcc/config/i386/i386-protos.h (legitimize_address): Delete. * gcc/config/avr/avr-protos.h (legitimize_address): Delete. * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete. * gcc/config/score/score-protos.h (score_legitimize_address): Delete. * gcc/config/arm/arm-protos.h (arm_legitimize_address, (thumb_legitimize_address): Delete. * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete. * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete. * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete. * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete. * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete. * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete. * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete. * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version. * config/m32c/m32c.c (m32c_legitimize_address): Standardize. * config/m32r/m32r.c (m32r_legitimize_address): New. * config/m68k/m68k.c (m68k_legitimize_address): New. * config/score/score.c (score_legitimize_address): Standardize. * config/score/score3.c (score3_legitimize_address): Standardize. * config/score/score3.h (score3_legitimize_address): Adjust. * config/score/score7.c (score7_legitimize_address): Standardize. * config/score/score7.h (score7_legitimize_address): Adjust. * config/sh/sh.c (sh_legitimize_address): New. * config/iq2000/iq2000.c (iq2000_legitimize_address): New. * gcc/config/s390/s390.c (legitimize_address): Rename to... (s390_legitimize_address): ... this. * gcc/config/sparc/sparc.c (legitimize_address): Rename to... (sparc_legitimize_address): ... this. * gcc/config/i386/i386.c (legitimize_address): Rename to... (ix86_legitimize_address): ... this. * gcc/config/avr/avr.c (legitimize_address): Rename to... (avr_legitimize_address): ... this. * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to... (mn10300_legitimize_address): ... this. * config/alpha/alpha.c (alpha_legitimize_address): Wrap... (alpha_legitimize_address_1): ... the old alpha_legitimize_address. (alpha_expand_mov): Adjust call. * config/frv/frv.c (frv_legitimize_address): Return x on failure. * config/spu/spu.c (spu_legitimize_address): Likewise. * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. From-SVN: r147098
2009-05-04 14:52:41 +02:00
#undef TARGET_LEGITIMIZE_ADDRESS
#define TARGET_LEGITIMIZE_ADDRESS alpha_legitimize_address
target.h (asm_out.file_start, [...]): New hooks. * target.h (asm_out.file_start, file_start_app_off, file_start_file_directive): New hooks. * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): New hook-definition macros. * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. * varasm.c (default_file_start): New. * output.h: Prototype it. * toplev.c (init_asm_output): Use targetm.asm_out.file_start. * system.h: Poison ASM_FILE_START. * config/alpha/alpha.c (alpha_write_verstamp): Delete. (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. (unicosmk_asm_file_start): Rename unicosmk_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in comment. * config/arc/arc.c (arc_asm_file_start): Rename arc_file_start, take no arguments, make static. (TARGET_ASM_FILE_START): Set it. * config/arm/arm.c (aof_file_start): New static function. (TARGET_ASM_FILE_START): Set it, when appropriate. * config/arm/coff.h, config/arm/elf.h: Set TARGET_ASM_FILE_START_APP_OFF to true. * config/avr/avr.c (asm_file_start): Rename avr_file_start, take no arguments, make static. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/c4x/c4x.c (c4x_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set them. * config/cris/cris.c (cris_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename dsp16xx_file_start, make static. (luxworks_dsp16xx_file_start): Delete. (TARGET_ASM_FILE_START): Set it. * config/h8300/h8300.c (asm_file_start): Rename h8300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/i370/i370.c (i370_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.c (x86_file_start): New static function. (TARGET_ASM_FILE_START): Set it. * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, X86_FILE_START_FLTUSED): New macros, default to false. * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. * config/i386/sysv4.h, config/i386/sco5.h: Override X86_FILE_START_VERSION_DIRECTIVE to true. * config/ia64/ia64.c (ia64_file_start): New static function. (TARGET_ASM_FILE_START): Set it. (emit_safe_across_calls): Take no arguments. * config/ia64/ia64.md: Update to match. * config/m32r/m32r.c (m32r_asm_file_start): Rename m32r_file_start, make static, take no arguments. (TARGET_ASM_FILE_START): Set it. * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename m68hc11_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. (print_options): Delete. * config/m68k/m68k.c (m68k_hp320_file_start): New static function. (TARGET_ASM_FILE_START_APP_OFF): Set. * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to m68k_hp320_file_start. * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): Make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mmix/mmix.c (mmix_asm_file_start): Rename mmix_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/mn10300/mn10300.c (asm_file_start): Rename mn10300_file_start, make static, take no arguments. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. * config/pa/pa.c (pa_file_start_level, pa_file_start_space, pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, pa_hpux64_hpas_file_start): New static functions. * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to pa_linux_file_start. * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as appropriate. * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. (rs6000_file_start): Make static, take no arguments. Reset default_cpu under certain conditions. (rs6000_xcoff_file_start): New function. * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. * config/sh/sh.c (output_file_start): Rename sh_file_start, make static, take no arguments. Merge in old code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/sh/sh.c (TARGET_ELF): Define to 0. * config/sh/elf.h (TARGET_ELF): Redefine to 1. * config/v850/v850.c (asm_file_start): Delete. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. * config/vax/vax.c (vax_file_start): New static function. (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h * config/i386/att.h, config/i386/gas.h, config/i386/linux.h * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. * config/darwin.h, config/elfos.h, config/alpha/elf.h * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h * config/i370/i370.h, config/i386/att.h, config/i386/gas.h * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. * config/alpha/alpha-protos.h, config/arc/arc-protos.h * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h * config/mips/mips-protos.h, config/mmix/mmix-protos.h * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: Remove reference to ASM_FILE_START in comment. * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h * config/arm/linux-gas.h, config/arm/netbsd-elf.h * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. From-SVN: r68229
2003-06-19 23:47:26 +02:00
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START alpha_file_start
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
#undef TARGET_SCHED_ADJUST_COST
#define TARGET_SCHED_ADJUST_COST alpha_adjust_cost
#undef TARGET_SCHED_ISSUE_RATE
#define TARGET_SCHED_ISSUE_RATE alpha_issue_rate
#undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD
#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \
alpha_multipass_dfa_lookahead
#undef TARGET_HAVE_TLS
#define TARGET_HAVE_TLS HAVE_AS_TLS
#undef TARGET_BUILTIN_DECL
#define TARGET_BUILTIN_DECL alpha_builtin_decl
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS alpha_init_builtins
#undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN alpha_expand_builtin
#undef TARGET_FOLD_BUILTIN
#define TARGET_FOLD_BUILTIN alpha_fold_builtin
#undef TARGET_FUNCTION_OK_FOR_SIBCALL
#define TARGET_FUNCTION_OK_FOR_SIBCALL alpha_function_ok_for_sibcall
#undef TARGET_CANNOT_COPY_INSN_P
#define TARGET_CANNOT_COPY_INSN_P alpha_cannot_copy_insn_p
target.def (legitimate_constant_p): New hook. gcc/ * target.def (legitimate_constant_p): New hook. * doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with... (TARGET_LEGITIMATE_CONSTANT_P): ...this. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_true): Declare. * hooks.c (hook_bool_mode_rtx_true): Define. * system.h (LEGITIMATE_CONSTANT_P): Poison. * calls.c (precompute_register_parameters): Replace uses of LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p. (emit_library_call_value_1): Likewise. * expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn) (compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise. * ira-costs.c (scan_one_insn): Likewise. * recog.c (general_operand, immediate_operand): Likewise. * reload.c (find_reloads_toplev, find_reloads_address_part): Likewise. * reload1.c (init_eliminable_invariants): Likewise. * config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a mode argument. * config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete. * config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/alpha/predicates.md (input_operand): Update call to alpha_legitimate_constant_p. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete. * config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise. (THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise. * config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (arm_legitimate_constant_p_1, thumb_legitimate_constant_p) (arm_legitimate_constant_p): New functions. (arm_cannot_force_const_mem): Make static. * config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete. * config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p instead of bfin_legitimate_constant_p. (bfin_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete. * config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_constant_p): Delete. * config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (frv_legitimate_constant_p): Make static. Add a mode argument. * config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete. * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise. * config/i386/i386-protos.h (legitimate_constant_p): Delete. * config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise. * config/i386/i386.c (legitimate_constant_p): Rename to... (ix86_legitimate_constant_p): ...this. Make static. Add a mode argument. (ix86_cannot_force_const_mem): Update accordingly. (ix86_legitimate_address_p): Likewise. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/i386/i386.md: Update commentary. * config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete. * config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise. * config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (ia64_legitimate_constant_p): Make static. Add a mode argument. * config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete. * config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete. * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise. * config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (lm32_legitimate_constant_p): Make static. Add a mode argument. * config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete. * config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise. * config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise. * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete. * config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (m32r_legitimate_constant_p): New function. * config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare. * config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of LEGITIMATE_CONSTANT_P. (LEGITIMATE_CONSTANT_P): Delete. * config/m68k/m68k.c (m68k_expand_prologue): Call m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P. (m68k_legitimate_constant_p): New function. * config/m68k/m68k.md: Update comments. * config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete. * config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mcore_legitimate_constant_p): New function. * config/mep/mep-protos.h (mep_legitimate_constant_p): Delete. * config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mep/mep.c (mep_legitimate_constant_p): Make static. Add a mode argument. (mep_legitimate_address): Update accordingly. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/microblaze/microblaze-protos.h (microblaze_const_double_ok): Delete. * config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise. * config/microblaze/microblaze.c (microblaze_const_double_ok): Make static. Check OP's mode for VOIDmode. (microblaze_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete. * config/mips/mips.c (mips_legitimate_constant_p): New function. (mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/predicates.md: Update comments. * config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete. * config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mmix_legitimate_constant_p): Make static, return a bool, and take a mode argument. (mmix_print_operand_address): Update accordingly. * config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p): Delete. * config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mn10300/mn10300.c (mn10300_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pa_legitimate_constant_p): New function. * config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pdp11_legitimate_constant_p): New function. * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (rs6000_legitimate_constant_p): New function. * config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. * config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete. * config/rx/rx.c (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/rx/rx.md (mov<register_modes:mode>): Update accordingly. * config/s390/s390-protos.h (legitimate_constant_p): Delete. * config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise. * config/s390/s390.c (legitimate_constant_p): Rename to... (s390_legitimate_constant_p): ...this. Make static, return a bool, and add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/score/score.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (sh_legitimate_constant_p): New function. * config/sparc/sparc-protos.h (legitimate_constant_p): Delete. * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete. * config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (legitimate_constant_p): Rename to... (sparc_legitimate_constant_p): ...this. Make static. Add a mode argument. (constant_address_p): Update accordingly. * config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode argument and return a bool. * config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete. * config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (spu_legitimate_constant_p): Add a mode argument and return a bool. (spu_rtx_costs): Update accordingly. * config/spu/predicates.md (vec_imm_operand): Likewise. * config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.c (v850_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/vax/vax-protos.h (legitimate_constant_p): Delete. * config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise. * config/vax/vax.c (legitimate_constant_p): Likewise. * config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete. * config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (xtensa_legitimate_constant_p): New function. From-SVN: r172814
2011-04-21 11:38:43 +02:00
#undef TARGET_LEGITIMATE_CONSTANT_P
#define TARGET_LEGITIMATE_CONSTANT_P alpha_legitimate_constant_p
#undef TARGET_CANNOT_FORCE_CONST_MEM
#define TARGET_CANNOT_FORCE_CONST_MEM alpha_cannot_force_const_mem
#if TARGET_ABI_OSF
#undef TARGET_ASM_OUTPUT_MI_THUNK
#define TARGET_ASM_OUTPUT_MI_THUNK alpha_output_mi_thunk_osf
#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
#define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_const_tree_hwi_hwi_const_tree_true
#undef TARGET_STDARG_OPTIMIZE_HOOK
#define TARGET_STDARG_OPTIMIZE_HOOK alpha_stdarg_optimize_hook
#endif
/* Use 16-bits anchor. */
#undef TARGET_MIN_ANCHOR_OFFSET
#define TARGET_MIN_ANCHOR_OFFSET -0x7fff - 1
#undef TARGET_MAX_ANCHOR_OFFSET
#define TARGET_MAX_ANCHOR_OFFSET 0x7fff
#undef TARGET_USE_BLOCKS_FOR_CONSTANT_P
#define TARGET_USE_BLOCKS_FOR_CONSTANT_P hook_bool_mode_const_rtx_true
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS alpha_rtx_costs
#undef TARGET_ADDRESS_COST
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
#define TARGET_ADDRESS_COST hook_int_rtx_bool_0
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG alpha_reorg
expr.c (store_constructor): Use promote_decl_mode. 2009-04-17 Paolo Bonzini <bonzini@gnu.org> * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * explow.c (promote_function_mode): Just call the target hook. * targhooks.c (default_promote_function_mode, default_promote_function_mode_always_promote): New. * targhooks.h (default_promote_function_mode, default_promote_function_mode_always_promote): Declare. * target.h (promote_function_args, promote_function_return): Remove. (promote_function_mode): New. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): New. (TARGET_CALLS): Adjust. * system.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison. * config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move... * config/s390/s390.c (s390_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move... * config/sparc/sparc.c (sparc_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sh/sh-protos.h (sh_promote_function_mode): New. * config/sh/sh.c (sh_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move... * config/cris/cris.c (cris_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move... * config/mmix/mmix.c (mmix_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move... * config/arm/arm.c (arm_promote_function_mode): ... here, without complex type handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/pa/pa.c (pa_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): Define equivalently. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/picochip/picochip.c: Likewise. * config/arc/arc.c: Likewise. * config/mcore/mcore.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * config/ia64/ia64.c: Likewise (disabled though). * config/frv/frv.h: Remove pointless remark. * doc/tm.texi (PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into... (TARGET_PROMOTE_FUNCTION_MODE): ... this. From-SVN: r150336
2009-08-02 00:03:34 +02:00
#undef TARGET_PROMOTE_FUNCTION_MODE
#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
#undef TARGET_PROMOTE_PROTOTYPES
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_false
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY alpha_return_in_memory
target.h (struct gcc_target): Add calls.pass_by_reference. * target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
2004-07-14 08:24:27 +02:00
#undef TARGET_PASS_BY_REFERENCE
#define TARGET_PASS_BY_REFERENCE alpha_pass_by_reference
#undef TARGET_SETUP_INCOMING_VARARGS
#define TARGET_SETUP_INCOMING_VARARGS alpha_setup_incoming_varargs
#undef TARGET_STRICT_ARGUMENT_NAMING
#define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_true
#undef TARGET_PRETEND_OUTGOING_VARARGS_NAMED
#define TARGET_PRETEND_OUTGOING_VARARGS_NAMED hook_bool_CUMULATIVE_ARGS_true
#undef TARGET_SPLIT_COMPLEX_ARG
#define TARGET_SPLIT_COMPLEX_ARG alpha_split_complex_arg
#undef TARGET_GIMPLIFY_VA_ARG_EXPR
#define TARGET_GIMPLIFY_VA_ARG_EXPR alpha_gimplify_va_arg
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
#undef TARGET_ARG_PARTIAL_BYTES
#define TARGET_ARG_PARTIAL_BYTES alpha_arg_partial_bytes
#undef TARGET_FUNCTION_ARG
#define TARGET_FUNCTION_ARG alpha_function_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE alpha_function_arg_advance
#undef TARGET_TRAMPOLINE_INIT
#define TARGET_TRAMPOLINE_INIT alpha_trampoline_init
#undef TARGET_INSTANTIATE_DECLS
#define TARGET_INSTANTIATE_DECLS alpha_instantiate_decls
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD alpha_secondary_reload
#undef TARGET_SCALAR_MODE_SUPPORTED_P
#define TARGET_SCALAR_MODE_SUPPORTED_P alpha_scalar_mode_supported_p
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P alpha_vector_mode_supported_p
#undef TARGET_BUILD_BUILTIN_VA_LIST
#define TARGET_BUILD_BUILTIN_VA_LIST alpha_build_builtin_va_list
re PR middle-end/20983 (varargs functions force va_list variable to stack unnecessarily) PR middle-end/20983 * tree-ssa-ccp.c (optimize_stdarg_builtin): New function. (execute_fold_all_builtins): Call it for BUILT_IN_VA_START, BUILT_IN_VA_COPY and BUILT_IN_VA_END. * target.h (struct ggc_target): Add expand_builtin_va_start hook. * target-def.h (TARGET_EXPAND_BUILTIN_VA_START): Define. (TARGET_INITIALIZER): Add it. * builtins.c (expand_builtin_va_start): Use targetm.expand_builtin_va_start hook instead of EXPAND_BUILTIN_VA_START macro. * alpha/alpha.c (alpha_va_start): Made static. (override_options): Clear targetm.expand_builtin_va_start if TARGET_UNICOSMK. (TARGET_EXPAND_BUILTIN_VA_START): Define. * alpha/unicosmk.h (EXPAND_BUILTIN_VA_START): Remove. * alpha/alpha.h (EXPAND_BUILTIN_VA_START): Remove. * alpha/alpha-protos.h (alpha_va_start): Remove prototype. * xtensa/xtensa.h (EXPAND_BUILTIN_VA_START): Remove. * xtensa/xtensa.c (TARGET_EXPAND_BUILTIN_VA_START): Define. (xtensa_va_start): Made static. * xtensa/xtensa-protos.h (xtensa_va_start): Remove prototype. * pa/pa-protos.h (hppa_va_start): Remove prototype. * pa/pa.h (EXPAND_BUILTIN_VA_START): Remove. * pa/pa.c (hppa_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * frv/frv.c (frv_expand_builtin_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * frv/frv-protos.h (frv_expand_builtin_va_start): Remove prototype. * frv/frv.h (EXPAND_BUILTIN_VA_START): Remove. * i386/i386.c (override_options): Clear targetm.expand_builtin_va_start if -m32 or 64-bit MS ABI. (ix86_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. * i386/i386.h (EXPAND_BUILTIN_VA_START): Remove. * i386/i386-protos.h (ix86_va_start, ix86_va_arg): Remove prototypes. * iq2000/iq2000-protos.h (iq2000_va_start): Remove prototype. * iq2000/iq2000.h (EXPAND_BUILTIN_VA_START): Remove. * iq2000/iq2000.c (iq2000_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * rs6000/rs6000-protos.h (rs6000_va_start): Remove prototype. * rs6000/rs6000.c (rs6000_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. (rs6000_override_options): Clear targetm.expand_builtin_va_start if DEFAULT_ABI != ABI_V4. * rs6000/rs6000.h (EXPAND_BUILTIN_VA_START): Remove. * spu/spu.c (spu_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * spu/spu.h (EXPAND_BUILTIN_VA_START): Remove. * spu/spu-protos.h spu_va_start): Remove prototype. * stormy16/stormy16.h (EXPAND_BUILTIN_VA_START): Remove. * stormy16/stormy16-protos.h (xstormy16_expand_builtin_va_start): Remove prototype. * stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. * s390/s390-protos.h (s390_va_start): Remove prototype. * s390/s390.c (s390_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. * s390/s390.h (EXPAND_BUILTIN_VA_START): Remove. * mn10300/mn10300.h (EXPAND_BUILTIN_VA_START): Remove. * mn10300/mn10300-protos.h (mn10300_va_start): Remove prototype. * mn10300/mn10300.c (mn10300_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * arc/arc.c (arc_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * arc/arc.h (EXPAND_BUILTIN_VA_START): Remove. * arc/arc-protos.h (arc_va_start): Remove prototype. * mt/mt-protos.h (mt_va_start): Remove prototype. * sparc/sparc.c (sparc_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * sparc/sparc-protos.h (sparc_va_start): Remove prototype. * sparc/sparc.h (EXPAND_BUILTIN_VA_START): Remove. * sh/sh.c (sh_va_start): Made static, add prototype. (TARGET_EXPAND_BUILTIN_VA_START): Define. * sh/sh-protos.h (sh_va_start): Remove prototype. * sh/sh.h (EXPAND_BUILTIN_VA_START): Remove. * mips/mips-protos.h (mips_va_start): Remove prototype. * mips/mips.h (EXPAND_BUILTIN_VA_START): Remove. * mips/mips.c (mips_va_start): Made static. (TARGET_EXPAND_BUILTIN_VA_START): Define. From-SVN: r130650
2007-12-06 14:25:37 +01:00
#undef TARGET_EXPAND_BUILTIN_VA_START
#define TARGET_EXPAND_BUILTIN_VA_START alpha_va_start
Add memory barriers to the double-checked locking used for static initialization. libstdc++: Add memory barriers to the double-checked locking used for static initialization. * libsupc++/guard.cc (__test_and_acquire): Define default. (_GLIBCXX_GUARD_TEST_AND_ACQUIRE, __set_and_release) (_GLIBCXX_GUARD_SET_AND_RELEASE): Likewise. (recursion_push, recursion_pop): New abstraction functions. (__cxa_guard_acquire): Use _GLIBCXX_GUARD_TEST_AND_ACQUIRE. (__cxa_guard_release): Use _GLIBCXX_GUARD_SET_AND_RELEASE. * config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST): Rename from _GLIBCXX_GUARD_ACQUIRE and reverse sense. (_GLIBCXX_GUARD_SET): Rename from _GLIBCXX_GUARD_RELEASE. * config/cpu/arm/cxxabi_tweaks.h: Likewise. * config/cpu/alpha/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER) (_GLIBCXX_WRITE_MEM_BARRIER): Define. * config/cpu/powerpc/atomic_word.h: Likewise. * config/cpu/sparc/atomic_word.h: Likewise. * config/cpu/generic/atomic_word.h: Define them, commented out. * include/bits/atomicity.h: Define defaults. * config/cpu/ia64/atomic_word.h (__test_and_acquire) (__set_and_release): New inlines. (_GLIBCXX_GUARD_TEST_AND_ACQUIRE): Define. (_GLIBCXX_GUARD_SET_AND_RELEASE): Define. * libsupc++/guard.cc (acquire_1): Use __builtin_trap instead of abort(); gcc: * doc/tm.texi (TARGET_RELAXED_ORDERING): Document. * target.h (struct gcc_target): Add relaxed_ordering field. * target-def.h (TARGET_RELAXED_ORDERING): Define default. (TARGET_INITIALIZER): Add it. * config/alpha/alpha.c (TARGET_RELAXED_ORDERING): Define. * config/ia64/ia64.c (TARGET_RELAXED_ORDERING): Define. * config/rs6000/rs6000.c (TARGET_RELAXED_ORDERING): Define. * config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Define. * cp/decl.c (expand_static_init): Don't use shortcut if targetm.relaxed_ordering. From-SVN: r92659
2004-12-28 05:36:54 +01:00
/* The Alpha architecture does not require sequential consistency. See
http://www.cs.umd.edu/~pugh/java/memoryModel/AlphaReordering.html
for an example of how it can be violated in practice. */
#undef TARGET_RELAXED_ORDERING
#define TARGET_RELAXED_ORDERING true
tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. * doc/tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. (C_COMMON_OVERRIDE_OPTIONS): Don't refer to OVERRIDE_OPTIONS. * doc/tm.texi: Regenerate. * system.h (OVERRIDE_OPTIONS): Poison. * target.def (override): Default to hook_void_void. * targhooks.c (default_target_option_override): Remove. * genmodes.c, machmode.def: Update comments mentioning OVERRIDE_OPTIONS. * config/alpha/alpha-modes.def: Update comment mentioning alpha_override_options. * config/alpha/alpha-protos.h (override_options): Remove. * config/alpha/alpha.c (override_options): Rename to alpha_option_override. Call SUBTARGET_OVERRIDE_OPTIONS. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/alpha/alpha.h (OVERRIDE_OPTIONS): Remove. * config/alpha/vms.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/arc/arc-protos.h (arc_init): Remove. * config/arc/arc.c (TARGET_OPTION_OVERRIDE): Define. (arc_init): Rename to arc_option_override. Make static. * config/arc/arc.h (ARC_EXTENSION_CPU): Correct comment. (OVERRIDE_OPTIONS): Remove. * config/arm/arm-protos.h (arm_override_options): Remove. * config/arm/arm.c (TARGET_OPTION_OVERRIDE): Define. (arm_override_options): Rename to arm_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/arm/arm.h (OVERRIDE_OPTIONS): Remove. * config/arm/arm.md: Update comment referring to arm_override_options. * config/arm/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/avr/avr-protos.h (avr_override_options): Remove. * config/avr/avr.c (TARGET_OPTION_OVERRIDE): Define. (avr_override_options): Rename to avr_option_override. Make static. * config/avr/avr.h (OVERRIDE_OPTIONS): Remove. * config/bfin/bfin-protos.h (override_options): Remove (twice). * config/bfin/bfin.c (override_options): Rename to bfin_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/bfin/bfin.h (OVERRIDE_OPTIONS): Remove. * config/cris/cris-protos.h (cris_override_options): Remove. * config/cris/cris.c (TARGET_OPTION_OVERRIDE): Define. (cris_override_options): Rename to cris_option_override. Make static. * config/cris/cris.h (OVERRIDE_OPTIONS): Remove. * config/frv/frv-protos.h (frv_override_options): Remove. * config/frv/frv.c (TARGET_OPTION_OVERRIDE): Define. (frv_override_options): Rename to frv_option_override. Make static. * config/frv/frv.h (OVERRIDE_OPTIONS): Remove. * config/h8300/h8300-protos.h (h8300_init_once): Remove. * config/h8300/h8300.c (h8300_init_once): Rename to h8300_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/h8300/h8300.h (OVERRIDE_OPTIONS): Remove. * config/i386/i386-protos.h (override_options): Remove. * config/i386/i386.c (override_options): Rename to ix86_option_override_internal. Make static. Comments referring to this function and callers changed. (ix86_option_override): New. (TARGET_OPTION_OVERRIDE): Define. * config/i386/i386.h (OVERRIDE_OPTION): Remove. * config/i386/linux64.h (DEFAULT_PCC_STRUCT_RETURN): Update comment. * config/ia64/ia64.c (ia64_file_start): Update comment referring to ia64_override_options. * config/iq2000/iq2000-protos.h (override_options): Remove. * config/iq2000/iq2000.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to iq2000_option_override. Make static. * config/iq2000/iq2000.h (OVERRIDE_OPTIONS): Remove. * config/lm32/lm32-protos.h (lm32_override_options): Remove. * config/lm32/lm32.c (TARGET_OPTION_OVERRIDE): Define. (lm32_override_options): Rename to lm32_option_override. Make static. * config/lm32/lm32.h (OVERRIDE_OPTIONS): Remove. * config/m32r/m32r.c (TARGET_OPTION_OVERRIDE): Define. (m32r_option_override): New. (m32r_init): Update comment. * config/m32r/m32r.h (OVERRIDE_OPTIONS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_override_options): Remove. * config/m68hc11/m68hc11.c (TARGET_OPTION_OVERRIDE): Define. (m68hc11_override_options): Rename to m68hc11_option_override. Make static. Return void. * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove. * config/m68k/m68k-protos.h (override_options): Remove. * config/m68k/m68k.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to m68k_option_override. Make static. * config/m68k/m68k.h (OVERRIDE_OPTIONS): Remove. * config/mcore/mcore-protos.h (mcore_override_options): Remove. * config/mcore/mcore.c (TARGET_OPTION_OVERRIDE): Define. (mcore_override_options): Rename to mcore_option_override. Make static. * config/mcore/mcore.h (OVERRIDE_OPTIONS): Remove. * config/mep/mep-protos.h (mep_override_options): Remove. * config/mep/mep.c (TARGET_OPTION_OVERRIDE): Define. (mep_override_options): Rename to mep_option_override. Make static. * config/mep/mep.h (OVERRIDE_OPTIONS): Remove. * config/mmix/mmix-protos.h (mmix_override_options): Remove. * config/mmix/mmix.c (TARGET_OPTION_OVERRIDE): Define. (mmix_override_options): Rename to mmix_option_override. Make static. * config/mmix/mmix.h (OVERRIDE_OPTIONS): Remove. * config/mn10300/mn10300-protos.h (mn10300_override_options): Remove. * config/mn10300/mn10300.c (TARGET_OPTION_OVERRIDE): Define. (mn10300_override_options): Rename to mn10300_option_override. Make static. * config/mn10300/mn10300.h (OVERRIDE_OPTIONS): Remove. * config/moxie/moxie-protos.h (moxie_override_options): Remove. * config/moxie/moxie.c (moxie_override_options): Rename to moxie_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/moxie/moxie.h (OVERRIDE_OPTIONS): Remove. * config/picochip/picochip-protos.h (picochip_override_options): Remove. Update comment referring to picochip_override_options. * config/picochip/picochip.c (TARGET_OPTION_OVERRIDE): Define. (picochip_override_options): Rename to picochip_option_override. Make static. Update comment and definition of TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. * config/picochip/picochip.h (OVERRIDE_OPTIONS): Remove. * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/linux64.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/rs6000-modes.def: Update comment referring to rs6000_override_options. * config/rs6000/rs6000-protos.h (rs6000_override_options): Remove. * config/rs6000/rs6000.c (TARGET_OPTION_OVERRIDE): Define. (rs6000_override_options): Rename to rs6000_option_override_internal. Make static. Commented referring to rs6000_override_options and OVERRIDE_OPTIONS updated. (rs6000_option_override): New. * config/rs6000/rs6000.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/s390/s390-protos.h (override_options): Remove. * config/s390/s390.c (override_options): Rename to s390_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/s390/s390.h (OVERRIDE_OPTIONS): Remove. * config/score/score-protos.h (score_override_options): Remove. * config/score/score.c (TARGET_OPTION_OVERRIDE): Define. (score_override_options): Rename to score_option_override. Make static. * config/score/score.h (OVERRIDE_OPTIONS): Remove. Update comment referring to override_options. * config/score/score3.c (score3_override_options): Rename to score3_option_override. * config/score/score3.h (score3_override_options): Rename to score3_option_override. * config/score/score7.c (score7_override_options): Rename to score7_option_override. * config/score/score7.h (score7_override_options): Rename to score7_option_override. * config/sh/sh.c: Update comments referring to OVERRIDE_OPTIONS. * config/sparc/sparc.c (TARGET_OPTION_OVERRIDE): Define. (sparc_override_options): Rename to sparc_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/sparc/sparc.h (OVERRIDE_OPTIONS): Remove. * config/sparc/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/spu/spu-protos.h (spu_override_options): Remove. * config/spu/spu.c (TARGET_OPTION_OVERRIDE): Define. (spu_override_options): Rename to spu_option_override. Make static. * config/spu/spu.h (OVERRIDE_OPTIONS): Remove. * config/vax/elf.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/vax/vax-protos.h (override_options): Remove. * config/vax/vax.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to vax_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/vax/vax.h (OVERRIDE_OPTIONS): Remove. * config/vxworks.c: Update comment referring to OVERRIDE_OPTIONS. * config/vxworks.h: Update comment referring to OVERRIDE_OPTIONS. * config/xtensa/xtensa-protos.h (override_options): Remove. * config/xtensa/xtensa.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to xtensa_option_override. Make static. * config/xtensa/xtensa.h (OVERRIDE_OPTIONS): Remove. From-SVN: r164334
2010-09-16 13:59:39 +02:00
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE alpha_option_override
#ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
alpha.c (alpha_mangle_fundamental_type): Rename to... gcc/ * config/alpha/alpha.c (alpha_mangle_fundamental_type): Rename to... (alpha_mangle_type): This. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/arm/arm-protos.h (arm_mangle_type): Add prototype. * config/arm/arm.c (TARGET_MANGLE_TYPE): Define target hook. (arm_init_neon_builtins): Fix comment. (arm_mangle_map_entry): New. (arm_mangle_map): New. (arm_mangle_type): New. * config/i386/i386.c (ix86_mangle_fundamental_type): Rename to... (ix86_mangle_type): This. Use TYPE_MAIN_VARIANT and restrict mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/ia64/ia64.c (ia64_mangle_fundamental_type): Rename to... (ia64_mangle_type): This. Use TYPE_MAIN_VARIANT and restrict mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/rs6000/rs6000.c (rs6000_mangle_fundamental_type): Rename to... (rs6000_mangle_type): This. Use TYPE_MAIN_VARIANT. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/s390/s390.c (s390_mangle_fundamental_type): Rename to... (s390_mangle_type): This. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * config/sparc/sparc.c (sparc_mangle_fundamental_type): Rename to... (sparc_mangle_type): This. (TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define. (TARGET_MANGLE_TYPE): Define this instead. * cp/mangle.c (write_type): Call mangle_type target hook on all types before mangling. Use original type, not main variant, as argument. * target-def.h (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename hook to... (TARGET_MANGLE_TYPE): This. * target.h (gcc_target): Rename mangle_fundamental_type to mangle_type. * doc/tm.texi (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename section to... (TARGET_MANGLE_TYPE): This. Note slightly different semantics. Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com> From-SVN: r126917
2007-07-25 17:43:04 +02:00
#undef TARGET_MANGLE_TYPE
#define TARGET_MANGLE_TYPE alpha_mangle_type
#endif
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P alpha_legitimate_address_p
target.def (conditional_register_usage): Define. * target.def (conditional_register_usage): Define. * reginfo.c (init_reg_sets_1): Call targetm.conditional_register_usage. * system.h (CONDITIONAL_REGISTER_USAGE): Poison. * doc/tm.texi.in (CONDITIONAL_REGISTER_USAGE): Adjust language for making it a hook. * doc/tm.texi: Regenerate. * config/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/alpha/alpha.c (alpha_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arc/arc.c (arc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/arm/arm.c (arm_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/bfin/bfin.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/bfin/bfin-protos.h (conditional_register_usage): Delete. * config/bfin/bfin.c (conditional_register_usage): Move code into... (bfin_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/cris/cris.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/cris/cris-protos.h (cris_conditional_register_usage): Delete. * config/cris/cris.c (cris_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/fr30/fr30.h (FIXED_REGISTERS): Adjust comment. * config/frv/frv.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/frv/frv-protos.h (frv_conditional_register_usage): Delete. * config/frv/frv.c (frv_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/h8300/h8300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/h8300/h8300.c (h8300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/i386/i386-protos.h (ix86_conditional_register_usage): Delete. * config/i386/i386.c (ix86_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32c/m32c.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m32c/m32c-protos.h (m32c_conditional_register_usage): Delete. * config/m32c/m32c.c (m32c_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m32r/m32r.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/m32r/m32r.c (m32r_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/m68hc11/m68hc11.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_conditional_register_usage): Delete. * config/m68hc11/m68hc11.c (m68hc11_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mep/mep.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mep/mep-protos.h (mep_conditional_register_usage): Delete. * config/mep/mep.c (mep_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mips/mips-protos.h (mips_conditional_register_usage): Delete. * config/mips/mips.c (mips_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mmix/mmix.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/mmix/mmix-protos.h (mmix_conditional_register_usage): Delete. * config/mmix/mmix.c (mmix_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/mn10300/mn10300.c (mn10300_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pa/pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pa/pa64-regs.h (CONDITIONAL_REGISTER_USAGE): ...with this... * config/pa/pa.c (pa_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/pdp11/pdp11.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/pdp11/pdp11.c (pdp11_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rs6000/rs6000-protos.h (rs6000_conditional_register_usage): Delete. * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/rx/rx.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/rx/rx-protos.h (rx_conditional_register_usage): Delete. * config/rx/rx.c (rx_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/s390/s390-protos.h (s390_conditional_register_usage): Delete. * config/s390/s390.c (s390_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/score/score.c (score_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sh/sh.c (sh_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/sparc/sparc.c (sparc_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/spu/spu.h (CONDITIONAL_REGISTER_USAGE): Delete. * config/spu/spu-protos.h (spu_conditional_register_usage): Delete. * config/spu/spu.c (spu_conditional_register_usage): Make static. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. * config/v850/v850.h (CONDITIONAL_REGISTER_USAGE): Move logic... * config/v850/v850.c (v850_conditional_register_usage): ...here. New function. (TARGET_CONDITIONAL_REGISTER_USAGE): Define. From-SVN: r167020
2010-11-22 02:57:50 +01:00
#undef TARGET_CONDITIONAL_REGISTER_USAGE
#define TARGET_CONDITIONAL_REGISTER_USAGE alpha_conditional_register_usage
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-alpha.h"