| Summary: | FTL should allow LLVM to allocate data sections with alignment > 8 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||||
| Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | barraclough, commit-queue, ggaren, mark.lam, mhahnenberg, mmirman, msaboff, nrotem, oliver, sam | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 112840 | ||||||||
| Attachments: |
|
||||||||
|
Description
Filip Pizlo
2014-02-19 14:54:34 PST
Created attachment 224682 [details]
the patch
Comment on attachment 224682 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=224682&action=review r=me > Source/JavaScriptCore/ftl/FTLDataSection.cpp:51 > + m_base = bitwise_cast<void*>( > + (bitwise_cast<uintptr_t>(m_allocationBase) + alignment - 1) & ~static_cast<uintptr_t>(alignment - 1)); > + Can we use roundUpToMultipleOf<> here? Created attachment 224683 [details]
the patch
Comment on attachment 224683 [details]
the patch
ggaren already r+'d, and this is just a rebase.
Attachment 224683 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/ftl/FTLDataSection.h:37: The parameter name "size" adds no information, so it should be removed. [readability/parameter_name] [5]
Total errors found: 1 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #2) > (From update of attachment 224682 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=224682&action=review > > r=me > > > Source/JavaScriptCore/ftl/FTLDataSection.cpp:51 > > + m_base = bitwise_cast<void*>( > > + (bitwise_cast<uintptr_t>(m_allocationBase) + alignment - 1) & ~static_cast<uintptr_t>(alignment - 1)); > > + > > Can we use roundUpToMultipleOf<> here? I suppose we could. I get annoyed whenever I see size_t used as a "pointer-sized integer", and roundUpToMultipleOf uses size_t. It probably doesn't matter, though. I think I'll leave it. The math is simple enough that the helper doesn't add *that* much value. Landed in http://trac.webkit.org/changeset/164393 |