acconfig.h (HAVE_GAS_FILDS_FISTS): Add.

* 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
This commit is contained in:
John Wehle 1999-04-23 19:41:03 +00:00 committed by John Wehle
parent 4c020733f4
commit 53b5ce195c
7 changed files with 183 additions and 5 deletions

View 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> Fri Apr 23 16:57:40 1999 Richard Henderson <rth@cygnus.com>
* alpha.c (alpha_write_verstamp): Mark `file' unused. * alpha.c (alpha_write_verstamp): Mark `file' unused.

View File

@ -33,6 +33,9 @@
emitting at the beginning of your section */ emitting at the beginning of your section */
#undef HAVE_GAS_SUBSECTION_ORDERING #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. */ /* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H

View File

@ -34,6 +34,9 @@
emitting at the beginning of your section */ emitting at the beginning of your section */
#undef HAVE_GAS_SUBSECTION_ORDERING #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. */ /* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H

View File

@ -3382,12 +3382,10 @@ print_operand (file, x, code)
/* this is the size of op from size of operand */ /* this is the size of op from size of operand */
switch (GET_MODE_SIZE (GET_MODE (x))) switch (GET_MODE_SIZE (GET_MODE (x)))
{ {
case 1:
PUT_OP_SIZE ('B', 'b', file);
return;
case 2: case 2:
PUT_OP_SIZE ('W', 'w', file); #ifdef HAVE_GAS_FILDS_FISTS
PUT_OP_SIZE ('W', 's', file);
#endif
return; return;
case 4: case 4:
@ -3417,6 +3415,9 @@ print_operand (file, x, code)
PUT_OP_SIZE ('Q', 'l', file); PUT_OP_SIZE ('Q', 'l', file);
return; return;
default:
abort ();
} }
case 'b': case 'b':

View File

@ -2897,6 +2897,47 @@
"* return AS1 (fild%z1,%1);" "* return AS1 (fild%z1,%1);"
[(set_attr "type" "fpop")]) [(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" (define_expand "floatdisf2"
[(parallel [(set (match_operand:SF 0 "register_operand" "") [(parallel [(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:DI 1 "nonimmediate_operand" ""))) (float:SF (match_operand:DI 1 "nonimmediate_operand" "")))
@ -2979,6 +3020,47 @@
"* return AS1 (fild%z1,%1);" "* return AS1 (fild%z1,%1);"
[(set_attr "type" "fpop")]) [(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" (define_expand "floatdidf2"
[(parallel [(set (match_operand:DF 0 "register_operand" "") [(parallel [(set (match_operand:DF 0 "register_operand" "")
(float:DF (match_operand:DI 1 "nonimmediate_operand" ""))) (float:DF (match_operand:DI 1 "nonimmediate_operand" "")))
@ -3061,6 +3143,47 @@
"* return AS1 (fild%z1,%1);" "* return AS1 (fild%z1,%1);"
[(set_attr "type" "fpop")]) [(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" (define_expand "floatdixf2"
[(parallel [(set (match_operand:XF 0 "register_operand" "") [(parallel [(set (match_operand:XF 0 "register_operand" "")
(float:XF (match_operand:DI 1 "nonimmediate_operand" ""))) (float:XF (match_operand:DI 1 "nonimmediate_operand" "")))

21
gcc/configure vendored
View File

@ -8126,6 +8126,27 @@ EOF
fi fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6 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. # Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use # Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might # the environment variable $LANGUAGES if defined. $LANGUAGES might

View File

@ -3975,6 +3975,23 @@ EOF
fi fi
AC_MSG_RESULT($gcc_cv_as_subsections) 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. # Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use # Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might # the environment variable $LANGUAGES if defined. $LANGUAGES might