Page MenuHomePhabricator

[WebAssembly] Properly align fp128 arguments in outgoing varargs arguments

Authored by sunfish on Feb 25 2019, 4:47 PM.



For outgoing varargs arguments, it's necessary to check the OrigAlign field of the corresponding OutputArg entry to determine argument alignment, rather than just computing an alignment from the argument value type. This is because types like fp128 are split into multiple argument values, with narrower types that don't reflect the ABI alignment of the full fp128.

This fixes the printf("printfL: %4.*Lf\n", 2, lval); testcase.

Diff Detail


Event Timeline

sunfish created this revision.Feb 25 2019, 4:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2019, 4:47 PM
jgravelle-google accepted this revision.Feb 25 2019, 5:24 PM

Nice, lgtm

677 ↗(On Diff #188276)

Is it this diff or is the spacing off here?

This revision is now accepted and ready to land.Feb 25 2019, 5:24 PM
sunfish marked 2 inline comments as done.Feb 25 2019, 8:44 PM
sunfish added inline comments.
677 ↗(On Diff #188276)

I was somehow in 4-space indent mode there. Fixed.

This revision was automatically updated to reflect the committed changes.