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

Fix gcc warnings #426

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions src/arch/helperavx.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,20 @@ static INLINE vdouble vreinterpret_vd_vm(vmask vm) { return _mm256_castsi256_pd(

//

static vint2 vloadu_vi2_p(int32_t *p) {
static INLINE vint2 vloadu_vi2_p(int32_t *p) {
vint2 r;
r.x = _mm_loadu_si128((__m128i *) p );
r.y = _mm_loadu_si128((__m128i *)(p + 4));
return r;
}

static void vstoreu_v_p_vi2(int32_t *p, vint2 v) {
static INLINE void vstoreu_v_p_vi2(int32_t *p, vint2 v) {
_mm_storeu_si128((__m128i *) p , v.x);
_mm_storeu_si128((__m128i *)(p + 4), v.y);
}

static vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }
static INLINE vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static INLINE void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }

//

Expand Down Expand Up @@ -570,7 +570,7 @@ static INLINE void vsscatter2_v_p_i_i_vf(float *ptr, int offset, int step, vfloa

//

static vquad loadu_vq_p(void *p) {
static INLINE vquad loadu_vq_p(void *p) {
vquad vq;
memcpy(&vq, p, VECTLENDP * 16);
return vq;
Expand Down
10 changes: 5 additions & 5 deletions src/arch/helperavx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ static INLINE vdouble vreinterpret_vd_vm(vmask vm) { return _mm256_castsi256_pd(

//

static vint2 vloadu_vi2_p(int32_t *p) { return _mm256_loadu_si256((__m256i const *)p); }
static void vstoreu_v_p_vi2(int32_t *p, vint2 v) { _mm256_storeu_si256((__m256i *)p, v); }
static vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }
static INLINE vint2 vloadu_vi2_p(int32_t *p) { return _mm256_loadu_si256((__m256i const *)p); }
static INLINE void vstoreu_v_p_vi2(int32_t *p, vint2 v) { _mm256_storeu_si256((__m256i *)p, v); }
static INLINE vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static INLINE void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }

//

Expand Down Expand Up @@ -440,7 +440,7 @@ static INLINE void vsscatter2_v_p_i_i_vf(float *ptr, int offset, int step, vfloa

//

static vquad loadu_vq_p(void *p) {
static INLINE vquad loadu_vq_p(void *p) {
vquad vq;
memcpy(&vq, p, VECTLENDP * 16);
return vq;
Expand Down
12 changes: 6 additions & 6 deletions src/arch/helperavx2_128.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ static INLINE vdouble vreinterpret_vd_vm(vmask vm) { return _mm_castsi128_pd(vm)

//

static vint2 vloadu_vi2_p(int32_t *p) { return _mm_loadu_si128((__m128i const *)p); }
static void vstoreu_v_p_vi2(int32_t *p, vint2 v) { _mm_storeu_si128((__m128i *)p, v); }
static vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }
static INLINE vint2 vloadu_vi2_p(int32_t *p) { return _mm_loadu_si128((__m128i const *)p); }
static INLINE void vstoreu_v_p_vi2(int32_t *p, vint2 v) { _mm_storeu_si128((__m128i *)p, v); }
static INLINE vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static INLINE void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }

//

Expand Down Expand Up @@ -413,7 +413,7 @@ static INLINE void vsscatter2_v_p_i_i_vf(float *ptr, int offset, int step, vfloa

//

static vquad loadu_vq_p(void *p) {
static INLINE vquad loadu_vq_p(void *p) {
vquad vq = {
vloadu_vi2_p((int32_t *)p),
vloadu_vi2_p((int32_t *)((uint8_t *)p + sizeof(vmask)))
Expand All @@ -433,7 +433,7 @@ static INLINE vargquad cast_aq_vq(vquad vq) {
return aq;
}

static void vstoreu_v_p_vq(void *p, vquad vq) {
static INLINE void vstoreu_v_p_vq(void *p, vquad vq) {
vstoreu_v_p_vi2((int32_t *)p, vcast_vi2_vm(vq.x));
vstoreu_v_p_vi2((int32_t *)((uint8_t *)p + sizeof(vmask)), vcast_vi2_vm(vq.y));
}
Expand Down
10 changes: 5 additions & 5 deletions src/arch/helpersse2.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ static INLINE int vtestallones_i_vo64(vopmask g) { return _mm_movemask_epi8(g) =

//

static vint2 vloadu_vi2_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static void vstoreu_v_p_vi2(int32_t *p, vint2 v) { _mm_storeu_si128((__m128i *)p, v); }
static INLINE vint2 vloadu_vi2_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static INLINE void vstoreu_v_p_vi2(int32_t *p, vint2 v) { _mm_storeu_si128((__m128i *)p, v); }

static vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }
static INLINE vint vloadu_vi_p(int32_t *p) { return _mm_loadu_si128((__m128i *)p); }
static INLINE void vstoreu_v_p_vi(int32_t *p, vint v) { _mm_storeu_si128((__m128i *)p, v); }

//

Expand Down Expand Up @@ -466,7 +466,7 @@ static INLINE void vsscatter2_v_p_i_i_vf(float *ptr, int offset, int step, vfloa

//

static vquad loadu_vq_p(void *p) {
static INLINE vquad loadu_vq_p(void *p) {
vquad vq;
memcpy(&vq, p, VECTLENDP * 16);
return vq;
Expand Down
2 changes: 2 additions & 0 deletions src/libm/sleefinline_header.h.org
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#pragma fp_contract (off)
#endif

#if !(defined(__GNUC__) && !defined (__clang__))
#pragma STDC FP_CONTRACT OFF
#endif

#ifndef SLEEF_FP_ILOGB0
#define SLEEF_FP_ILOGB0 ((int)0x80000000)
Expand Down