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

fail to build armhf #47

Open
ghost opened this issue Sep 8, 2019 · 3 comments
Open

fail to build armhf #47

ghost opened this issue Sep 8, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 8, 2019

../..//vu/multiply.c:379:16: note: in expansion of macro ‘_mm_cmplt_epu16’
     overflow = _mm_cmplt_epu16(acc_lo, prod_lo); /* a + b < a + 0 ? ~0 : 0 */
                ^~~~~~~~~~~~~~~
../..//vu/multiply.c:379:14: error: incompatible types when assigning to type ‘v16’ from type ‘int’
     overflow = _mm_cmplt_epu16(acc_lo, prod_lo); /* a + b < a + 0 ? ~0 : 0 */
              ^
../..//vu/multiply.c:382:18: error: incompatible types when assigning to type ‘v16’ from type ‘int’
     overflow_new = _mm_cmplt_epu16(acc_md, prod_hi);
                  ^
../..//vu/multiply.c:386:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(v16 *)VACC_M = acc_md;
../..//vu/multiply.c:391:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(v16 *)VACC_H = acc_hi;
../..//vu/multiply.c: In function ‘macu_v_msp’:
../..//vu/multiply.c:440:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     acc_lo = *(v16 *)VACC_L;
../..//vu/multiply.c:441:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     acc_md = *(v16 *)VACC_M;
../..//vu/multiply.c:442:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     acc_hi = *(v16 *)VACC_H;
../..//vu/multiply.c:445:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(v16 *)VACC_L = acc_lo;
../..//vu/multiply.c:446:14: error: incompatible types when assigning to type ‘v16’ from type ‘int’
     overflow = _mm_cmplt_epu16(acc_lo, prod_lo); /* a + b < a + 0 ? ~0 : 0 */
              ^
../..//vu/multiply.c:449:18: error: incompatible types when assigning to type ‘v16’ from type ‘int’
     overflow_new = _mm_cmplt_epu16(acc_md, prod_hi);
                  ^
../..//vu/multiply.c:453:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(v16 *)VACC_M = acc_md;
../..//vu/multiply.c:458:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(v16 *)VACC_H = acc_hi;
../..//vu/multiply.c:463:14: error: incompatible types when assigning to type ‘v16’ from type ‘int’
     overflow = _mm_cmplt_epi16(acc_md, vs);
              ^
../..//vu/multiply.c: In function ‘madl_v_msp’:
../..//vu/multiply.c:502:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     acc_lo = *(v16 *)VACC_L;
../..//vu/multiply.c:503:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     acc_md = *(v16 *)VACC_M;
../..//vu/multiply.c:504:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     acc_hi = *(v16 *)VACC_H;
../..//vu/multiply.c:507:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(v16 *)VACC_L = acc_lo;
../..//vu/multiply.c:509:14: error: incompatible types when assigning to type ‘v16’ from type ‘int’
     overflow = _mm_cmplt_epu16(acc_lo, prod_hi); /* overflow:  (x + y < y) */
              ^
In file included from ../..//vu/select.h:19,
                 from ../..//vu/select.c:16:
../..//vu/select.c: In function ‘do_lt’:
@bladeoner
Copy link

multiply.c is causing these build issues after commit cxd4/rsp@cc4a5bb
So if you use multiply.c from cxd4/rsp@cc4a5bb as a workaround you should be able to build.

The changes after this commit seem to cause problems building with clang, I think the code is optimized to be build with gcc.

@MaddTheSane
Copy link

Does updating SSE2NEON (#54) fix the issue? Or maybe turning off SSE2NEON by not defining USE_SSE2NEON?

@bullghost
Copy link

bullghost commented Apr 12, 2021

multiply.c is causing these build issues after commit cxd4/rsp@cc4a5bb
So if you use multiply.c from cxd4/rsp@cc4a5bb as a workaround you should be able to build.

The changes after this commit seem to cause problems building with clang, I think the code is optimized to be build with gcc.

its happen to me today , i try to build on raspberry pi 4 with SSE2NEON flag is ON ,
and cause same issue as you, but i compile with GCC gcc (Raspbian 8.3.0-6+rpi1) 8.3.0,
and then i apply the change you mention , it did solve the issue.

with SSE2NEON flag is OFF and without that change you mention its working fine.

thanks alot!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants