mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
introduce ir::Type and begin migrating i2f and friends to it
This commit is contained in:
committed by
Joshua Warner
parent
73bcc766c1
commit
855534b152
@ -2630,28 +2630,43 @@ class MyCompiler: public Compiler {
|
||||
appendTranslate(&c, type, size, static_cast<Value*>(a), size, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual Operand* f2f(unsigned aSize, unsigned resSize, Operand* a) {
|
||||
|
||||
virtual Operand* f2f(unsigned aSize, ir::Type resType, Operand* a)
|
||||
{
|
||||
assert(&c, static_cast<Value*>(a)->type == lir::ValueFloat);
|
||||
Value* result = value(&c, lir::ValueFloat);
|
||||
appendTranslate
|
||||
(&c, lir::Float2Float, aSize, static_cast<Value*>(a), resSize, result);
|
||||
appendTranslate(&c,
|
||||
lir::Float2Float,
|
||||
aSize,
|
||||
static_cast<Value*>(a),
|
||||
resType.size(),
|
||||
result);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual Operand* f2i(unsigned aSize, unsigned resSize, Operand* a) {
|
||||
|
||||
virtual Operand* f2i(unsigned aSize, ir::Type resType, Operand* a)
|
||||
{
|
||||
assert(&c, static_cast<Value*>(a)->type == lir::ValueFloat);
|
||||
Value* result = value(&c, lir::ValueGeneral);
|
||||
appendTranslate
|
||||
(&c, lir::Float2Int, aSize, static_cast<Value*>(a), resSize, result);
|
||||
appendTranslate(&c,
|
||||
lir::Float2Int,
|
||||
aSize,
|
||||
static_cast<Value*>(a),
|
||||
resType.size(),
|
||||
result);
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual Operand* i2f(unsigned aSize, unsigned resSize, Operand* a) {
|
||||
|
||||
virtual Operand* i2f(unsigned aSize, ir::Type resType, Operand* a)
|
||||
{
|
||||
assert(&c, static_cast<Value*>(a)->type == lir::ValueGeneral);
|
||||
Value* result = value(&c, lir::ValueFloat);
|
||||
appendTranslate
|
||||
(&c, lir::Int2Float, aSize, static_cast<Value*>(a), resSize, result);
|
||||
appendTranslate(&c,
|
||||
lir::Int2Float,
|
||||
aSize,
|
||||
static_cast<Value*>(a),
|
||||
resType.size(),
|
||||
result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user