diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-06 05:19:24 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-06 05:19:24 +0000 |
commit | 80ed5c06dff946feb851239966907176e600cc79 (patch) | |
tree | 5689624daa1964552ad51ee6161ad703c40aa3ce /gcc/reg-stack.c | |
parent | b7f563700ab79dbfabd1b748bb308187ecbf6385 (diff) | |
download | gcc-80ed5c06dff946feb851239966907176e600cc79.tar.gz |
* optabs.h (enum optab_index): Add new OTI_fmod and OTI_drem.
(fmod_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize fmod_optab and drem_optab.
* genopinit.c (optabs): Implement fmod_optab and drem_optab
using fmod?f3 and drem?f3 patterns.
* builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_FMOD{,F,L}
using fmod_optab and BUILT_IN_DREM{,F,L} using drem_optab.
(expand_builtin): Expand BUILT_IN_FMOD{,F,L} and
BUILT_IN_DREM{,F,L} using expand_builtin_mathfn_2 if
flag_unsafe_math_optimizations is set.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FPREM_F,
UNSPEC_FPREM_U, UNSPEC_FPREM1_F and UNSPEC_FPREM1_U.
* config/i386/i386.c (ix86_emit_fp_unordered_jump): New function.
* config/i386/i386-protos.h (ix86_emit_fp_unordered_jump):
Prototype here.
* config/i386/i386.md (UNSPEC_FPREM_F, UNSPEC_FPREM_U,
UNSPEC_FPREM1_F, UNSPEC_FPREM1_U): New unspecs to represent x87's
fprem and fprem1 instructions.
(*x86_fnstsw_1): Change input parameter to (reg:CCFP 18).
Rename insn definition to x86_fnstsw_1.
(fpremxf4, fprem1xf4): New patterns to implement fprem and fprem1
x87 instructions.
(fmodsf3, fmoddf3, fmodxf3): New expanders to implement fmodf, fmod
and fmodl built-ins as inline x87 intrinsics.
(dremsf3, dremdf3, dremxf3): New expanders to implement dremf, drem
and dreml built-ins as inline x87 intrinsics.
* testsuite/gcc.dg/builtins-40.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81555 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 8464ab43bc6..bab401ff0bd 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1779,6 +1779,8 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat) break; case UNSPEC_FSCALE_FRACT: + case UNSPEC_FPREM_F: + case UNSPEC_FPREM1_F: /* These insns operate on the top two stack slots. first part of double input, double output insn. */ @@ -1808,6 +1810,8 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat) break; case UNSPEC_FSCALE_EXP: + case UNSPEC_FPREM_U: + case UNSPEC_FPREM1_U: /* These insns operate on the top two stack slots./ second part of double input, double output insn. */ |