From de80110b8836fd153e11d858b904b396f4b8960d Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 19 Apr 2002 16:02:06 +0200 Subject: [PATCH] i386.md (movsi_1, movhi_1): Force reload to use more flexible alternative. * i386.md (movsi_1, movhi_1): Force reload to use more flexible alternative. From-SVN: r52519 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.md | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 097cf31ba5b..0571b4e0ad2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 19 15:53:03 CEST 2002 Jan Hubicka + + * i386.md (movsi_1, movhi_1): Force reload to use more flexible + alternative. + 2002-04-19 Neil Booth * builtins.c: Include langhooks.h. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 3ebc99757a3..868f4b0127e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1733,8 +1733,13 @@ (set_attr "mode" "SI") (set_attr "length_immediate" "1")]) +; The first alternative is used only to compute proper length of instruction. +; Reload's algorithm does not take into account the cost of spill instructions +; needed to free register in given class, so avoid it from choosing the first +; alternative when eax is not available. + (define_insn "*movsi_1" - [(set (match_operand:SI 0 "nonimmediate_operand" "=*a,r,*a,m,!*y,!rm,!*y,!*Y,!rm,!*Y") + [(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" { @@ -1843,8 +1848,13 @@ [(set_attr "type" "push") (set_attr "mode" "QI")]) +; The first alternative is used only to compute proper length of instruction. +; Reload's algorithm does not take into account the cost of spill instructions +; needed to free register in given class, so avoid it from choosing the first +; alternative when eax is not available. + (define_insn "*movhi_1" - [(set (match_operand:HI 0 "nonimmediate_operand" "=*a,r,r,*a,r,m") + [(set (match_operand:HI 0 "nonimmediate_operand" "=*?a,r,r,*?a,r,m") (match_operand:HI 1 "general_operand" "i,r,rn,rm,rm,rn"))] "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" { -- 2.30.2