i686-windows: make requested alignment > 4 special case apply transitively
This commit is contained in:
parent
f297f3200f
commit
2daacf5af9
12 changed files with 113 additions and 115 deletions
|
@ -63,8 +63,8 @@ where
|
|||
|
||||
if t.is_like_msvc
|
||||
&& arg.layout.is_adt()
|
||||
&& let Some(repr_align) = arg.layout.repr_align
|
||||
&& repr_align > align_4
|
||||
&& let Some(max_repr_align) = arg.layout.max_repr_align
|
||||
&& max_repr_align > align_4
|
||||
{
|
||||
// MSVC has special rules for overaligned arguments: https://reviews.llvm.org/D72114.
|
||||
// Summarized here:
|
||||
|
@ -72,8 +72,8 @@ where
|
|||
// - For backwards compatibility, arguments with natural alignment > 4 are still passed
|
||||
// on stack (via `byval`). For example, this includes `double`, `int64_t`,
|
||||
// and structs containing them, provided they lack an explicit alignment attribute.
|
||||
assert!(arg.layout.align.abi >= repr_align,
|
||||
"abi alignment {:?} less than requested alignment {repr_align:?}",
|
||||
assert!(arg.layout.align.abi >= max_repr_align,
|
||||
"abi alignment {:?} less than requested alignment {max_repr_align:?}",
|
||||
arg.layout.align.abi,
|
||||
);
|
||||
arg.make_indirect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue