Page MenuHomePhabricator

[WebAssembly] Store section alignment as a power of 2

Authored by sbc100 on Jan 15 2019, 5:01 PM.

Event Timeline

sbc100 created this revision.Jan 15 2019, 5:01 PM
dschuff accepted this revision.Jan 15 2019, 5:34 PM
This revision is now accepted and ready to land.Jan 15 2019, 5:34 PM
This revision was automatically updated to reflect the committed changes.
msearles added inline comments.
29 ↗(On Diff #181953)

Looks like one of our internal windows builders is failing due to this change:

c:\buildagent\work\7a156dd62df26211\opencl\drivers\opencl\compiler\llvm\tools\lld\wasm\OutputSegment.h(29): error C2220: warning treated as error - no 'object' file generated
[00:38:36][Step 2/4]

c:\buildagent\work\7a156dd62df26211\opencl\drivers\opencl\compiler\llvm\tools\lld\wasm\OutputSegment.h(29): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

Perhaps it should be 1ULL , not 1 ?
Trying to get onto our windows builder to test this.

Yes, it looks like ULL should fix the warning:

Yes, it looks like ULL should fix the warning:

One more:

MemoryPtr = alignTo(MemoryPtr, 1 << Seg->Alignment);

1 -> 1ULL