Commit 45805f17 by Uros Bizjak

sync.md (mem_thread_fence): Mask operands[0] with MEMMODEL_MASK to determine memory model.

	* config/i386/sync.md (mem_thread_fence): Mask operands[0] with
	MEMMODEL_MASK to determine memory model.
	(atomic_store<mode>): Ditto from operands[2].
	* config/i386/i386.c (ix86_memmodel_check): Declare "strong" as bool.

From-SVN: r195137
parent 9d60be38
2013-01-13 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sync.md (mem_thread_fence): Mask operands[0] with
MEMMODEL_MASK to determine memory model.
(atomic_store<mode>): Ditto from operands[2].
* config/i386/i386.c (ix86_memmodel_check): Declare "strong" as bool.
2013-01-13 Jakub Jelinek <jakub@redhat.com> 2013-01-13 Jakub Jelinek <jakub@redhat.com>
PR fortran/55935 PR fortran/55935
* gimple-fold.c (get_symbol_constant_value): Call * gimple-fold.c (get_symbol_constant_value): Call unshare_expr.
unshare_expr.
(fold_gimple_assign): Don't call unshare_expr here. (fold_gimple_assign): Don't call unshare_expr here.
(fold_ctor_reference): Call unshare_expr. (fold_ctor_reference): Call unshare_expr.
...@@ -61,7 +67,7 @@ ...@@ -61,7 +67,7 @@
2013-01-10 Richard Sandiford <rdsandiford@googlemail.com> 2013-01-10 Richard Sandiford <rdsandiford@googlemail.com>
Update copyright years Update copyright years.
2013-01-10 Vladimir Makarov <vmakarov@redhat.com> 2013-01-10 Vladimir Makarov <vmakarov@redhat.com>
......
...@@ -42082,7 +42082,7 @@ static unsigned HOST_WIDE_INT ...@@ -42082,7 +42082,7 @@ static unsigned HOST_WIDE_INT
ix86_memmodel_check (unsigned HOST_WIDE_INT val) ix86_memmodel_check (unsigned HOST_WIDE_INT val)
{ {
unsigned HOST_WIDE_INT model = val & MEMMODEL_MASK; unsigned HOST_WIDE_INT model = val & MEMMODEL_MASK;
unsigned HOST_WIDE_INT strong; bool strong;
if (val & ~(unsigned HOST_WIDE_INT)(IX86_HLE_ACQUIRE|IX86_HLE_RELEASE if (val & ~(unsigned HOST_WIDE_INT)(IX86_HLE_ACQUIRE|IX86_HLE_RELEASE
|MEMMODEL_MASK) |MEMMODEL_MASK)
...@@ -101,9 +101,11 @@ ...@@ -101,9 +101,11 @@
[(match_operand:SI 0 "const_int_operand")] ;; model [(match_operand:SI 0 "const_int_operand")] ;; model
"" ""
{ {
enum memmodel model = (enum memmodel) (INTVAL (operands[0]) & MEMMODEL_MASK);
/* Unless this is a SEQ_CST fence, the i386 memory model is strong /* Unless this is a SEQ_CST fence, the i386 memory model is strong
enough not to require barriers of any kind. */ enough not to require barriers of any kind. */
if (INTVAL (operands[0]) == MEMMODEL_SEQ_CST) if (model == MEMMODEL_SEQ_CST)
{ {
rtx (*mfence_insn)(rtx); rtx (*mfence_insn)(rtx);
rtx mem; rtx mem;
...@@ -200,7 +202,7 @@ ...@@ -200,7 +202,7 @@
UNSPEC_MOVA))] UNSPEC_MOVA))]
"" ""
{ {
enum memmodel model = (enum memmodel) INTVAL (operands[2]); enum memmodel model = (enum memmodel) (INTVAL (operands[2]) & MEMMODEL_MASK);
if (<MODE>mode == DImode && !TARGET_64BIT) if (<MODE>mode == DImode && !TARGET_64BIT)
{ {
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
2013-01-10 Vladimir Makarov <vmakarov@redhat.com> 2013-01-10 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/pr55672 PR rtl-optimization/55672
* gcc.target/i386/pr55672.c: New. * gcc.target/i386/pr55672.c: New.
2013-01-10 Jeff Law <law@redhat.com> 2013-01-10 Jeff Law <law@redhat.com>
......
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