acconfig.h (HAVE_GAS_FILDS_FISTS): Add.
authorJohn Wehle <john@feith.com>
Fri, 23 Apr 1999 19:41:03 +0000 (19:41 +0000)
committerJohn Wehle <wehle@gcc.gnu.org>
Fri, 23 Apr 1999 19:41:03 +0000 (19:41 +0000)
* 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.

From-SVN: r26608

gcc/ChangeLog
gcc/acconfig.h
gcc/config.in
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/configure
gcc/configure.in

index 6260333197c9e6b1568eb37a773b6cbd76a2e083..dd95dcc41451ef5389d133381d424ad3e7817c11 100644 (file)
@@ -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.
index 1b9da03f28af7656100692ea4f3bfddefca1a7c9..68bee4f7cbdb621ec728c251565171059c9cbe84 100644 (file)
@@ -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
 
index ffe401efa0ab680d8150a706f15ed9ee38687a01..0b14498ec93322dc16c9b0ca7f54501a23a43ebd 100644 (file)
@@ -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
 
index 854be258e25155ead25337c11c91f085aa0a6842..a63718e97b936bc5c24eef80feb5fee20292f741 100644 (file)
@@ -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':
index e18c592f663e850df9cfb9b7cec48b0e6ce17ca0..2d02ef69ef20dfc98c04b42b5eac5dff802e0ff8 100644 (file)
   "* 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" "")))
   "* 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" "")))
   "* 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" "")))
index da6114c3f150186e3399d7a8d530d8e19862e764..9ccf55430b2080364189e64f10753ea8bd1fbc7c 100755 (executable)
@@ -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
index 9f8c9681e81d1175a04a3f50086c7929dc10863a..e343d27860fab5b9b9bc06c18b3d7a43f5acdf08 100644 (file)
@@ -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