Commit f148a434 by Uros Bizjak

constraints.md ("L"): Return true for 0xffffffff.

	* config/i386/constraints.md ("L"): Return true for 0xffffffff.
	* config/i386/i386.c (*anddi_1): Emit AND with 0xffffffff as MOV.

From-SVN: r183054
parent 6fcebe79
2012-01-10 Uros Bizjak <ubizjak@gmail.com>
* config/i386/constraints.md ("L"): Return true for 0xffffffff.
* config/i386/i386.c (*anddi_1): Emit AND with 0xffffffff as MOV.
2012-01-10 Tom de Vries <tom@codesourcery.com> 2012-01-10 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/51271 PR rtl-optimization/51271
...@@ -6,7 +11,7 @@ ...@@ -6,7 +11,7 @@
2012-01-10 Richard Henderson <rth@redhat.com> 2012-01-10 Richard Henderson <rth@redhat.com>
* config/arm/arm.c (arm_vectorize_vec_perm_const_ok, * config/arm/arm.c (arm_vectorize_vec_perm_const_ok,
TARGET_VECTORIZE_VEC_PERM_CONST_OK, neon_split_vcombine, MAX_VECT_LEN, TARGET_VECTORIZE_VEC_PERM_CONST_OK, neon_split_vcombine, MAX_VECT_LEN,
struct expand_vec_perm_d, arm_expand_vec_perm_1, arm_expand_vec_perm, struct expand_vec_perm_d, arm_expand_vec_perm_1, arm_expand_vec_perm,
arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev, arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev,
...@@ -95,7 +100,8 @@ ...@@ -95,7 +100,8 @@
Andrew Pinski <apinski@cavium.com> Andrew Pinski <apinski@cavium.com>
PR debug/51471 PR debug/51471
* reorg.c (fill_slots_from_thread): Don't speculate frame-related insns. * reorg.c (fill_slots_from_thread): Don't speculate
frame-related insns.
2012-01-09 Richard Sandiford <rdsandiford@googlemail.com> 2012-01-09 Richard Sandiford <rdsandiford@googlemail.com>
...@@ -215,8 +221,7 @@ ...@@ -215,8 +221,7 @@
2012-01-06 Torvald Riegel <triegel@redhat.com> 2012-01-06 Torvald Riegel <triegel@redhat.com>
PR rtl-optimization/51771 PR rtl-optimization/51771
* builtin-attrs.def (ATTR_RETURNS_TWICE, ATTR_TM_NOTHROW_RT_LIST): * builtin-attrs.def (ATTR_RETURNS_TWICE, ATTR_TM_NOTHROW_RT_LIST): New.
New.
* gtm-builtins.def (BUILT_IN_TM_START): Add returns-twice attrib. * gtm-builtins.def (BUILT_IN_TM_START): Add returns-twice attrib.
2012-01-05 Eric Botcazou <ebotcazou@adacore.com> 2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
......
...@@ -149,9 +149,11 @@ ...@@ -149,9 +149,11 @@
(match_test "IN_RANGE (ival, -128, 127)"))) (match_test "IN_RANGE (ival, -128, 127)")))
(define_constraint "L" (define_constraint "L"
"@code{0xFF} or @code{0xFFFF}, for andsi as a zero-extending move." "@code{0xFF}, @code{0xFFFF} or @code{0xFFFFFFFF}
for AND as a zero-extending move."
(and (match_code "const_int") (and (match_code "const_int")
(match_test "ival == 0xFF || ival == 0xFFFF"))) (match_test "ival == 0xff || ival == 0xffff
|| ival == (HOST_WIDE_INT) 0xffffffff")))
(define_constraint "M" (define_constraint "M"
"0, 1, 2, or 3 (shifts for the @code{lea} instruction)." "0, 1, 2, or 3 (shifts for the @code{lea} instruction)."
......
...@@ -7678,19 +7678,23 @@ ...@@ -7678,19 +7678,23 @@
enum machine_mode mode; enum machine_mode mode;
gcc_assert (CONST_INT_P (operands[2])); gcc_assert (CONST_INT_P (operands[2]));
if (INTVAL (operands[2]) == 0xff) if (INTVAL (operands[2]) == (HOST_WIDE_INT) 0xffffffff)
mode = QImode; mode = SImode;
else if (INTVAL (operands[2]) == 0xffff)
mode = HImode;
else else
{ {
gcc_assert (INTVAL (operands[2]) == 0xffff); gcc_assert (INTVAL (operands[2]) == 0xff);
mode = HImode; mode = QImode;
} }
operands[1] = gen_lowpart (mode, operands[1]); operands[1] = gen_lowpart (mode, operands[1]);
if (mode == QImode) if (mode == SImode)
return "movz{bl|x}\t{%1, %k0|%k0, %1}"; return "mov{l}\t{%1, %k0|%k0, %1}";
else else if (mode == HImode)
return "movz{wl|x}\t{%1, %k0|%k0, %1}"; return "movz{wl|x}\t{%1, %k0|%k0, %1}";
else
return "movz{bl|x}\t{%1, %k0|%k0, %1}";
} }
default: default:
...@@ -7726,19 +7730,19 @@ ...@@ -7726,19 +7730,19 @@
enum machine_mode mode; enum machine_mode mode;
gcc_assert (CONST_INT_P (operands[2])); gcc_assert (CONST_INT_P (operands[2]));
if (INTVAL (operands[2]) == 0xff) if (INTVAL (operands[2]) == 0xffff)
mode = QImode; mode = HImode;
else else
{ {
gcc_assert (INTVAL (operands[2]) == 0xffff); gcc_assert (INTVAL (operands[2]) == 0xff);
mode = HImode; mode = QImode;
} }
operands[1] = gen_lowpart (mode, operands[1]); operands[1] = gen_lowpart (mode, operands[1]);
if (mode == QImode) if (mode == HImode)
return "movz{bl|x}\t{%1, %0|%0, %1}";
else
return "movz{wl|x}\t{%1, %0|%0, %1}"; return "movz{wl|x}\t{%1, %0|%0, %1}";
else
return "movz{bl|x}\t{%1, %0|%0, %1}";
} }
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment