Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow avxintrin.h to be used by C compiler #22850

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions system/include/compat/avxintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef struct {
__m128i_u v1;
} __m256i_u;

union m256_data {
union __m256_data {
__m256i int_view;
__m256d double_view;
__m256 float_view;
Expand Down Expand Up @@ -1771,42 +1771,42 @@ _mm256_setzero_si256(void) {

static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
_mm256_castpd_ps(__m256d __a) {
m256_data ret;
union __m256_data ret;
ret.double_view = __a;
return ret.float_view;
}

static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
_mm256_castpd_si256(__m256d __a) {
m256_data ret;
union __m256_data ret;
ret.double_view = __a;
return ret.int_view;
}

static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
_mm256_castps_pd(__m256 __a) {
m256_data ret;
union __m256_data ret;
ret.float_view = __a;
return ret.double_view;
}

static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
_mm256_castps_si256(__m256 __a) {
m256_data ret;
union __m256_data ret;
ret.float_view = __a;
return ret.int_view;
}

static __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
_mm256_castsi256_ps(__m256i __a) {
m256_data ret;
union __m256_data ret;
ret.int_view = __a;
return ret.float_view;
}

static __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
_mm256_castsi256_pd(__m256i __a) {
m256_data ret;
union __m256_data ret;
ret.int_view = __a;
return ret.double_view;
}
Expand Down
Loading