Bug 289114
Summary: | [JSC] emitEncodeStructureID should be a no-op when the structureIDMask is -1 | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Degazio <d_degazio> |
Component: | JavaScriptCore | Assignee: | David Degazio <d_degazio> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
David Degazio
Currently in AssemblyHelpers::emitEncodeStructureID, we generate a 64-bit AND to mask the structure ID to the significant bits. However, this mask is currently just 32-bit -1, which under the current macro assembler semantics ends up just getting sign-extended, meaning we do a 64-bit AND with a 64-bit -1 which is a no-op. This is fine, since the structure ID is a 32-bit quantity anyway, and we don't use the full 64-bit register after encoding anywhere in the codebase I can find - effectively, since we're using the lower 32-bit half of the register, we are getting the masking for free. But since that's the case, we should elide this AND since it's not doing anything useful.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/146142200>
David Degazio
Pull request: https://github.com/WebKit/WebKit/pull/41876
EWS
Committed 291713@main (b6667ac3e18f): <https://commits.webkit.org/291713@main>
Reviewed commits have been landed. Closing PR #41876 and removing active labels.