📄 sem-switch.c
字号:
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ORSI (SLLSI (1, * FLD (i_src1)), FLD (f_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_SETBIT3) : /* setbit $lit1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ORSI (SLLSI (1, FLD (f_src1)), FLD (f_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOTAND) : /* notand $src1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (* FLD (i_src2)), * FLD (i_src1)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOTAND1) : /* notand $lit1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul1.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (* FLD (i_src2)), FLD (f_src1)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOTAND2) : /* notand $src1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (FLD (f_src2)), * FLD (i_src1)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOTAND3) : /* notand $lit1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (FLD (f_src2)), FLD (f_src1)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XOR) : /* xor $src1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = XORSI (* FLD (i_src1), * FLD (i_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XOR1) : /* xor $lit1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul1.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = XORSI (FLD (f_src1), * FLD (i_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XOR2) : /* xor $src1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = XORSI (* FLD (i_src1), FLD (f_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XOR3) : /* xor $lit1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = XORSI (FLD (f_src1), FLD (f_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_OR) : /* or $src1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ORSI (* FLD (i_src1), * FLD (i_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_OR1) : /* or $lit1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul1.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ORSI (FLD (f_src1), * FLD (i_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_OR2) : /* or $src1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ORSI (* FLD (i_src1), FLD (f_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_OR3) : /* or $lit1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ORSI (FLD (f_src1), FLD (f_src2)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOR) : /* nor $src1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (* FLD (i_src2)), INVSI (* FLD (i_src1))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOR1) : /* nor $lit1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul1.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (* FLD (i_src2)), INVSI (FLD (f_src1))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOR2) : /* nor $src1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (FLD (f_src2)), INVSI (* FLD (i_src1))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOR3) : /* nor $lit1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = ANDSI (INVSI (FLD (f_src2)), INVSI (FLD (f_src1))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XNOR) : /* xnor $src1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = INVSI (XORSI (* FLD (i_src1), * FLD (i_src2))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XNOR1) : /* xnor $lit1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul1.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = INVSI (XORSI (FLD (f_src1), * FLD (i_src2))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XNOR2) : /* xnor $src1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = INVSI (XORSI (* FLD (i_src1), FLD (f_src2))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_XNOR3) : /* xnor $lit1, $lit2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = INVSI (XORSI (FLD (f_src1), FLD (f_src2))); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOT) : /* not $src1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul2.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr; vpc = SEM_NEXT_VPC (sem_arg, pc, 4); { SI opval = INVSI (* FLD (i_src1)); * FLD (i_dst) = opval; TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval); }#undef FLD} NEXT (vpc); CASE (sem, INSN_NOT1) : /* not $lit1, $src2, $dst */{ SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc); ARGBUF *abuf = SEM_ARGBUF (sem_arg);#define FLD(f) abuf->fields.sfmt_emul3.f int UNUSED written = 0; IADDR UNUSED pc = abuf->addr;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -