Stream: git-wasmtime

Topic: wasmtime / Issue #1691 Increase maximum alignment for dat...


view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 09:57):

bjorn3 opened Issue #1691:

Feature

Currently an u8 is used to represent the alignment. This means that the biggest power of two that fits in the alignment specifier is 128 bytes. I propose to use at least an u16 for alignment.

Benefit

A rustc test depends on 256 byte alignment. There is also code that requires much bigger alignments like 4096 bytes or even bigger.

Implementation

Replace u8 with u16 to specify alignment in cranelift-module.

Alternatives

None

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 10:45):

julian-seward1 commented on Issue #1691:

Could you leave it as u8 and reinterpret it to be log2 of the required alignment? That would restrict the expressable alignments to powers of 2 ; is that a problem?

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 11:09):

bjorn3 commented on Issue #1691:

That would also work. I don't think any object file format supports non power of 2 alignments anyway.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2020 at 16:52):

pchickey closed Issue #1691:

Feature

Currently an u8 is used to represent the alignment. This means that the biggest power of two that fits in the alignment specifier is 128 bytes. I propose to use at least an u16 for alignment.

Benefit

A rustc test depends on 256 byte alignment. There is also code that requires much bigger alignments like 4096 bytes or even bigger.

Implementation

Replace u8 with u16 to specify alignment in cranelift-module.

Alternatives

None


Last updated: Nov 22 2024 at 16:03 UTC