mirror of
https://github.com/corda/corda.git
synced 2025-01-07 21:48:46 +00:00
enable SSE<->GPR moves when size matches word size
This commit is contained in:
parent
78d9e51b7e
commit
38bf29300f
@ -364,7 +364,8 @@ class Assembler {
|
||||
unsigned bSize, uint8_t* bTypeMask, uint64_t* bRegisterMask) = 0;
|
||||
|
||||
virtual void planMove
|
||||
(uint8_t srcTypeMask, uint64_t srcRegisterMask,
|
||||
(unsigned size,
|
||||
uint8_t srcTypeMask, uint64_t srcRegisterMask,
|
||||
uint8_t dstTypeMask, uint64_t dstRegisterMask,
|
||||
uint8_t* tmpTypeMask, uint64_t* tmpRegisterMask) = 0;
|
||||
|
||||
|
@ -2520,7 +2520,8 @@ move(Context* c, Value* value, Site* src, Site* dst)
|
||||
uint8_t tmpTypeMask;
|
||||
uint64_t tmpRegisterMask;
|
||||
c->arch->planMove
|
||||
(1 << src->type(c), src->registerMask(c),
|
||||
(value->nextWord == value ? BytesPerWord : 8,
|
||||
1 << src->type(c), src->registerMask(c),
|
||||
1 << dst->type(c), dst->registerMask(c),
|
||||
&tmpTypeMask, &tmpRegisterMask);
|
||||
|
||||
|
11
src/x86.cpp
11
src/x86.cpp
@ -3024,7 +3024,8 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
}
|
||||
|
||||
virtual void planMove
|
||||
(uint8_t srcTypeMask, uint64_t srcRegisterMask,
|
||||
(unsigned size,
|
||||
uint8_t srcTypeMask, uint64_t srcRegisterMask,
|
||||
uint8_t dstTypeMask, uint64_t dstRegisterMask,
|
||||
uint8_t* tmpTypeMask, uint64_t* tmpRegisterMask)
|
||||
{
|
||||
@ -3040,10 +3041,12 @@ class MyArchitecture: public Assembler::Architecture {
|
||||
| (static_cast<uint64_t>(GeneralRegisterMask) << 32);
|
||||
} else if (dstTypeMask & (1 << RegisterOperand)) {
|
||||
if (srcTypeMask & (1 << RegisterOperand)) {
|
||||
if (((dstRegisterMask & FloatRegisterMask) == 0)
|
||||
xor ((srcRegisterMask & FloatRegisterMask) == 0))
|
||||
if (size != BytesPerWord
|
||||
and (((dstRegisterMask & FloatRegisterMask) == 0)
|
||||
xor ((srcRegisterMask & FloatRegisterMask) == 0)))
|
||||
{
|
||||
// can't move directly from FPR to GPR or vice-versa
|
||||
// can't move directly from FPR to GPR or vice-versa for
|
||||
// values larger than the GPR size
|
||||
*tmpTypeMask = (1 << MemoryOperand);
|
||||
*tmpRegisterMask = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user