Commit bb222a10 by Antonio Maiorano

Subzero: hack fix for assert(Dest->hasReg())

Under certain conditions, the Dest value of InstX86Movd doesn't get a register allocated to it. This is unlikely the right fix, as it's unidiomatic, but pending further investigation, this seems to do the trick. Bug: b/145529686 Change-Id: I5b5d5148aef04ebac957d5941779d5cd8e544098 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38871 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent f3fff9ba
......@@ -1249,6 +1249,10 @@ template <typename TraitsType> struct InstImpl {
class InstX86Movd : public InstX86BaseUnaryopXmm<InstX86Base::Movd> {
public:
static InstX86Movd *create(Cfg *Func, Variable *Dest, Operand *Src) {
// TODO(amaiorano): This fixes assert(Dest->hasReg()) in emitIAS when
// there are no more registers left to allocate. Revisit this and fix it
// the right way. See b/145529686.
Dest->setMustHaveReg();
return new (Func->allocate<InstX86Movd>()) InstX86Movd(Func, Dest, Src);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment