LDR (reg fpsimd)

Loads and stores

fixed bit field field the encoding fixes should be

Memory single simdfp register

313029282726252423222120191817161514131211109876543210
size111100x11Rmoption_nameS10RnRt
opc

xx111100x11xxxxxxxxx10xxxxxxxxxx

Decode Sail

let wback : bool = false;
let postindex : bool = false;
let 'scale = UInt([opc[1]] @ size);
if scale > 4 then {
    throw(Error_Undefined())
};
if [option_name[1]] == 0b0 then {
    throw(Error_Undefined())
};
let extend_type : ExtendType = DecodeRegExtend(option_name);
let 'shift = if S == 0b1 then scale else 0;
let 'n = UInt(Rn);
let 't = UInt(Rt);
let 'm = UInt(Rm);
let nontemporal : bool = false;
let memop : MemOp = if [opc[0]] == 0b1 then MemOp_LOAD else MemOp_STORE;
let 'datasize = (8 << scale);
let tagchecked : bool = memop != MemOp_PREFETCH;
assert(constraint('datasize in {8, 16, 32, 64, 128, 256, 512, 1024}));
execute_aarch64_instrs_memory_single_simdfp_register(datasize, extend_type, m, memop, n, nontemporal, postindex, shift, t, tagchecked, wback)

Operation Sail

let offset : bits(64) = ExtendReg(m, extend_type, shift, 64);
CheckFPEnabled64();
address : bits(64) = undefined;
data : bits('datasize) = undefined;
let accdesc : AccessDescriptor = CreateAccDescASIMD(memop, nontemporal, tagchecked);
if n == 31 then {
    CheckSPAlignment();
    address = SP_read()
} else {
    address = X_read(n, 64)
};
if not_bool(postindex) then {
    address = address + offset
};
match memop {
  MemOp_STORE => {
      assert(constraint('datasize in {8, 16, 32, 64, 128}));
      let data : bits('datasize) = V_read(t, datasize);
      Mem_set(address, DIV(datasize, 8), accdesc) = data
  },
  MemOp_LOAD => {
      let data : bits('datasize) = Mem_read(address, DIV(datasize, 8), accdesc);
      assert(constraint('datasize in {8, 16, 32, 64, 128}));
      V_set(t, datasize) = data
  },
  _ => ()
};
if wback then {
    if postindex then {
        address = address + offset
    };
    if n == 31 then {
        SP_set() = address
    } else {
        X_set(n, 64) = address
    }
};
if SPESampleInFlight then {
    SPESampleSIMDFPLoadStore()
};
()

Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.