Data processing (scalar floating-point and Advanced SIMD)
fixed bit field field the encoding fixes should be
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | Q | op | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | a | b | c | cmode | 0 | 1 | d | e | f | g | h | Rd | |||||||
0xx0111100000xxxxxxx01xxxxxxxxxx
let 'rd = UInt(Rd);
let 'datasize = if Q == 0b1 then 128 else 64;
operation : ImmediateOp = undefined;
match cmode @ op {
[bitzero, _, _, bitzero, bitzero] => {
operation = ImmediateOp_MOVI
},
[bitzero, _, _, bitzero, bitone] => {
operation = ImmediateOp_MVNI
},
[bitzero, _, _, bitone, bitzero] => {
operation = ImmediateOp_ORR
},
[bitzero, _, _, bitone, bitone] => {
operation = ImmediateOp_BIC
},
[bitone, bitzero, _, bitzero, bitzero] => {
operation = ImmediateOp_MOVI
},
[bitone, bitzero, _, bitzero, bitone] => {
operation = ImmediateOp_MVNI
},
[bitone, bitzero, _, bitone, bitzero] => {
operation = ImmediateOp_ORR
},
[bitone, bitzero, _, bitone, bitone] => {
operation = ImmediateOp_BIC
},
[bitone, bitone, bitzero, _, bitzero] => {
operation = ImmediateOp_MOVI
},
[bitone, bitone, bitzero, _, bitone] => {
operation = ImmediateOp_MVNI
},
[bitone, bitone, bitone, bitzero, _] => {
operation = ImmediateOp_MOVI
},
0b11110 => {
operation = ImmediateOp_MOVI
},
0b11111 => {
if Q == 0b0 then {
throw(Error_Undefined())
};
operation = ImmediateOp_MOVI
}
};
let operation = operation;
let imm64 : bits(64) = AdvSIMDExpandImm(op, cmode, ((((((a @ b) @ c) @ d) @ e) @ f) @ g) @ h);
let imm : bits('datasize) = Replicate(imm64, DIV(datasize, 64));
execute_aarch64_instrs_vector_logical(datasize, imm, operation, rd)
CheckFPAdvSIMDEnabled64();
operand : bits('datasize) = undefined;
result : bits('datasize) = undefined;
match operation {
ImmediateOp_MOVI => {
result = imm
},
ImmediateOp_MVNI => {
result = not_vec(imm)
},
ImmediateOp_ORR => {
let operand : bits('datasize) = V_read(rd, datasize);
result = operand | imm
},
ImmediateOp_BIC => {
let operand : bits('datasize) = V_read(rd, datasize);
result = operand & not_vec(imm)
}
};
V_set(rd, datasize) = result
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.