mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
switch Compiler::load* to use ir::Type rather than sizes
This commit is contained in:
committed by
Joshua Warner
parent
9c98986f99
commit
27ea503233
@ -2626,25 +2626,39 @@ class MyCompiler: public Compiler {
|
||||
static_cast<Value*>(dst));
|
||||
}
|
||||
|
||||
virtual Operand* load(unsigned srcSize, unsigned srcSelectSize, Operand* src,
|
||||
unsigned dstSize)
|
||||
virtual Operand* load(ir::Type srcType,
|
||||
ir::Type srcSelectType,
|
||||
Operand* src,
|
||||
ir::Type dstType)
|
||||
{
|
||||
assert(&c, dstSize >= TargetBytesPerWord);
|
||||
assert(&c, dstType.size() >= TargetBytesPerWord);
|
||||
|
||||
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
||||
appendMove(&c, lir::Move, srcSize, srcSelectSize, static_cast<Value*>(src),
|
||||
dstSize, dst);
|
||||
appendMove(&c,
|
||||
lir::Move,
|
||||
srcType.size(),
|
||||
srcSelectType.size(),
|
||||
static_cast<Value*>(src),
|
||||
dstType.size(),
|
||||
dst);
|
||||
return dst;
|
||||
}
|
||||
|
||||
virtual Operand* loadz(unsigned srcSize, unsigned srcSelectSize,
|
||||
Operand* src, unsigned dstSize)
|
||||
virtual Operand* loadz(ir::Type srcType,
|
||||
ir::Type srcSelectType,
|
||||
Operand* src,
|
||||
ir::Type dstType)
|
||||
{
|
||||
assert(&c, dstSize >= TargetBytesPerWord);
|
||||
assert(&c, dstType.size() >= TargetBytesPerWord);
|
||||
|
||||
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
||||
appendMove(&c, lir::MoveZ, srcSize, srcSelectSize, static_cast<Value*>(src),
|
||||
dstSize, dst);
|
||||
appendMove(&c,
|
||||
lir::MoveZ,
|
||||
srcType.size(),
|
||||
srcSelectType.size(),
|
||||
static_cast<Value*>(src),
|
||||
dstType.size(),
|
||||
dst);
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user