This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Automatic MMX/x87 FPU mode switching


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]