Bug in __sync_lock_release with 64 bit primitives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
High
|
Ramana Radhakrishnan | ||
gcc-4.6 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
consider the following testcase.
long long AL[24];
void main(void)
{
__sync_
}
ain:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
ldr r1, .L2
mov r2, #0
mov r3, #0
dmb sy
strd r2, [r1]
bx lr
.L3:
.align 2
.L2:
while this should instead be :
dmb sy
.L2:
ldrexd r0, r1, [ip]
strexd r4, r2, r3, [ip]
cmp r4, #0
bne .L2
ldmfd sp!, {r4}
bx lr
.L5:
This was detected while reviewing an upstream patch to fix an issue with a testcase added as a part of the 64 bit sync primitives work that Linaro did.
Related branches
- Linaro Toolchain Developers: Pending requested
Changed in gcc-linaro: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Ramana Radhakrishnan (ramana) |
Changed in gcc-linaro: | |
status: | Triaged → In Progress |
Changed in gcc-linaro: | |
status: | In Progress → Fix Committed |
milestone: | none → 4.6-2012.03 |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
I have set this bug to Triaged because Ramana knows what introduced the bug and is working on a patch.
Importance is set to high because this is a case of wrong code generation.