Bug 74023 - Compare and Swap should be enabled on ARMv7
Summary: Compare and Swap should be enabled on ARMv7
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 13:31 PST by Filip Pizlo
Modified: 2011-12-07 18:09 PST (History)
0 users

See Also:


Attachments
the patch (4.47 KB, patch)
2011-12-07 13:33 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (3.77 KB, patch)
2011-12-07 13:35 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-12-07 13:31:22 PST
And PARALLEL_GC should be enabled, as well.
Comment 1 Filip Pizlo 2011-12-07 13:33:38 PST
Created attachment 118263 [details]
the patch
Comment 2 Filip Pizlo 2011-12-07 13:35:10 PST
Created attachment 118265 [details]
the patch

Removed accidental debug goop in build-jsc.
Comment 3 Geoffrey Garen 2011-12-07 14:23:19 PST
Comment on attachment 118265 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118265&action=review

> Source/JavaScriptCore/wtf/Atomics.h:140
> +        "strex %1, %4, %0\n\t"

I think you need to test and branch after strex to see if your strex succeeded, no? http://www.doulos.com/knowhow/arm/Hints_and_Tips/Implementing_Semaphores/
Comment 4 Filip Pizlo 2011-12-07 14:30:59 PST
(In reply to comment #3)
> (From update of attachment 118265 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=118265&action=review
> 
> > Source/JavaScriptCore/wtf/Atomics.h:140
> > +        "strex %1, %4, %0\n\t"
> 
> I think you need to test and branch after strex to see if your strex succeeded, no? http://www.doulos.com/knowhow/arm/Hints_and_Tips/Implementing_Semaphores/

weakCompareAndSwap returns a boolean that tells you if the strex succeeded.  So the inline asm doesn't need to branch.
Comment 5 Geoffrey Garen 2011-12-07 16:35:14 PST
Comment on attachment 118265 [details]
the patch

r=me
Comment 6 Filip Pizlo 2011-12-07 18:09:40 PST
Landed in http://trac.webkit.org/changeset/102295
Comment 7 Filip Pizlo 2011-12-07 18:09:49 PST
Comment on attachment 118265 [details]
the patch

Clearing flags.