Fix ABI lowering for 128 bit vectors on Linux.

This commit is contained in:
Christoffer Lerno
2024-07-05 16:07:17 +02:00
parent ef716f3a69
commit 2ffb0cf5f7
2 changed files with 5 additions and 4 deletions

View File

@@ -30,7 +30,8 @@
- Bug fix for rethrow + defer catch.
- Wrong size for structs containing overaligned structs #1219
- $typeof(*x) should be valid when x is an `[out]` parameter #1226
- Fix ABI lowering for 128 bit vectors on Linux.
### Stdlib changes
- Added `remove_first_item` `remove_last_item` and `remove_item` as aliases for the `match` functions.
- Added @str_hash, @str_upper, @str_lower, @str_find compile time macros.

View File

@@ -327,10 +327,9 @@ void x64_classify_vector(Type *type, ByteSize offset_base, X64Class *current, X6
}
return;
}
Type *element = type->array.base;
if (size == 8)
{
Type *element = type->array.base;
// 1 x double passed in memory (by gcc)
if (element->type_kind == TYPE_F64) return;
@@ -346,7 +345,8 @@ void x64_classify_vector(Type *type, ByteSize offset_base, X64Class *current, X6
}
if (size == 16 || (named_arg == NAMED && size <= platform_target.x64.native_vector_size_avx))
{
if (platform_target.x64.pass_int128_vector_in_mem) return;
if (platform_target.x64.pass_int128_vector_in_mem
&& size != 16 && type_is_int128(element)) return;
*lo_class = CLASS_SSE;
*hi_class = CLASS_SSEUP;