mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
remove redundant Compiler::load srcSelectType parameter
This commit is contained in:
parent
4c4cc49510
commit
00253ce528
@ -117,7 +117,6 @@ class Compiler {
|
||||
Operand* dst) = 0;
|
||||
virtual Operand* load(ir::SignExtendMode signExtend,
|
||||
ir::Type srcType,
|
||||
ir::Type srcSelectType,
|
||||
Operand* src,
|
||||
ir::Type dstType) = 0;
|
||||
|
||||
|
@ -2645,20 +2645,17 @@ class MyCompiler: public Compiler {
|
||||
|
||||
virtual Operand* load(ir::SignExtendMode signExtend,
|
||||
ir::Type srcType,
|
||||
ir::Type srcSelectType,
|
||||
Operand* src,
|
||||
ir::Type dstType)
|
||||
{
|
||||
assert(&c, dstType.size() >= TargetBytesPerWord);
|
||||
assert(&c, srcType.flavor() == srcSelectType.flavor());
|
||||
assert(&c, srcType.flavor() == dstType.flavor());
|
||||
assert(&c, srcType == srcSelectType);
|
||||
|
||||
Value* dst = value(&c, static_cast<Value*>(src)->type);
|
||||
appendMove(&c,
|
||||
signExtend == ir::SignExtend ? lir::Move : lir::MoveZ,
|
||||
srcType.size(),
|
||||
srcSelectType.size(),
|
||||
srcType.size(),
|
||||
static_cast<Value*>(src),
|
||||
dstType.size(),
|
||||
dst);
|
||||
|
@ -3715,7 +3715,6 @@ popLongAddress(Frame* frame)
|
||||
ir::Types types(TargetBytesPerWord);
|
||||
return TargetBytesPerWord == 8 ? frame->popLong()
|
||||
: frame->c->load(ir::SignExtend,
|
||||
types.i8,
|
||||
types.i8,
|
||||
frame->popLong(),
|
||||
types.address);
|
||||
@ -3760,7 +3759,6 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
||||
Compiler::Operand* address = popLongAddress(frame);
|
||||
frame->popObject();
|
||||
frame->pushInt(c->load(ir::SignExtend,
|
||||
types.i1,
|
||||
types.i1,
|
||||
c->memory(address, types.i1),
|
||||
types.address));
|
||||
@ -3781,7 +3779,6 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
||||
Compiler::Operand* address = popLongAddress(frame);
|
||||
frame->popObject();
|
||||
frame->pushInt(c->load(ir::SignExtend,
|
||||
types.i2,
|
||||
types.i2,
|
||||
c->memory(address, types.i2),
|
||||
types.address));
|
||||
@ -3805,7 +3802,6 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
||||
frame->popObject();
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.i4,
|
||||
types.i4,
|
||||
c->memory(address,
|
||||
MATCH(methodName(t, target), "getInt") ? types.i4
|
||||
@ -3833,7 +3829,6 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
||||
frame->popObject();
|
||||
frame->pushLong(
|
||||
c->load(ir::SignExtend,
|
||||
types.i8,
|
||||
types.i8,
|
||||
c->memory(address,
|
||||
MATCH(methodName(t, target), "getLong") ? types.i8
|
||||
@ -3858,7 +3853,6 @@ intrinsic(MyThread* t, Frame* frame, object target)
|
||||
Compiler::Operand* address = popLongAddress(frame);
|
||||
frame->popObject();
|
||||
frame->pushLong(c->load(ir::SignExtend,
|
||||
types.address,
|
||||
types.address,
|
||||
c->memory(address, types.address),
|
||||
types.i8));
|
||||
@ -4114,7 +4108,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case aaload:
|
||||
frame->pushObject(
|
||||
c->load(ir::SignExtend,
|
||||
types.address,
|
||||
types.address,
|
||||
c->memory(array, types.object, TargetArrayBody, index),
|
||||
types.address));
|
||||
@ -4123,7 +4116,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case faload:
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.f4,
|
||||
types.f4,
|
||||
c->memory(array, types.f4, TargetArrayBody, index),
|
||||
types.f8));
|
||||
@ -4132,7 +4124,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case iaload:
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.i4,
|
||||
types.i4,
|
||||
c->memory(array, types.i4, TargetArrayBody, index),
|
||||
types.address));
|
||||
@ -4141,7 +4132,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case baload:
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.i1,
|
||||
types.i1,
|
||||
c->memory(array, types.i1, TargetArrayBody, index),
|
||||
types.address));
|
||||
@ -4150,7 +4140,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case caload:
|
||||
frame->pushInt(
|
||||
c->load(ir::ZeroExtend,
|
||||
types.i2,
|
||||
types.i2,
|
||||
c->memory(array, types.i2, TargetArrayBody, index),
|
||||
types.address));
|
||||
@ -4159,7 +4148,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case daload:
|
||||
frame->pushLong(
|
||||
c->load(ir::SignExtend,
|
||||
types.f8,
|
||||
types.f8,
|
||||
c->memory(array, types.f8, TargetArrayBody, index),
|
||||
types.f8));
|
||||
@ -4168,7 +4156,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case laload:
|
||||
frame->pushLong(
|
||||
c->load(ir::SignExtend,
|
||||
types.i8,
|
||||
types.i8,
|
||||
c->memory(array, types.i8, TargetArrayBody, index),
|
||||
types.i8));
|
||||
@ -4177,7 +4164,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case saload:
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.i2,
|
||||
types.i2,
|
||||
c->memory(array, types.i2, TargetArrayBody, index),
|
||||
types.address));
|
||||
@ -4337,7 +4323,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
case arraylength: {
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend,
|
||||
types.address,
|
||||
types.address,
|
||||
c->memory(frame->popObject(), types.i4, TargetArrayLength),
|
||||
types.address));
|
||||
@ -4653,7 +4638,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.i1,
|
||||
types.i1,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
types.address));
|
||||
break;
|
||||
@ -4662,7 +4646,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::ZeroExtend,
|
||||
types.i2,
|
||||
types.i2,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
types.address));
|
||||
break;
|
||||
@ -4671,7 +4654,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.i2,
|
||||
types.i2,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
types.address));
|
||||
break;
|
||||
@ -4680,7 +4662,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.f4,
|
||||
types.f4,
|
||||
c->memory(table, types.f4, targetFieldOffset(context, field)),
|
||||
types.f8));
|
||||
break;
|
||||
@ -4689,7 +4670,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend,
|
||||
types.i4,
|
||||
types.i4,
|
||||
c->memory(table, types.i4, targetFieldOffset(context, field)),
|
||||
types.address));
|
||||
break;
|
||||
@ -4698,7 +4678,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushLong(c->load(
|
||||
ir::SignExtend,
|
||||
types.f8,
|
||||
types.f8,
|
||||
c->memory(table, types.f8, targetFieldOffset(context, field)),
|
||||
types.f8));
|
||||
break;
|
||||
@ -4707,7 +4686,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushLong(c->load(
|
||||
ir::SignExtend,
|
||||
types.i8,
|
||||
types.i8,
|
||||
c->memory(table, types.i8, targetFieldOffset(context, field)),
|
||||
types.i8));
|
||||
break;
|
||||
@ -4716,7 +4694,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
frame->pushObject(c->load(
|
||||
ir::SignExtend,
|
||||
types.address,
|
||||
types.address,
|
||||
c->memory(table, types.object, targetFieldOffset(context, field)),
|
||||
types.address));
|
||||
break;
|
||||
@ -5322,8 +5299,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
} break;
|
||||
|
||||
case l2i:
|
||||
frame->pushInt(c->load(
|
||||
ir::SignExtend, types.i8, types.i8, frame->popLong(), types.address));
|
||||
frame->pushInt(
|
||||
c->load(ir::SignExtend, types.i8, frame->popLong(), types.address));
|
||||
break;
|
||||
|
||||
case ladd:
|
||||
@ -6178,7 +6155,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
|
||||
normalizedKey);
|
||||
|
||||
c->jmp(c->load(ir::SignExtend,
|
||||
types.address,
|
||||
types.address,
|
||||
context->bootContext
|
||||
? c->binaryOp(lir::Add,
|
||||
|
Loading…
Reference in New Issue
Block a user