This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
+ if (__atomic_load_n (&flag1, __ATOMIC_ACQUIRE)) + i = x + y; + + if (__atomic_load_n (&flag2, __ATOMIC_ACQUIRE)) + a = 10; + j = x + y;
movl flag1(%rip), %eax movl x(%rip), %edx <-- hoist of X testl %eax, %eax movl y(%rip), %eax <-- hoist of Y je .L2 leal (%edx,%eax), %ecx movl %ecx, i(%rip) .L2: movl flag2(%rip), %ecx testl %ecx, %ecx je .L3 movl $10, a(%rip) .L3: addl %edx, %eax <-- x/y may have changed by the acquire of flag2. movl %eax, j(%rip) ret
Attachment:
curr
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |