mupen64plus / mupen64plus-rsp-cxd4

Exemplary MSP communications simulator using a normalized VU.
Creative Commons Zero v1.0 Universal
30 stars 24 forks source link

fail to build armhf #47

Open ghost opened 5 years ago

ghost commented 5 years ago
../..//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 commented 4 years ago

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 commented 3 years ago

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

bullghost commented 3 years ago

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!.