From: Richard Henderson Date: Mon, 9 Nov 2015 09:19:40 +0000 (-0800) Subject: i386: Handle address spaces in movabs patterns X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe5f926316422c9c3bbcec1a412cd5fc14cd47d7;p=gcc.git i386: Handle address spaces in movabs patterns * config/i386/i386.md (*movabs_1): Print the full memory rtx. (*movabs_2): Likewise. From-SVN: r230001 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a91cf8700c..15b3159af5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2015-11-09 Richard Henderson + * config/i386/i386.md (*movabs_1): Print the full memory rtx. + (*movabs_2): Likewise. + * dwarf2out.c (modified_type_die): Pass the address space number through TARGET_ADDR_SPACE_DEBUG to produce the dwarf address class. * target.def (TARGET_ADDR_SPACE_DEBUG): New. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index d0c0d23df28..ccb672d8491 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2595,9 +2595,19 @@ [(set (mem:SWI1248x (match_operand:DI 0 "x86_64_movabs_operand" "i,r")) (match_operand:SWI1248x 1 "nonmemory_operand" "a,r"))] "TARGET_LP64 && ix86_check_movabs (insn, 0)" - "@ - movabs{}\t{%1, %P0|[%P0], %1} - mov{}\t{%1, %a0| PTR %a0, %1}" +{ + /* Recover the full memory rtx. */ + operands[0] = SET_DEST (PATTERN (insn)); + switch (which_alternative) + { + case 0: + return "movabs{}\t{%1, %0|%0, %1}"; + case 1: + return "mov{}\t{%1, %0|%0, %1}"; + default: + gcc_unreachable (); + } +} [(set_attr "type" "imov") (set_attr "modrm" "0,*") (set_attr "length_address" "8,0") @@ -2609,9 +2619,19 @@ [(set (match_operand:SWI1248x 0 "register_operand" "=a,r") (mem:SWI1248x (match_operand:DI 1 "x86_64_movabs_operand" "i,r")))] "TARGET_LP64 && ix86_check_movabs (insn, 1)" - "@ - movabs{}\t{%P1, %0|%0, [%P1]} - mov{}\t{%a1, %0|%0, PTR %a1}" +{ + /* Recover the full memory rtx. */ + operands[1] = SET_SRC (PATTERN (insn)); + switch (which_alternative) + { + case 0: + return "movabs{}\t{%1, %0|%0, %1}"; + case 1: + return "mov{}\t{%1, %0|%0, %1}"; + default: + gcc_unreachable (); + } +} [(set_attr "type" "imov") (set_attr "modrm" "0,*") (set_attr "length_address" "8,0")