SSE/MMX moves optimization

Eric Botcazou ebotcazou@libertysurf.fr
Fri Mar 7 17:52:00 GMT 2003


> 	* i386.md (movsi_1): Cleanup constraints;

Could you explain this change? Why not put it on the 3.3 branch?

> Index: i386.md
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
> retrieving revision 1.421
> diff -c -3 -p -r1.421 i386.md
> *** i386.md	3 Feb 2003 20:20:36 -0000	1.421
> --- i386.md	4 Feb 2003 19:27:17 -0000
> ***************
> *** 1166,1173 ****
>
>   (define_insn "*movsi_1"
>     [(set (match_operand:SI 0 "nonimmediate_operand"
> "=*?a,r,*?a,m,!*y,!rm,!*y,!*Y,!rm,!*Y") ! 	(match_operand:SI 1
> "general_operand" "im,rinm,rinm,rin,rm,*y,*y,rm,*Y,*Y"))] !   "GET_CODE
> (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" {
>     switch (get_attr_type (insn))
>       {
> --- 1166,1214 ----
>
>   (define_insn "*movsi_1"
>     [(set (match_operand:SI 0 "nonimmediate_operand"
> "=*?a,r,*?a,m,!*y,!rm,!*y,!*Y,!rm,!*Y") ! 	(match_operand:SI 1
> "general_operand" "im,rinm,rinm,rin,*y,*y,rm,*Y,*Y,rm"))] !  

Why this circular permutation of constraints for operand 1?

> ***************
> *** 1201,1207 ****
>   	   ]
>   	   (const_string "imov")))
>      (set_attr "modrm" "0,*,0,*,*,*,*,*,*,*")
> !    (set_attr "mode" "SI,SI,SI,SI,SI,SI,DI,TI,SI,SI")])
>
>   ;; Stores and loads of ax to arbitrary constant address.
>   ;; We fake an second form of instruction to force reload to load address
> --- 1242,1248 ----
>   	   ]
>   	   (const_string "imov")))
>      (set_attr "modrm" "0,*,0,*,*,*,*,*,*,*")
> !    (set_attr "mode" "SI,SI,SI,SI,DI,SI,SI,TI,SI,SI")])
>
>   ;; Stores and loads of ax to arbitrary constant address.
>   ;; We fake an second form of instruction to force reload to load address

Same question.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list