mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
use Compiler::truncateThenExtend in more places
This commit is contained in:
parent
26d8e8aa1f
commit
4c4cc49510
@ -2652,6 +2652,7 @@ class MyCompiler: public Compiler {
|
|||||||
assert(&c, dstType.size() >= TargetBytesPerWord);
|
assert(&c, dstType.size() >= TargetBytesPerWord);
|
||||||
assert(&c, srcType.flavor() == srcSelectType.flavor());
|
assert(&c, srcType.flavor() == srcSelectType.flavor());
|
||||||
assert(&c, srcType.flavor() == dstType.flavor());
|
assert(&c, srcType.flavor() == dstType.flavor());
|
||||||
|
assert(&c, srcType == srcSelectType);
|
||||||
|
|
||||||
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
||||||
appendMove(&c,
|
appendMove(&c,
|
||||||
|
@ -4807,19 +4807,13 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case i2b: {
|
case i2b: {
|
||||||
frame->pushInt(c->load(ir::SignExtend,
|
frame->pushInt(c->truncateThenExtend(
|
||||||
types.address,
|
ir::SignExtend, types.address, types.i1, frame->popInt()));
|
||||||
types.i1,
|
|
||||||
frame->popInt(),
|
|
||||||
types.address));
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case i2c: {
|
case i2c: {
|
||||||
frame->pushInt(c->load(ir::ZeroExtend,
|
frame->pushInt(c->truncateThenExtend(
|
||||||
types.address,
|
ir::ZeroExtend, types.address, types.i2, frame->popInt()));
|
||||||
types.i2,
|
|
||||||
frame->popInt(),
|
|
||||||
types.address));
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case i2d: {
|
case i2d: {
|
||||||
@ -4836,11 +4830,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case i2s: {
|
case i2s: {
|
||||||
frame->pushInt(c->load(ir::SignExtend,
|
frame->pushInt(c->truncateThenExtend(
|
||||||
types.address,
|
ir::SignExtend, types.address, types.i2, frame->popInt()));
|
||||||
types.i2,
|
|
||||||
frame->popInt(),
|
|
||||||
types.address));
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case iadd:
|
case iadd:
|
||||||
|
Loading…
Reference in New Issue
Block a user