mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
fix sizing of some stack ints
This commit is contained in:
committed by
Joshua Warner
parent
d62d083733
commit
43eb49cf53
@ -2515,12 +2515,12 @@ class MyCompiler: public Compiler {
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void return_(ir::Type type, ir::Value* value)
|
||||
virtual void return_(ir::Type type, ir::Value* a)
|
||||
{
|
||||
// TODO: once type information is flowed properly, enable this assert.
|
||||
// Some time later, we can remove the parameter.
|
||||
// assert(&c, static_cast<Value*>(value)->type == type);
|
||||
appendReturn(&c, type.size(), static_cast<Value*>(value));
|
||||
// assert(&c, a->type == type);
|
||||
appendReturn(&c, type.size(), static_cast<Value*>(a));
|
||||
}
|
||||
|
||||
virtual void return_()
|
||||
@ -2614,6 +2614,19 @@ class MyCompiler: public Compiler {
|
||||
static_cast<Value*>(index), handler);
|
||||
}
|
||||
|
||||
virtual ir::Value* truncate(ir::Type type, ir::Type srcType, ir::Value* src)
|
||||
{
|
||||
Value* dst = value(&c, type);
|
||||
appendMove(&c,
|
||||
lir::Move,
|
||||
srcType.size(),
|
||||
srcType.size(),
|
||||
static_cast<Value*>(src),
|
||||
type.size(),
|
||||
dst);
|
||||
return dst;
|
||||
}
|
||||
|
||||
virtual ir::Value* truncateThenExtend(ir::SignExtendMode signExtend,
|
||||
ir::Type extendType,
|
||||
ir::Type truncateType,
|
||||
|
Reference in New Issue
Block a user