Add an "and.c" opcode.

This commit is contained in:
David Anderson 2014-12-14 19:08:54 -08:00
parent b47893e13e
commit 6f0242387a
2 changed files with 9 additions and 1 deletions

View File

@ -252,7 +252,8 @@ namespace sp {
_(LE_F32, "le.f32") \
_(NE_F32, "ne.f32") \
_(EQ_F32, "eq.f32") \
_(NOT_F32, "not.f32")
_(NOT_F32, "not.f32") \
_(AND_C, "and.c")
enum OPCODE {
#define _(op, text) OP_##op,

View File

@ -620,6 +620,13 @@ Compiler::emitOp(OPCODE op)
__ andl(pri, alt);
break;
case OP_AND_C:
{
cell_t val = readCell();
__ andl(pri, val);
break;
}
case OP_INVERT:
__ notl(pri);
break;