fix building on gcc≤10

This commit is contained in:
dzaima 2022-10-10 13:46:41 +03:00
parent 331d060956
commit 83af05d274
6 changed files with 9 additions and 9 deletions

View File

@ -371,7 +371,7 @@ B GRADE_CAT(c2)(B t, B w, B x) {
rp[i] = s - (wi-1); rp[i] = s - (wi-1);
} }
} else { } else {
gen: gen:;
SGetU(x) SGetU(x)
SLOW2("𝕨"GRADE_CHR"𝕩", w, x); SLOW2("𝕨"GRADE_CHR"𝕩", w, x);
B* wp = arr_bptr(w); B* wp = arr_bptr(w);

View File

@ -991,7 +991,7 @@ B transp_c1(B t, B x) {
void* xp = tyany_ptr(x); void* xp = tyany_ptr(x);
switch(xe) { default: UD; switch(xe) { default: UD;
#ifdef __BMI2__ #ifdef __BMI2__
case el_bit: case el_bit:;
u32* x0 = xp; u32* x0 = xp;
Arr* x1o = TI(x,slice)(inc(x),w,w); Arr* x1o = TI(x,slice)(inc(x),w,w);
u32* x1 = (u32*) ((TyArr*)x1o)->a; u32* x1 = (u32*) ((TyArr*)x1o)->a;

View File

@ -363,7 +363,7 @@ B rand_range_c2(B t, B w, B x) {
if (t==t_i32arr) { goto end; } mask|= mask<<16; if (t==t_i32arr) { goto end; } mask|= mask<<16;
if (t==t_i16arr) { goto end; } mask|= mask<<8; if (t==t_i16arr) { goto end; } mask|= mask<<8;
end: end:;
PLAINLOOP for (usz i = 0; i < u64am; i++) ((u64*)rp)[i] = wyrand(&seed) & mask; PLAINLOOP for (usz i = 0; i < u64am; i++) ((u64*)rp)[i] = wyrand(&seed) & mask;
} }
} }

View File

@ -68,10 +68,10 @@ NOINLINE B dyArith_AA(DyTableAA* table, B w, B x) {
usz ia = IA(w); usz ia = IA(w);
EntAA* e = &table->entsAA[we*8 + xe]; EntAA* e = &table->entsAA[we*8 + xe];
newEnt: newEnt:;
FnInfoAA* fn = &e->bundles[0]; FnInfoAA* fn = &e->bundles[0];
newFn: newFn:;
u8 ex = fn->ex1; u8 ex = fn->ex1;
newEx: newEx:
@ -94,7 +94,7 @@ NOINLINE B dyArith_AA(DyTableAA* table, B w, B x) {
case swap: t=w; w=x; x=t; goto do_ex2; case swap: t=w; w=x; x=t; goto do_ex2;
do_ex2: ex = fn->ex2; goto newEx; do_ex2: ex = fn->ex2; goto newEx;
case c_call_rbyte: { c_call_rbyte: case c_call_rbyte: { c_call_rbyte:;
u64 got = fn->cFn(m_tyarrlc(&r, fn->width, x, fn->type), tyany_ptr(w), tyany_ptr(x), ia); u64 got = fn->cFn(m_tyarrlc(&r, fn->width, x, fn->type), tyany_ptr(w), tyany_ptr(x), ia);
if (got==ia) goto decG_ret; if (got==ia) goto decG_ret;
decG(r); decG(r);
@ -338,7 +338,7 @@ B sub_c2R(B t, B w, B x) { return sub_c2(t, x, w); }
static NOINLINE B or_SA(B t, B w, B x) { static NOINLINE B or_SA(B t, B w, B x) {
if (!isF64(w)) return arith_recd(or_c2, w, x); if (!isF64(w)) return arith_recd(or_c2, w, x);
if (LIKELY(TI(x,elType)==el_bit)) { if (LIKELY(TI(x,elType)==el_bit)) {
bitsel: bitsel:;
f64 wf = o2fG(w); f64 wf = o2fG(w);
return bit_sel(x, m_f64(bqn_or(wf, 0)), m_f64(bqn_or(wf, 1))); return bit_sel(x, m_f64(bqn_or(wf, 0)), m_f64(bqn_or(wf, 1)));
} }

View File

@ -58,7 +58,7 @@ NOINLINE B bit_sel(B b, B e0, B e1) {
} }
} else goto slow; } else goto slow;
sel: sel:;
void* rp = m_tyarrlc(&r, width, b, type); void* rp = m_tyarrlc(&r, width, b, type);
#if SINGELI #if SINGELI
bitselFns[width](rp, bp, e0i, e1i, ia); bitselFns[width](rp, bp, e0i, e1i, ia);

View File

@ -188,7 +188,7 @@ FORCE_INLINE B arr_join_inline(B w, B x, bool consume, bool* reusedW) {
case t_c32arr: if (TYARR_SZ(C32,ria)<wsz && TI(x,elType)<=el_c32 && TI(x,elType)>=el_c8) goto yes; break; case t_c32arr: if (TYARR_SZ(C32,ria)<wsz && TI(x,elType)<=el_c32 && TI(x,elType)>=el_c8) goto yes; break;
case t_harr: if (fsizeof(HArr,a,B,ria)<wsz) { rp = harr_ptr(w); goto yes; } break; case t_harr: if (fsizeof(HArr,a,B,ria)<wsz) { rp = harr_ptr(w); goto yes; } break;
} }
no: // failed to reuse no:; // failed to reuse
MAKE_MUT(r, ria); mut_init(r, el_or(TI(w,elType), TI(x,elType))); MAKE_MUT(r, ria); mut_init(r, el_or(TI(w,elType), TI(x,elType)));
MUTG_INIT(r); MUTG_INIT(r);
mut_copyG(r, 0, w, 0, wia); mut_copyG(r, 0, w, 0, wia);