Skip to content

Instantly share code, notes, and snippets.

@UplinkCoder
Created July 31, 2016 19:55
Show Gist options
  • Select an option

  • Save UplinkCoder/26964dc4441a543b0e0d902dd94002bf to your computer and use it in GitHub Desktop.

Select an option

Save UplinkCoder/26964dc4441a543b0e0d902dd94002bf to your computer and use it in GitHub Desktop.
BCTemporary genTemporary(BCType bct);
void incSp(BCValue val);
StackAddr currSp();
BCLabel genLabel();
BCAddr beginJmp();
void endJmp(BCAddr atIp, BCLabel target);
BCAddr genJump(BCLabel target);
CndJmpBegin beginCndJmp(BCValue cond = BCValue.init, bool ifTrue = false);
void endCndJmp(CndJmpBegin jmp, BCLabel target);
void emitFlg(BCValue lhs);
void Set(BCValue lhs, BCValue rhs);
void Lt3(BCValue result, BCValue lhs, BCValue rhs);
void Gt3(BCValue result, BCValue lhs, BCValue rhs);
void Eq3(BCValue result, BCValue lhs, BCValue rhs);
void Add3(BCValue result, BCValue lhs, BCValue rhs);
void Sub3(BCValue result, BCValue lhs, BCValue rhs);
void Mul3(BCValue result, BCValue lhs, BCValue rhs);
void Div3(BCValue result, BCValue lhs, BCValue rhs);
void And3(BCValue result, BCValue lhs, BCValue rhs);
void Or3(BCValue result, BCValue lhs, BCValue rhs);
void Xor3(BCValue result, BCValue lhs, BCValue rhs);
void Lsh3(BCValue result, BCValue lhs, BCValue rhs);
void Rsh3(BCValue result, BCValue lhs, BCValue rhs);
void Mod3(BCValue result, BCValue lhs, BCValue rhs);
void Call(BCValue result, BCValue fn, BCValue[] args);
void Load32(StackAddr toAddr, BCValue from);
void Not(BCValue val);
void Ret(BCValue val);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment