This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c/11420 (broken amd64 movabs*)
- From: Jan Hubicka <jh at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, jh at suse dot cz,gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Jul 2003 13:37:35 +0200
- Subject: Re: [PATCH] Fix PR c/11420 (broken amd64 movabs*)
- References: <20030703092633.GL20507@sunsite.ms.mff.cuni.cz>
> Hi!
>
> This patch fixes PR c/11420.
> movabs does not have
> movabs[bwlq] $imm, (%reg)
> form.
There is movabs[bwlq] $imm, %rax
> Interestingly, this has been (partially) fixed on gcc-3_{1,2}-branch
> in http://gcc.gnu.org/ml/gcc-patches/2002-05/msg01740.html
Strange...
I will try to look into this..
Honza
> but only the movabsq variant while the other insns were left untouched.
> Ok for trunk/3.3?
>
> 2003-07-03 Jakub Jelinek <jakub@redhat.com>
>
> PR c/11420
> * config/i386/i386.md (movabs?i_1_rex64): Kill broken alternative.
>
> --- gcc/config/i386/i386.md.jj 2003-06-16 07:28:07.000000000 -0400
> +++ gcc/config/i386/i386.md 2003-07-03 05:14:30.000000000 -0400
> @@ -1145,17 +1145,16 @@
> ;; We fake an second form of instruction to force reload to load address
> ;; into register when rax is not available
> (define_insn "*movabssi_1_rex64"
> - [(set (mem:SI (match_operand:DI 0 "x86_64_movabs_operand" "i,r,r"))
> - (match_operand:SI 1 "nonmemory_operand" "a,er,i"))]
> + [(set (mem:SI (match_operand:DI 0 "x86_64_movabs_operand" "i,r"))
> + (match_operand:SI 1 "nonmemory_operand" "a,er"))]
> "TARGET_64BIT"
> "@
> movabs{l}\t{%1, %P0|%P0, %1}
> - mov{l}\t{%1, %a0|%a0, %1}
> - movabs{l}\t{%1, %a0|%a0, %1}"
> + mov{l}\t{%1, %a0|%a0, %1}"
> [(set_attr "type" "imov")
> - (set_attr "modrm" "0,*,*")
> - (set_attr "length_address" "8,0,0")
> - (set_attr "length_immediate" "0,*,*")
> + (set_attr "modrm" "0,*")
> + (set_attr "length_address" "8,0")
> + (set_attr "length_immediate" "0,*")
> (set_attr "memory" "store")
> (set_attr "mode" "SI")])
>
> @@ -1265,17 +1264,16 @@
> ;; We fake an second form of instruction to force reload to load address
> ;; into register when rax is not available
> (define_insn "*movabshi_1_rex64"
> - [(set (mem:HI (match_operand:DI 0 "x86_64_movabs_operand" "i,r,r"))
> - (match_operand:HI 1 "nonmemory_operand" "a,er,i"))]
> + [(set (mem:HI (match_operand:DI 0 "x86_64_movabs_operand" "i,r"))
> + (match_operand:HI 1 "nonmemory_operand" "a,er"))]
> "TARGET_64BIT"
> "@
> movabs{w}\t{%1, %P0|%P0, %1}
> - mov{w}\t{%1, %a0|%a0, %1}
> - movabs{w}\t{%1, %a0|%a0, %1}"
> + mov{w}\t{%1, %a0|%a0, %1}"
> [(set_attr "type" "imov")
> - (set_attr "modrm" "0,*,*")
> - (set_attr "length_address" "8,0,0")
> - (set_attr "length_immediate" "0,*,*")
> + (set_attr "modrm" "0,*")
> + (set_attr "length_address" "8,0")
> + (set_attr "length_immediate" "0,*")
> (set_attr "memory" "store")
> (set_attr "mode" "HI")])
>
> @@ -1584,17 +1582,16 @@
> ;; We fake an second form of instruction to force reload to load address
> ;; into register when rax is not available
> (define_insn "*movabsqi_1_rex64"
> - [(set (mem:QI (match_operand:DI 0 "x86_64_movabs_operand" "i,r,r"))
> - (match_operand:QI 1 "nonmemory_operand" "a,er,i"))]
> + [(set (mem:QI (match_operand:DI 0 "x86_64_movabs_operand" "i,r"))
> + (match_operand:QI 1 "nonmemory_operand" "a,er"))]
> "TARGET_64BIT"
> "@
> movabs{b}\t{%1, %P0|%P0, %1}
> - mov{b}\t{%1, %a0|%a0, %1}
> - movabs{b}\t{%1, %a0|%a0, %1}"
> + mov{b}\t{%1, %a0|%a0, %1}"
> [(set_attr "type" "imov")
> - (set_attr "modrm" "0,*,*")
> - (set_attr "length_address" "8,0,0")
> - (set_attr "length_immediate" "0,*,*")
> + (set_attr "modrm" "0,*")
> + (set_attr "length_address" "8,0")
> + (set_attr "length_immediate" "0,*")
> (set_attr "memory" "store")
> (set_attr "mode" "QI")])
>
> @@ -1913,17 +1910,16 @@
> ;; We fake an second form of instruction to force reload to load address
> ;; into register when rax is not available
> (define_insn "*movabsdi_1_rex64"
> - [(set (mem:DI (match_operand:DI 0 "x86_64_movabs_operand" "i,r,r"))
> - (match_operand:DI 1 "nonmemory_operand" "a,er,i"))]
> + [(set (mem:DI (match_operand:DI 0 "x86_64_movabs_operand" "i,r"))
> + (match_operand:DI 1 "nonmemory_operand" "a,er"))]
> "TARGET_64BIT"
> "@
> movabs{q}\t{%1, %P0|%P0, %1}
> - mov{q}\t{%1, %a0|%a0, %1}
> - movabs{q}\t{%1, %a0|%a0, %1}"
> + mov{q}\t{%1, %a0|%a0, %1}"
> [(set_attr "type" "imov")
> - (set_attr "modrm" "0,*,*")
> - (set_attr "length_address" "8,0,0")
> - (set_attr "length_immediate" "0,*,*")
> + (set_attr "modrm" "0,*")
> + (set_attr "length_address" "8,0")
> + (set_attr "length_immediate" "0,*")
> (set_attr "memory" "store")
> (set_attr "mode" "DI")])
>
>
> Jakub