make gcc happy

This commit is contained in:
dzaima 2021-06-04 15:47:26 +03:00
parent a124590465
commit cdd4d136be
3 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ static B getFillR(B x) { // doesn't consume; can return bi_noFill
switch(TI(x).elType) { default: UD;
case el_f64: case el_i32: return m_i32(0);
case el_c32: return m_c32(' ');
case el_B:
case el_B:;
u8 t = v(x)->type;
if (t==t_fillarr ) return inc(c(FillArr,x )->fill);
if (t==t_fillslice) return inc(c(FillArr,c(Slice,x)->p)->fill);

10
src/h.h
View File

@ -194,11 +194,11 @@ void gc_forceGC(); // force a gc; who knows what happens if gc is disabled (prob
void gc_visitRoots();
// some primitive actions
static const B bi_N = tag(0, TAG_TAG);
static const B bi_noVar = tag(1, TAG_TAG);
static const B bi_badHdr = tag(2, TAG_TAG);
static const B bi_optOut = tag(3, TAG_TAG);
static const B bi_noFill = tag(5, TAG_TAG);
static const B bi_N = b((u64)0x7FF2000000000000ull); // tag(0, TAG_TAG); // make gcc happy
static const B bi_noVar = b((u64)0x7FF2000000000001ull); // tag(1, TAG_TAG);
static const B bi_badHdr = b((u64)0x7FF2000000000002ull); // tag(2, TAG_TAG);
static const B bi_optOut = b((u64)0x7FF2000000000003ull); // tag(3, TAG_TAG);
static const B bi_noFill = b((u64)0x7FF2000000000005ull); // tag(5, TAG_TAG);
extern B bi_emptyHVec, bi_emptyIVec, bi_emptyCVec, bi_emptySVec;
static void dec(B x);
static B inc(B x);

View File

@ -167,7 +167,7 @@ Block* compileBlock(B block, Comp* comp, bool* bDone, i32* bc, usz bcIA, B block
bool ret = false;
#define A64(X) { u64 a64=(X); TSADD(nBCT, (u32)a64); TSADD(nBCT, a64>>32); }
switch (*c) {
case PUSH:
case PUSH:;
B obj = comp->objs->a[c[1]];
TSADD(nBCT, isVal(obj)? ADDI : ADDU);
A64(obj.u);