Bug 129066 - FTL should allow LLVM to allocate data sections with alignment > 8
Summary: FTL should allow LLVM to allocate data sections with alignment > 8
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 112840
  Show dependency treegraph
 
Reported: 2014-02-19 14:54 PST by Filip Pizlo
Modified: 2014-02-19 15:06 PST (History)
10 users (show)

See Also:


Attachments
the patch (17.87 KB, patch)
2014-02-19 14:57 PST, Filip Pizlo
ggaren: review+
Details | Formatted Diff | Diff
the patch (17.34 KB, patch)
2014-02-19 15:00 PST, Filip Pizlo
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2014-02-19 14:54:34 PST
Patch forthcoming.
Comment 1 Filip Pizlo 2014-02-19 14:57:09 PST
Created attachment 224682 [details]
the patch
Comment 2 Geoffrey Garen 2014-02-19 15:00:11 PST
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?
Comment 3 Filip Pizlo 2014-02-19 15:00:15 PST
Created attachment 224683 [details]
the patch
Comment 4 Filip Pizlo 2014-02-19 15:00:50 PST
Comment on attachment 224683 [details]
the patch

ggaren already r+'d, and this is just a rebase.
Comment 5 WebKit Commit Bot 2014-02-19 15:02:22 PST
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.
Comment 6 Filip Pizlo 2014-02-19 15:04:12 PST
(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.
Comment 7 Filip Pizlo 2014-02-19 15:06:03 PST
Landed in http://trac.webkit.org/changeset/164393