aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwehle <wehle@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-23 19:41:03 +0000
committerwehle <wehle@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-23 19:41:03 +0000
commitd6723bcdea35b4af295adf7b32907324878fa75c (patch)
tree9c863568a597265314722ecb9fada3fd21ed7fb8
parent9c4fbff9f97953a50ec55067de822e3ad27e7f1c (diff)
* acconfig.h (HAVE_GAS_FILDS_FISTS): Add.
* configure.in: Check assembler instructions. * configure: Rebuild. * config.in: Likewise. * i386.md (floathisf2, floathidf2, floathixf2): New patterns. * i386.c (print_operand): Use the proper suffix for a 387 HImode operand. Abort if a 387 operand has an unsupported size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26608 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/acconfig.h3
-rw-r--r--gcc/config.in3
-rw-r--r--gcc/config/i386/i386.c11
-rw-r--r--gcc/config/i386/i386.md123
-rwxr-xr-xgcc/configure21
-rw-r--r--gcc/configure.in17
7 files changed, 183 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6260333197c..dd95dcc4145 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Fri Apr 23 22:35:41 EDT 1999 John Wehle (john@feith.com)
+
+ * acconfig.h (HAVE_GAS_FILDS_FISTS): Add.
+ * configure.in: Check assembler instructions.
+ * configure: Rebuild.
+ * config.in: Likewise.
+ * i386.md (floathisf2, floathidf2, floathixf2): New patterns.
+ * i386.c (print_operand): Use the proper suffix for a 387 HImode
+ operand. Abort if a 387 operand has an unsupported size.
+
Fri Apr 23 16:57:40 1999 Richard Henderson <rth@cygnus.com>
* alpha.c (alpha_write_verstamp): Mark `file' unused.
diff --git a/gcc/acconfig.h b/gcc/acconfig.h
index 1b9da03f28a..68bee4f7cbd 100644
--- a/gcc/acconfig.h
+++ b/gcc/acconfig.h
@@ -33,6 +33,9 @@
emitting at the beginning of your section */
#undef HAVE_GAS_SUBSECTION_ORDERING
+/* Define if your assembler uses the old HImode fild and fist notation. */
+#undef HAVE_GAS_FILDS_FISTS
+
/* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
diff --git a/gcc/config.in b/gcc/config.in
index ffe401efa0a..0b14498ec93 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -34,6 +34,9 @@
emitting at the beginning of your section */
#undef HAVE_GAS_SUBSECTION_ORDERING
+/* Define if your assembler uses the old HImode fild and fist notation. */
+#undef HAVE_GAS_FILDS_FISTS
+
/* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 854be258e25..a63718e97b9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3382,12 +3382,10 @@ print_operand (file, x, code)
/* this is the size of op from size of operand */
switch (GET_MODE_SIZE (GET_MODE (x)))
{
- case 1:
- PUT_OP_SIZE ('B', 'b', file);
- return;
-
case 2:
- PUT_OP_SIZE ('W', 'w', file);
+#ifdef HAVE_GAS_FILDS_FISTS
+ PUT_OP_SIZE ('W', 's', file);
+#endif
return;
case 4:
@@ -3417,6 +3415,9 @@ print_operand (file, x, code)
PUT_OP_SIZE ('Q', 'l', file);
return;
+
+ default:
+ abort ();
}
case 'b':
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index e18c592f663..2d02ef69ef2 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2897,6 +2897,47 @@
"* return AS1 (fild%z1,%1);"
[(set_attr "type" "fpop")])
+(define_expand "floathisf2"
+ [(parallel [(set (match_operand:SF 0 "register_operand" "")
+ (float:SF (match_operand:HI 1 "nonimmediate_operand" "")))
+ (clobber (match_dup 2))])]
+ "TARGET_80387"
+ "operands[2] = assign_386_stack_local (HImode, 0);")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "register_operand" "=f,f")
+ (float:SF (match_operand:HI 1 "nonimmediate_operand" "m,!r")))
+ (clobber (match_operand:HI 2 "memory_operand" "m,m"))]
+ "TARGET_80387"
+ "#")
+
+(define_split
+ [(set (match_operand:SF 0 "register_operand" "")
+ (float:SF (match_operand:HI 1 "memory_operand" "")))
+ (clobber (match_operand:HI 2 "memory_operand" ""))]
+ "TARGET_80387 && reload_completed"
+ [(set (match_dup 0)
+ (float:SF (match_dup 1)))]
+ "")
+
+(define_split
+ [(set (match_operand:SF 0 "register_operand" "")
+ (float:SF (match_operand:HI 1 "register_operand" "")))
+ (clobber (match_operand:HI 2 "memory_operand" ""))]
+ "TARGET_80387 && reload_completed"
+ [(set (match_dup 2)
+ (match_dup 1))
+ (set (match_dup 0)
+ (float:SF (match_dup 2)))]
+ "")
+
+(define_insn ""
+ [(set (match_operand:SF 0 "register_operand" "=f")
+ (float:SF (match_operand:HI 1 "memory_operand" "m")))]
+ "TARGET_80387"
+ "* return AS1 (fild%z1,%1);"
+ [(set_attr "type" "fpop")])
+
(define_expand "floatdisf2"
[(parallel [(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:DI 1 "nonimmediate_operand" "")))
@@ -2979,6 +3020,47 @@
"* return AS1 (fild%z1,%1);"
[(set_attr "type" "fpop")])
+(define_expand "floathidf2"
+ [(parallel [(set (match_operand:DF 0 "register_operand" "")
+ (float:DF (match_operand:HI 1 "nonimmediate_operand" "")))
+ (clobber (match_dup 2))])]
+ "TARGET_80387"
+ "operands[2] = assign_386_stack_local (HImode, 0);")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "register_operand" "=f,f")
+ (float:DF (match_operand:HI 1 "nonimmediate_operand" "m,!r")))
+ (clobber (match_operand:HI 2 "memory_operand" "m,m"))]
+ "TARGET_80387"
+ "#")
+
+(define_split
+ [(set (match_operand:DF 0 "register_operand" "")
+ (float:DF (match_operand:HI 1 "memory_operand" "")))
+ (clobber (match_operand:HI 2 "memory_operand" ""))]
+ "TARGET_80387 && reload_completed"
+ [(set (match_dup 0)
+ (float:DF (match_dup 1)))]
+ "")
+
+(define_split
+ [(set (match_operand:DF 0 "register_operand" "")
+ (float:DF (match_operand:HI 1 "register_operand" "")))
+ (clobber (match_operand:HI 2 "memory_operand" ""))]
+ "TARGET_80387 && reload_completed"
+ [(set (match_dup 2)
+ (match_dup 1))
+ (set (match_dup 0)
+ (float:DF (match_dup 2)))]
+ "")
+
+(define_insn ""
+ [(set (match_operand:DF 0 "register_operand" "=f")
+ (float:DF (match_operand:HI 1 "memory_operand" "m")))]
+ "TARGET_80387"
+ "* return AS1 (fild%z1,%1);"
+ [(set_attr "type" "fpop")])
+
(define_expand "floatdidf2"
[(parallel [(set (match_operand:DF 0 "register_operand" "")
(float:DF (match_operand:DI 1 "nonimmediate_operand" "")))
@@ -3061,6 +3143,47 @@
"* return AS1 (fild%z1,%1);"
[(set_attr "type" "fpop")])
+(define_expand "floathixf2"
+ [(parallel [(set (match_operand:XF 0 "register_operand" "")
+ (float:XF (match_operand:HI 1 "nonimmediate_operand" "")))
+ (clobber (match_dup 2))])]
+ "TARGET_80387"
+ "operands[2] = assign_386_stack_local (HImode, 0);")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "register_operand" "=f,f")
+ (float:XF (match_operand:HI 1 "nonimmediate_operand" "m,!r")))
+ (clobber (match_operand:HI 2 "memory_operand" "m,m"))]
+ "TARGET_80387"
+ "#")
+
+(define_split
+ [(set (match_operand:XF 0 "register_operand" "")
+ (float:XF (match_operand:HI 1 "memory_operand" "")))
+ (clobber (match_operand:HI 2 "memory_operand" ""))]
+ "TARGET_80387 && reload_completed"
+ [(set (match_dup 0)
+ (float:XF (match_dup 1)))]
+ "")
+
+(define_split
+ [(set (match_operand:XF 0 "register_operand" "")
+ (float:XF (match_operand:HI 1 "register_operand" "")))
+ (clobber (match_operand:HI 2 "memory_operand" ""))]
+ "TARGET_80387 && reload_completed"
+ [(set (match_dup 2)
+ (match_dup 1))
+ (set (match_dup 0)
+ (float:XF (match_dup 2)))]
+ "")
+
+(define_insn ""
+ [(set (match_operand:XF 0 "register_operand" "=f")
+ (float:XF (match_operand:HI 1 "memory_operand" "m")))]
+ "TARGET_80387"
+ "* return AS1 (fild%z1,%1);"
+ [(set_attr "type" "fpop")])
+
(define_expand "floatdixf2"
[(parallel [(set (match_operand:XF 0 "register_operand" "")
(float:XF (match_operand:DI 1 "nonimmediate_operand" "")))
diff --git a/gcc/configure b/gcc/configure
index da6114c3f15..9ccf55430b2 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -8126,6 +8126,27 @@ EOF
fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
+echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
+echo "configure:8131: checking assembler instructions" >&5
+gcc_cv_as_instructions=
+if test x$gcc_cv_as != x; then
+ set "filds fists" "filds mem; fists mem"
+ while test $# -gt 0
+ do
+ echo "$2" > conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
+ cat >> confdefs.h <<EOF
+#define HAVE_GAS_`echo "$1" | tr 'a-z ' 'A-Z_'` 1
+EOF
+
+ fi
+ shift 2
+ done
+ rm -f conftest.s conftest.o
+fi
+echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
diff --git a/gcc/configure.in b/gcc/configure.in
index 9f8c9681e81..e343d27860f 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -3975,6 +3975,23 @@ EOF
fi
AC_MSG_RESULT($gcc_cv_as_subsections)
+AC_MSG_CHECKING(assembler instructions)
+gcc_cv_as_instructions=
+if test x$gcc_cv_as != x; then
+ set "filds fists" "filds mem; fists mem"
+ while test $# -gt 0
+ do
+ echo "$2" > conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
+ AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$1" | tr '[a-z ]' '[A-Z_]'`)
+ fi
+ shift 2
+ done
+ rm -f conftest.s conftest.o
+fi
+AC_MSG_RESULT($gcc_cv_as_instructions)
+
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might