Previously, we're always masking the shift amount with 0x1f. This only works for 32-bit words. For 64-bit words, the mask should be 0x3f. For intptr_t shifts, the mask depends on sizeof(uintptr_t).
<rdar://problem/48484164>
Created attachment 363250 [details] proposed patch.
Comment on attachment 363250 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=363250&action=review r=me > Source/JavaScriptCore/offlineasm/cloop.rb:429 > + shiftMask = "((sizeof(uintptr_t) == 8) ? 0x3f : 0x1f)" if type == :int || type == :uint Discussed with Mark. The type ":int" and ":uint" actually means "intptr_t" and "uintptr_t". Then this is correct. It is nice if we have either of 1. Add a comment about it here now, and rename ":int" => ":intPtr" or something like that in a subsequent patch. 2. Rename them in this patch too.
Thanks for the review. I added the FIXME. Landed in r242215: <http://trac.webkit.org/r242215>.
*** Bug 195175 has been marked as a duplicate of this bug. ***
*** Bug 199684 has been marked as a duplicate of this bug. ***