sd
Store doubleword from even/odd register pair
Stores a 64-bit value from registers xs2 and xs2+1. The effective address is obtained by adding register xs1 to the sign-extended 12-bit offset.
Decode Variables
Bits<5> xs1 = $encoding[19:15];
Bits<5> xs2 = $encoding[24:20];
Bits<12> imm = {$encoding[31:25], $encoding[11:7]};
Execution
-
IDL
-
Sail
Bits<MXLEN> base = X[xs1];
Bits<MXLEN> offset = $signed(imm);
Bits<MXLEN> eff_addr = base + offset;
Bits<32> lower_word = X[xs2];
Bits<32> upper_word = X[xs2 + 1];
Bits<64> store_data = {upper_word, lower_word};
write_memory<64>(eff_addr, store_data, $encoding);