aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-03-03 23:55:52 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-03-03 23:55:52 +0000
commit67dfe1108e268fa9db986f628ee7b42b4901b8b6 (patch)
tree8bbdd20f2db68edcbad7b5407da0d4c5ce549749 /gcc/config
parentdd0a905f24c159bc583a40aadedaf40a01c747bd (diff)
downloadgcc-67dfe1108e268fa9db986f628ee7b42b4901b8b6.zip
gcc-67dfe1108e268fa9db986f628ee7b42b4901b8b6.tar.gz
gcc-67dfe1108e268fa9db986f628ee7b42b4901b8b6.tar.bz2
hooks.c (hook_tree_tree_identity): New.
* hooks.c (hook_tree_tree_identity): New. * hooks.h: Add a prototype for hook_tree_tree_identity. * stmt.c (expand_asm_operands): Use targetm.md_asm_clobbers instead of MD_ASM_CLOBBERS. * system.h (MD_ASM_CLOBBERS): Poison. * target-def.h (TARGET_MD_ASM_CLOBBERS): New. (TARGET_INITIALIZER): Add TARGET_MD_ASM_CLOBBERS. * target.h (gcc_target): Add md_asm_clobbers. * config/i386/i386.c (TARGET_MD_ASM_CLOBBERS): New. (ix86_md_asm_clobbers): New. * config/i386/i386.h (MD_ASM_CLOBBERS): Remove. * doc/tm.texi (MD_ASM_CLOBBERS): Change to TARGET_MD_ASM_CLOBBERS. From-SVN: r78868
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c21
-rw-r--r--gcc/config/i386/i386.h16
2 files changed, 21 insertions, 16 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d90d616..2a12bd8 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -886,6 +886,7 @@ static tree ix86_handle_struct_attribute (tree *, tree, tree, int, bool *);
static int extended_reg_mentioned_1 (rtx *, void *);
static bool ix86_rtx_costs (rtx, int, int, int *);
static int min_insn_size (rtx);
+static tree ix86_md_asm_clobbers (tree clobbers);
#if defined (DO_GLOBAL_CTORS_BODY) && defined (HAS_INIT_SECTION)
static void ix86_svr3_asm_out_constructor (rtx, int);
@@ -1027,6 +1028,9 @@ static void init_ext_80387_constants (void);
#undef TARGET_BUILD_BUILTIN_VA_LIST
#define TARGET_BUILD_BUILTIN_VA_LIST ix86_build_builtin_va_list
+#undef TARGET_MD_ASM_CLOBBERS
+#define TARGET_MD_ASM_CLOBBERS ix86_md_asm_clobbers
+
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
@@ -16024,4 +16028,21 @@ ix86_expand_vector_init (rtx target, rtx vals)
}
}
+/* Worker function for TARGET_MD_ASM_CLOBBERS.
+
+ We do this in the new i386 backend to maintain source compatibility
+ with the old cc0-based compiler. */
+
+static tree
+ix86_md_asm_clobbers (tree clobbers)
+{
+ clobbers = tree_cons (NULL_TREE, build_string (5, "flags"),
+ clobbers);
+ clobbers = tree_cons (NULL_TREE, build_string (4, "fpsr"),
+ clobbers);
+ clobbers = tree_cons (NULL_TREE, build_string (7, "dirflag"),
+ clobbers);
+ return clobbers;
+}
+
#include "gt-i386.h"
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 3c4720a..910ab79 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1591,22 +1591,6 @@ enum reg_class
|| MAYBE_MMX_CLASS_P (CLASS) \
: GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
? reg_classes_intersect_p (FLOAT_REGS, (CLASS)) : 0)
-
-/* A C statement that adds to CLOBBERS any hard regs the port wishes
- to automatically clobber for all asms.
-
- We do this in the new i386 backend to maintain source compatibility
- with the old cc0-based compiler. */
-
-#define MD_ASM_CLOBBERS(CLOBBERS) \
- do { \
- (CLOBBERS) = tree_cons (NULL_TREE, build_string (5, "flags"), \
- (CLOBBERS)); \
- (CLOBBERS) = tree_cons (NULL_TREE, build_string (4, "fpsr"), \
- (CLOBBERS)); \
- (CLOBBERS) = tree_cons (NULL_TREE, build_string (7, "dirflag"), \
- (CLOBBERS)); \
- } while (0)
/* Stack layout; function entry, exit and calling. */