GP-0: Fixing typo in getLeastSignificatBitInBaseRegister() method

(Closes #4255)
This commit is contained in:
Ryan Kurtz 2022-05-16 13:27:08 -04:00
parent 377c7cb3d4
commit 9ea0c38993
7 changed files with 12 additions and 12 deletions

View File

@ -642,7 +642,7 @@ public class SleighDebugLogger {
String partialMatch = childMatchValue.hasValue() ? "" : "*";
String matchStr = match.equals(actual) ? " Match"
: (" Failed (=0x" + Long.toHexString(actual.longValue()) + ")");
int msb = baseRegSize - reg.getLeastSignificatBitInBaseRegister() - 1;
int msb = baseRegSize - reg.getLeastSignificantBitInBaseRegister() - 1;
int lsb = msb - reg.getBitLength() + 1;
append(partialMatch + reg.getName() + "(" + lsb + "," + msb + ") == 0x" +
Long.toHexString(match.longValue()) + matchStr);
@ -685,7 +685,7 @@ public class SleighDebugLogger {
RegisterValue childActualValue = actualValue.getRegisterValue(reg);
if (childActualValue.hasAnyValue()) {
BigInteger actual = childActualValue.getUnsignedValueIgnoreMask();
int msb = baseRegSize - reg.getLeastSignificatBitInBaseRegister() - 1;
int msb = baseRegSize - reg.getLeastSignificantBitInBaseRegister() - 1;
int lsb = msb - reg.getBitLength() + 1;
append("Set " + reg.getName() + "(" + lsb + "," + msb + ") = 0x" +
Long.toHexString(actual.longValue()) + "\n");
@ -737,7 +737,7 @@ public class SleighDebugLogger {
RegisterValue childActualValue = actualValue.getRegisterValue(reg);
if (childActualValue.hasAnyValue()) {
BigInteger actual = childActualValue.getUnsignedValueIgnoreMask();
int msb = baseRegSize - reg.getLeastSignificatBitInBaseRegister() - 1;
int msb = baseRegSize - reg.getLeastSignificantBitInBaseRegister() - 1;
int lsb = msb - reg.getBitLength() + 1;
append(msg + reg.getName() + "(" + lsb + "," + msb + ") = 0x" +

View File

@ -83,7 +83,7 @@ public interface ProcessorContextView {
RegisterValue childValue = value.getRegisterValue(reg);
if (childValue.hasAnyValue()) {
BigInteger v = childValue.getUnsignedValueIgnoreMask();
int msb = baseRegSize - reg.getLeastSignificatBitInBaseRegister() - 1;
int msb = baseRegSize - reg.getLeastSignificantBitInBaseRegister() - 1;
int lsb = msb - reg.getBitLength() + 1;
if (buf.length() != 0) {
buf.append("\n");

View File

@ -366,7 +366,7 @@ public class Register implements java.io.Serializable, Comparable<Register> {
return this;
}
public int getLeastSignificatBitInBaseRegister() {
public int getLeastSignificantBitInBaseRegister() {
return leastSigBitInBaseRegister;
}

View File

@ -49,7 +49,7 @@ public class RegisterValue {
*/
public RegisterValue(Register register) {
this.register = register;
startBit = (register.getLeastSignificatBitInBaseRegister());
startBit = (register.getLeastSignificantBitInBaseRegister());
endBit = startBit + register.getBitLength() - 1;
byte[] mask = register.getBaseMask();
bytes = new byte[mask.length * 2];
@ -62,7 +62,7 @@ public class RegisterValue {
public RegisterValue(Register register, BigInteger value) {
this.register = register;
byte[] mask = register.getBaseMask();
startBit = register.getLeastSignificatBitInBaseRegister();
startBit = register.getLeastSignificantBitInBaseRegister();
endBit = startBit + register.getBitLength() - 1;
value = value.shiftLeft(startBit);
byte[] valueBytes = value.toByteArray();
@ -118,7 +118,7 @@ public class RegisterValue {
this.register = register;
this.bytes = adjustBytes(register.getBaseRegister(), bytes);
applyRegisterMask(register.getBaseMask());
startBit = register.getLeastSignificatBitInBaseRegister();
startBit = register.getLeastSignificantBitInBaseRegister();
endBit = startBit + register.getBitLength() - 1;
}

View File

@ -191,7 +191,7 @@ public class InstructionUtils {
if (childActualValue.hasAnyValue()) {
int pad = paddedLen - reg.getName().length();
BigInteger actual = childActualValue.getUnsignedValueIgnoreMask();
int msb = baseRegSize - reg.getLeastSignificatBitInBaseRegister() - 1;
int msb = baseRegSize - reg.getLeastSignificantBitInBaseRegister() - 1;
int lsb = msb - reg.getBitLength() + 1;
if (buf.length() != 0) {
buf.append("\n");

View File

@ -333,8 +333,8 @@ public abstract class LanguageTranslatorAdapter implements LanguageTranslator {
}
protected boolean isSameRegisterConstruction(Register oldReg, Register newReg) {
if (oldReg.getLeastSignificatBitInBaseRegister() != newReg
.getLeastSignificatBitInBaseRegister() ||
if (oldReg.getLeastSignificantBitInBaseRegister() != newReg
.getLeastSignificantBitInBaseRegister() ||
oldReg.getBitLength() != newReg.getBitLength()) {
return false;
}

View File

@ -279,7 +279,7 @@ public class OldLanguageFactory {
Element fieldElement = new Element("field");
fieldElement.setAttribute("name", bitReg.getName());
int fieldBitLength = bitReg.getBitLength();
int lsb = bitReg.getLeastSignificatBitInBaseRegister();
int lsb = bitReg.getLeastSignificantBitInBaseRegister();
int msb = lsb + fieldBitLength - 1;
// Transpose bit numbering to agree with Sleigh context bit numbering