mirror of
https://github.com/corda/corda.git
synced 2025-01-23 21:08:48 +00:00
split source function, update interface for floating point / instrinsic support
This commit is contained in:
parent
c042354ea0
commit
c3a389429e
@ -1679,10 +1679,6 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
return (BytesPerWord == 4 ? 3 : NoRegister);
|
return (BytesPerWord == 4 ? 3 : NoRegister);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool condensedAddressing() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool bigEndian() {
|
virtual bool bigEndian() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1770,6 +1766,18 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
*stack = *static_cast<void**>(*stack);
|
*stack = *static_cast<void**>(*stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual BinaryOperation hasBinaryIntrinsic(Thread* t, object method) {
|
||||||
|
return NoBinaryOperation;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual TernaryOperation hasTernaryIntrinsic(Thread* t UNUSED, object method UNUSED) {
|
||||||
|
return NoTernaryOperation;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool supportsFloatCompare(unsigned size) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void plan
|
virtual void plan
|
||||||
(UnaryOperation,
|
(UnaryOperation,
|
||||||
unsigned, uint8_t* aTypeMask, uint64_t* aRegisterMask,
|
unsigned, uint8_t* aTypeMask, uint64_t* aRegisterMask,
|
||||||
@ -1780,42 +1788,62 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
*thunk = false;
|
*thunk = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void plan
|
virtual void planSource
|
||||||
(BinaryOperation op,
|
(BinaryOperation op,
|
||||||
unsigned, uint8_t* aTypeMask, uint64_t* aRegisterMask,
|
unsigned, uint8_t* aTypeMask, uint64_t* aRegisterMask,
|
||||||
unsigned, uint8_t* bTypeMask, uint64_t* bRegisterMask,
|
unsigned, bool* thunk)
|
||||||
bool* thunk)
|
|
||||||
{
|
{
|
||||||
*aTypeMask = ~0;
|
*aTypeMask = ~0;
|
||||||
*aRegisterMask = ~static_cast<uint64_t>(0);
|
*aRegisterMask = ~static_cast<uint64_t>(0);
|
||||||
|
|
||||||
*bTypeMask = (1 << RegisterOperand) | (1 << MemoryOperand);
|
|
||||||
*bRegisterMask = ~static_cast<uint64_t>(0);
|
|
||||||
|
|
||||||
*thunk = false;
|
*thunk = false;
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case Compare:
|
case Compare:
|
||||||
*aTypeMask = (1 << RegisterOperand) | (1 << ConstantOperand);
|
*aTypeMask = (1 << RegisterOperand) | (1 << ConstantOperand);
|
||||||
*bTypeMask = (1 << RegisterOperand);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Negate:
|
case Negate:
|
||||||
*aTypeMask = (1 << RegisterOperand);
|
*aTypeMask = (1 << RegisterOperand);
|
||||||
|
break;
|
||||||
|
case FloatCompare:
|
||||||
|
case FloatNegate:
|
||||||
|
case Float2Float:
|
||||||
|
case Float2Int:
|
||||||
|
case Int2Float:
|
||||||
|
*thunk = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void planDestination
|
||||||
|
(BinaryOperation op,
|
||||||
|
unsigned, const uint8_t* aTypeMask, const uint64_t* aRegisterMask,
|
||||||
|
unsigned, uint8_t* bTypeMask, uint64_t* bRegisterMask)
|
||||||
|
{
|
||||||
|
*bTypeMask = (1 << RegisterOperand) | (1 << MemoryOperand);
|
||||||
|
*bRegisterMask = ~static_cast<uint64_t>(0);
|
||||||
|
|
||||||
|
switch (op) {
|
||||||
|
case Compare:
|
||||||
*bTypeMask = (1 << RegisterOperand);
|
*bTypeMask = (1 << RegisterOperand);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Negate:
|
||||||
|
*bTypeMask = (1 << RegisterOperand);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void plan
|
virtual void planSource
|
||||||
(TernaryOperation op,
|
(TernaryOperation op,
|
||||||
unsigned aSize, uint8_t* aTypeMask, uint64_t* aRegisterMask,
|
unsigned aSize, uint8_t* aTypeMask, uint64_t* aRegisterMask,
|
||||||
unsigned, uint8_t* bTypeMask, uint64_t* bRegisterMask,
|
unsigned, uint8_t* bTypeMask, uint64_t* bRegisterMask,
|
||||||
unsigned, uint8_t* cTypeMask, uint64_t* cRegisterMask,
|
unsigned, bool* thunk)
|
||||||
bool* thunk)
|
|
||||||
{
|
{
|
||||||
*aTypeMask = (1 << RegisterOperand) | (1 << ConstantOperand);
|
*aTypeMask = (1 << RegisterOperand) | (1 << ConstantOperand);
|
||||||
*aRegisterMask = ~static_cast<uint64_t>(0);
|
*aRegisterMask = ~static_cast<uint64_t>(0);
|
||||||
@ -1851,10 +1879,25 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FloatAdd:
|
||||||
|
case FloatSubtract:
|
||||||
|
case FloatMultiply:
|
||||||
|
case FloatDivide:
|
||||||
|
case FloatRemainder:
|
||||||
|
*bTypeMask = ~0;
|
||||||
|
*thunk = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void planDestination
|
||||||
|
(TernaryOperation op,
|
||||||
|
unsigned, const uint8_t*, const uint64_t*,
|
||||||
|
unsigned, const uint8_t* bTypeMask, const uint64_t* bRegisterMask,
|
||||||
|
unsigned, uint8_t* cTypeMask, uint64_t* cRegisterMask)
|
||||||
|
{
|
||||||
*cTypeMask = *bTypeMask;
|
*cTypeMask = *bTypeMask;
|
||||||
*cRegisterMask = *bRegisterMask;
|
*cRegisterMask = *bRegisterMask;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user