[Webkit-unassigned] [Bug 270971] New: Unpredictable temporary selection in offlineasm

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 14 05:26:29 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=270971

            Bug ID: 270971
           Summary: Unpredictable temporary selection in offlineasm
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: maximilian at igalia.com

assignRegistersToTemporaries reverses its freeRegisters stack in each iteration,
leading to somewhat unpredictable assignment of scratch registers.

This goes against the inline documentation for scratch register allocation:

# These are allocated from the end. Use the low order r6 first, ast it's often
# cheaper to encode. r12 and r9 are equivalent, but r9 conflicts with t7, so r9
# only as last resort.

So for example the following unstable expansions occur (on armv7):

leap (x), t7 -> globaladdr x, r9, r12
leap (x), t7 -> globaladdr x, r9, r9
leap (x), t7 -> globaladdr x, r9, r12

We should maintain the freeRegisters stack order across iterations to ensure
temp/scratch priority is respected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240314/691c304f/attachment.htm>


More information about the webkit-unassigned mailing list