amoxor.d.aq

Atomic fetch-and-xor doubleword (acquire)

This instruction is defined by:

Encoding

svg

Synopsis

Atomically with acquire ordering:

  • Load the doubleword at address xs1

  • Write the loaded value into xd

  • XOR the value of register xs2 to the loaded value

  • Write the result to the address in xs1

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

Bits<5> xs2 = $encoding[24:20];
Bits<5> xs1 = $encoding[19:15];
Bits<5> xd = $encoding[11:7];

Execution

  • Pruned, XLEN == 64

  • Original

memory_model_acquire();
XReg virtual_address = X[xs1];
X[xd] = amo(64, virtual_address, X[xs2], AmoOperation::Xor, 1'b1, 1'b0, $encoding);
if (implemented?(ExtensionName::A) && MISA_CSR_IMPLEMENTED && CSR[misa].A == 1'b0) {
  reserved_instruction($encoding);
}
memory_model_acquire();
XReg virtual_address = X[xs1];
X[xd] = amo(64, virtual_address, X[xs2], AmoOperation::Xor, 1'b1, 1'b0, $encoding);

Exceptions

This instruction may result in the following synchronous exceptions:

  • LoadAccessFault

  • StoreAmoAccessFault

  • StoreAmoAddressMisaligned

  • StoreAmoPageFault