mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
implement xorRR, remove unused Assembler::stackSyncRegister
This commit is contained in:
parent
9976c1132c
commit
a259beccdc
@ -153,8 +153,6 @@ class Assembler {
|
||||
virtual unsigned argumentRegisterCount() = 0;
|
||||
virtual int argumentRegister(unsigned index) = 0;
|
||||
|
||||
virtual int stackSyncRegister(unsigned index) = 0;
|
||||
|
||||
virtual void getTargets(UnaryOperation op, unsigned size,
|
||||
Register* a) = 0;
|
||||
|
||||
|
30
src/x86.cpp
30
src/x86.cpp
@ -872,6 +872,17 @@ andCM(Context* c, unsigned size UNUSED, Assembler::Constant* a,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xorRR(Context* c, unsigned size UNUSED, Assembler::Register* a,
|
||||
Assembler::Register* b)
|
||||
{
|
||||
assert(c, BytesPerWord == 8 or size == 4); // todo
|
||||
|
||||
rex(c);
|
||||
c->code.append(0x31);
|
||||
c->code.append(0xc0 | (a->low << 3) | b->low);
|
||||
}
|
||||
|
||||
void
|
||||
shiftLeftCR(Context* c, unsigned size UNUSED, Assembler::Constant* a,
|
||||
Assembler::Register* b)
|
||||
@ -1047,6 +1058,8 @@ populateTables()
|
||||
BinaryOperations[INDEX2(And, Constant, Register)] = CAST2(andCR);
|
||||
BinaryOperations[INDEX2(And, Constant, Memory)] = CAST2(andCM);
|
||||
|
||||
BinaryOperations[INDEX2(Xor, Register, Register)] = CAST2(xorRR);
|
||||
|
||||
BinaryOperations[INDEX2(ShiftLeft, Constant, Register)] = CAST2(shiftLeftCR);
|
||||
|
||||
BinaryOperations[INDEX2(Subtract, Constant, Register)] = CAST2(subtractCR);
|
||||
@ -1124,23 +1137,6 @@ class MyAssembler: public Assembler {
|
||||
}
|
||||
}
|
||||
|
||||
virtual int stackSyncRegister(unsigned index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return rax;
|
||||
case 1:
|
||||
return rcx;
|
||||
case 2:
|
||||
return rdx;
|
||||
case 3:
|
||||
return rsi;
|
||||
case 4:
|
||||
return rdi;
|
||||
default:
|
||||
abort(&c);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void getTargets(UnaryOperation /*op*/, unsigned /*size*/,
|
||||
Register* r)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user