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