pgsql: Mark x86's memory barrier inline assembly as clobbering the cpu - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Mark x86's memory barrier inline assembly as clobbering the cpu
Date
Msg-id E1XUzui-0003HH-Fh@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Mark x86's memory barrier inline assembly as clobbering the cpu flags.

x86's memory barrier assembly was marked as clobbering "memory" but
not "cc" even though 'addl' sets various flags. As it turns out gcc on
x86 implicitly assumes "cc" on every inline assembler statement, so
it's not a bug. But as that's poorly documented and might get copied
to architectures or compilers where that's not the case, it seems
better to be precise.

Discussion: 20140919100016.GH4277@alap3.anarazel.de

To keep the code common, backpatch to 9.2 where explicit memory
barriers were introduced.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f9edfc1aa9ea4f0bae87eabcac261d82370c7de4

Modified Files
--------------
src/include/storage/barrier.h |    4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Mark x86's memory barrier inline assembly as clobbering the cpu
Next
From: Andres Freund
Date:
Subject: pgsql: Mark x86's memory barrier inline assembly as clobbering the cpu