--- double_check.s 2007-03-06 12:07:12.103478512 +0100 +++ double_check_volatile.s 2007-03-06 12:06:20.675315485 +0100 @@ -1,4 +1,4 @@ - .file "double_check.c" + .file "double_check_volatile.c" .text .p2align 4,,15 .globl main @@ -13,8 +13,9 @@ # first if #NO_APP - decl %eax + movl test(%rip), %eax movl $1, %edx + decl %eax je .L4 #APP # lock @@ -43,7 +44,8 @@ # second if #NO_APP - cmpl $1, test(%rip) + movl test(%rip), %eax + decl %eax jne .L8 #APP # if unlock