clean up config (#456)

This commit is contained in:
water111
2021-05-11 19:19:23 -04:00
committed by GitHub
parent 433993074a
commit d7d563814f
10 changed files with 155 additions and 199 deletions
+7
View File
@@ -108,6 +108,9 @@ std::shared_ptr<IR> instr_atom_to_ir(const InstructionAtom& ia, int idx) {
return std::make_shared<IR_AsmReg>(IR_AsmReg::VU_ACC);
case InstructionAtom::IMM:
return make_int(ia.get_imm());
case InstructionAtom::VF_FIELD:
// not supported by IR1
return std::make_shared<IR_Failed>();
default:
assert(false);
return nullptr;
@@ -123,6 +126,10 @@ std::shared_ptr<IR> instr_atom_to_ir(const InstructionAtom& ia, int idx) {
*/
std::shared_ptr<IR_Atomic> to_asm_automatic(const std::string& str, Instruction& instr, int idx) {
auto result = std::make_shared<IR_AsmOp_Atomic>(str);
if (instr.n_src >= 4) {
// not supported by IR1
return std::make_shared<IR_Failed_Atomic>();
}
assert(instr.n_dst < 2);
assert(instr.n_src < 4);
if (instr.n_dst >= 1) {