Unique scratchpad addresses

This commit is contained in:
tevador
2019-04-14 17:21:26 +02:00
parent 2c87a058ec
commit 33a2fd021d
6 changed files with 287 additions and 288 deletions
+6 -7
View File
@@ -29,11 +29,11 @@ namespace RandomX {
}
void Instruction::genAddressReg(std::ostream& os) const {
os << ((mod % 4) ? "L1" : "L2") << "[r" << (int)src << "]";
os << ((mod % 4) ? "L1" : "L2") << "[r" << (int)src << std::showpos << (int32_t)getImm32() << std::noshowpos << "]";
}
void Instruction::genAddressRegDst(std::ostream& os) const {
os << ((mod % 4) ? "L1" : "L2") << "[r" << (int)dst << "]";
os << ((mod % 4) ? "L1" : "L2") << "[r" << (int)dst << std::showpos << (int32_t)getImm32() << std::noshowpos << "]";
}
void Instruction::genAddressImm(std::ostream& os) const {
@@ -41,12 +41,11 @@ namespace RandomX {
}
void Instruction::h_IADD_RS(std::ostream& os) const {
if (src != dst) {
os << "r" << (int)dst << ", r" << (int)src << ", LSH " << (int)(mod % 4) << std::endl;
}
else {
os << "r" << (int)dst << ", " << (int32_t)getImm32() << std::endl;
os << "r" << (int)dst << ", r" << (int)src;
if(dst == RegisterNeedsDisplacement) {
os << ", " << (int32_t)getImm32();
}
os << ", LSH " << (int)(mod % 4) << std::endl;
}
void Instruction::h_IADD_M(std::ostream& os) const {