Added ability to write to zero register (discard) w/ S
This commit is contained in:
parent
14fbb7e4fc
commit
294b03ddde
@ -74,7 +74,9 @@ static dword readRegister(Machine *state, a64inst_regSpecifier reg, a64inst_regT
|
|||||||
// and truncating the value being written when it can't fit in the specified register
|
// and truncating the value being written when it can't fit in the specified register
|
||||||
static void writeRegister(Machine *state, a64inst_regSpecifier reg, a64inst_regType regType, dword value) {
|
static void writeRegister(Machine *state, a64inst_regSpecifier reg, a64inst_regType regType, dword value) {
|
||||||
assert(reg <= REGISTER_COUNT);
|
assert(reg <= REGISTER_COUNT);
|
||||||
state->registers[reg] = truncateValue(value, regType);
|
if (reg != ZERO_REGISTER) {
|
||||||
|
state->registers[reg] = truncateValue(value, regType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the position of the MSB of the given register type
|
// Returns the position of the MSB of the given register type
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user