This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Automatic MMX/x87 FPU mode switching
- From: Richard Henderson <rth at redhat dot com>
- To: Uros Bizjak <uros dot bizjak at kss-loka dot si>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Jul 2005 12:35:53 -0700
- Subject: Re: Automatic MMX/x87 FPU mode switching
- References: <1119350611.42b7ef5373f49@ssl.kss-loka.si> <20050627052044.GD27305@redhat.com> <1119947886.42c10c6e7f6f2@ssl.kss-loka.si> <20050628164510.GA17378@redhat.com> <1120209233.42c50951ae0eb@ssl.kss-loka.si>
On Fri, Jul 01, 2005 at 11:13:53AM +0200, Uros Bizjak wrote:
> (expr_list:REG_DEP_TRUE (use (reg:ALLREGS 8 st))
>
> expressions to CALL patterns and this will force registers to be live at
> function call.
Yes, that works for the call-out (argument passing) side.
> (call_insn:HI 14 39 15 0 (set (reg:V8QI 29 mm0)
> (call (mem:QI (symbol_ref:SI ("aaa") [flags 0x41] <function_decl
> 0x40305360 aaa>) [0 S1 A8])
> (const_int 0 [0x0]))) 526 {*call_value_0} (insn_list:REG_DEP_TRUE 12
> (insn_list:REG_DEP_TRUE 1
> 3 (nil)))
> (expr_list:REG_DEAD (reg:ALLREGS 8 st)
> (expr_list:REG_DEAD (reg:V8QI 30 mm1)
> (nil)))
> (expr_list:REG_DEP_TRUE (use (reg:V8QI 29 mm0))
> (expr_list:REG_DEP_TRUE (use (reg:V8QI 30 mm1))
> (expr_list:REG_DEP_TRUE (use (reg:ALLREGS 8 st))
> (nil)))))
>
> ...
>
> (insn 40 21 36 0 (set (reg:ALLREGS 29 mm0)
> (unspec_volatile:ALLREGS [
> (reg:ALLREGS 8 st)
> ] 5)) 872 {emms} (nil)
> (expr_list:REG_DEAD (reg:ALLREGS 8 st)
> (nil)))
Do we have confirmation that (reg:allregs st) is really live here
between the call and the emms?
We'd also want to test functions with mmx args and fpu return, and
vice versa. But if shown to be ok, this is certainly a nice solution.
r~