mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
use ir::Type in f2i and friends, instead of aSize
This commit is contained in:
committed by
Joshua Warner
parent
704c05f818
commit
6ed7681dc0
@ -2649,42 +2649,50 @@ class MyCompiler: public Compiler {
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual Operand* f2f(unsigned aSize, ir::Type resType, Operand* a)
|
||||
virtual Operand* f2f(ir::Type aType, ir::Type resType, Operand* a)
|
||||
{
|
||||
assert(&c, aType == static_cast<Value*>(a)->type);
|
||||
assert(&c, isFloatValue(a));
|
||||
assert(&c, resType.flavor() == ir::Type::Float);
|
||||
assert(&c, aType.flavor() == ir::Type::Float);
|
||||
Value* result = value(&c, resType);
|
||||
appendTranslate(&c,
|
||||
lir::Float2Float,
|
||||
aSize,
|
||||
aType.size(),
|
||||
static_cast<Value*>(a),
|
||||
resType.size(),
|
||||
result);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual Operand* f2i(unsigned aSize, ir::Type resType, Operand* a)
|
||||
virtual Operand* f2i(ir::Type aType, ir::Type resType, Operand* a)
|
||||
{
|
||||
// TODO: enable when possible
|
||||
// assert(&c, aType == static_cast<Value*>(a)->type);
|
||||
assert(&c, isFloatValue(a));
|
||||
assert(&c, resType.flavor() != ir::Type::Float);
|
||||
assert(&c, aType.flavor() == ir::Type::Float);
|
||||
Value* result = value(&c, resType);
|
||||
appendTranslate(&c,
|
||||
lir::Float2Int,
|
||||
aSize,
|
||||
aType.size(),
|
||||
static_cast<Value*>(a),
|
||||
resType.size(),
|
||||
result);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual Operand* i2f(unsigned aSize, ir::Type resType, Operand* a)
|
||||
virtual Operand* i2f(ir::Type aType, ir::Type resType, Operand* a)
|
||||
{
|
||||
// TODO: enable when possible
|
||||
// assert(&c, aType == static_cast<Value*>(a)->type);
|
||||
assert(&c, isGeneralValue(a));
|
||||
assert(&c, resType.flavor() == ir::Type::Float);
|
||||
assert(&c, aType.flavor() != ir::Type::Float);
|
||||
Value* result = value(&c, resType);
|
||||
appendTranslate(&c,
|
||||
lir::Int2Float,
|
||||
aSize,
|
||||
aType.size(),
|
||||
static_cast<Value*>(a),
|
||||
resType.size(),
|
||||
result);
|
||||
|
Reference in New Issue
Block a user