From: Uros Bizjak Date: Mon, 20 Jul 2015 18:52:12 +0000 (+0200) Subject: i386.c (ix86_md_asm_adjust): Handle DImode dest_mode for !TARGET_64BIT. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73c581fbd134a93a6911f5a4c5e1db91a9f3837e;p=gcc.git i386.c (ix86_md_asm_adjust): Handle DImode dest_mode for !TARGET_64BIT. * config/i386/i386.c (ix86_md_asm_adjust): Handle DImode dest_mode for !TARGET_64BIT. testsuite/ChangeLog: * gcc.target/i386/asm-flag-5.c (f_ll): New. From-SVN: r226017 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 645a02b87bb..2796b829e49 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-20 Uros Bizjak + + * config/i386/i386.c (ix86_md_asm_adjust): Handle DImode dest_mode + for !TARGET_64BIT. + 2015-07-20 Aditya Kumar * graphite-isl-ast-to-gimple.c: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7901a4f17d7..b10569ac129 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -45861,6 +45861,10 @@ ix86_md_asm_adjust (vec &outputs, vec &/*inputs*/, error ("invalid type for asm flag output"); continue; } + + if (dest_mode == DImode && !TARGET_64BIT) + dest_mode = SImode; + if (dest_mode != QImode) { rtx destqi = gen_reg_rtx (QImode); @@ -45877,7 +45881,16 @@ ix86_md_asm_adjust (vec &outputs, vec &/*inputs*/, else x = gen_rtx_ZERO_EXTEND (dest_mode, destqi); } - emit_insn (gen_rtx_SET (dest, x)); + + if (dest_mode != GET_MODE (dest)) + { + rtx tmp = gen_reg_rtx (SImode); + + emit_insn (gen_rtx_SET (tmp, x)); + emit_insn (gen_zero_extendsidi2 (dest, tmp)); + } + else + emit_insn (gen_rtx_SET (dest, x)); } rtx_insn *seq = get_insns (); end_sequence (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 16492052663..e15b51f9211 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,10 @@ +2015-07-20 Uros Bizjak + + * gcc.target/i386/asm-flag-5.c (f_ll): New. + 2015-07-20 Jiong Wang - * gcc.target/aarch64/got_mem_hoist.c (dg-skip-if): Skip tiny and large + * gcc.target/aarch64/got_mem_hoist.c (dg-skip-if): Skip tiny and large model. 2015-07-20 Marek Polacek diff --git a/gcc/testsuite/gcc.target/i386/asm-flag-5.c b/gcc/testsuite/gcc.target/i386/asm-flag-5.c index 151157daf41..4cb8949d221 100644 --- a/gcc/testsuite/gcc.target/i386/asm-flag-5.c +++ b/gcc/testsuite/gcc.target/i386/asm-flag-5.c @@ -7,6 +7,7 @@ void f_c(void) { char x; asm("" : "=@ccc"(x)); } void f_s(void) { short x; asm("" : "=@ccc"(x)); } void f_i(void) { int x; asm("" : "=@ccc"(x)); } void f_l(void) { long x; asm("" : "=@ccc"(x)); } +void f_ll(void) { long long x; asm("" : "=@ccc"(x)); } void f_f(void) {