/// Mark that an attempt was made to emit, but failed. Hence, in order to
/// continue, one must emit a text fixup.
void setNeedsTextFixup() { TextFixupNeeded = true; }
+ void resetNeedsTextFixup() { TextFixupNeeded = false; }
/// Returns true if last emit failed and needs a text fixup.
bool needsTextFixup() const { return TextFixupNeeded; }
}
void setNeedsTextFixup() { Buffer.setNeedsTextFixup(); }
+ void resetNeedsTextFixup() { Buffer.resetNeedsTextFixup(); }
bool needsTextFixup() const { return Buffer.needsTextFixup(); }
return;
GlobalContext *Ctx = Func->getContext();
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ if (Ctx->getFlags().getDisableHybridAssembly() &&
+ Ctx->getFlags().getSkipUnimplemented()) {
+ Asm->trap();
+ Asm->resetNeedsTextFixup();
+ return;
+ }
std::string Buffer;
llvm::raw_string_ostream StrBuf(Buffer);
OstreamLocker L(Ctx);
llvm::errs() << "Can't assemble: " << StrBuf.str() << "\n";
UnimplementedError(Ctx->getFlags());
}
+ Asm->resetNeedsTextFixup();
return;
}
Asm->emitTextInst(StrBuf.str(), Asm->getEmitTextSize());
default:
// TODO(kschimpf) Figure if more cases are needed.
emitUsingTextFixup(Func);
- break;
+ return;
case IceType_f32:
Asm->vmuls(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
assert(!Asm->needsTextFixup());
- break;
+ return;
case IceType_f64:
Asm->vmuld(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
assert(!Asm->needsTextFixup());
- break;
+ return;
}
- assert(!Asm->needsTextFixup());
}
InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget)