From: fennecdjay Date: Sat, 29 Oct 2022 11:01:31 +0000 (+0200) Subject: :art: improve emit kind X-Git-Tag: nightly~207^2~98 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d067b84ece24b77f4dc5973375428128b129fd00;p=gwion.git :art: improve emit kind --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 034c49c7..b419cb2f 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -112,7 +112,7 @@ ANN static inline void frame_push(Frame *frame) { } static const f_instr allocmember[] = {RegPushImm, RegPushImm2, RegPushImm3, - AllocMember4}; + DotMemberMem4}; static const f_instr allocword[] = {AllocWord, AllocWord2, AllocWord3, RegPushMem4}; diff --git a/src/emit/kind.c b/src/emit/kind.c index 0f228f56..404feb52 100644 --- a/src/emit/kind.c +++ b/src/emit/kind.c @@ -16,8 +16,8 @@ static inline enum Kind kindof(const m_uint size, const uint emit_var) { ANN Instr emit_kind(Emitter emit, const m_uint size, const bool addr, const f_instr func[]) { const enum Kind kind = kindof(size, addr); - const Instr instr = emit_add_instr(emit, func[kind]); - instr->m_val2 = size; + const Instr instr = emit_add_instr(emit, func[kind]); + if(kind == KIND_OTHER) instr->m_val2 = size; return instr; }