mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
LLVM DSL: print some debug info in get_const_vector<v128>
This commit is contained in:
parent
6b40d69a8f
commit
6730dc1dc4
@ -206,13 +206,18 @@ std::pair<bool, v128> cpu_translator::get_const_vector<v128>(llvm::Value* c, u32
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string result;
|
||||||
|
llvm::raw_string_ostream out(result);
|
||||||
|
c->print(out, true);
|
||||||
|
out.flush();
|
||||||
|
|
||||||
if (llvm::isa<llvm::ConstantExpr>(c))
|
if (llvm::isa<llvm::ConstantExpr>(c))
|
||||||
{
|
{
|
||||||
// Sorry, if we cannot evaluate it we cannot use it
|
// Sorry, if we cannot evaluate it we cannot use it
|
||||||
fmt::throw_exception("[0x%x, %u] Constant Expression!", _pos, _line);
|
fmt::throw_exception("[0x%x, %u] Constant Expression!\n%s", _pos, _line, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt::throw_exception("[0x%x, %u] Unexpected constant type", _pos, _line);
|
fmt::throw_exception("[0x%x, %u] Unexpected constant type!\n%s", _pos, _line, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto sct = t->getScalarType();
|
const auto sct = t->getScalarType();
|
||||||
|
Loading…
Reference in New Issue
Block a user