mvni

Move NOT Immediate (Vector)

MVNI <Vd>.<T>, #<imm8> {, lsl #<shift>}

Moves the inverse of an immediate value into every element.

Details

Moves the bitwise NOT of an 8-bit immediate value into every element of a NEON vector, with optional left shift by 0, 8, 16, or 24 bits. The inverted immediate is replicated across all elements of the destination vector (64-bit or 128-bit depending on Q field). No condition flags are affected. This is an AArch64-only NEON instruction requiring SIMD support.

Pseudocode Operation

shift_amount ← cmode<1:0> * 8
inverted_imm ← ~(imm8 << shift_amount)
if Q == 0 then
  Vd[63:0] ← replicate(inverted_imm, element_size)
else
  Vd[127:0] ← replicate(inverted_imm, element_size)
N ← unaffected; Z ← unaffected; C ← unaffected; V ← unaffected

Example

MVNI v0.4s.T, #16

Encoding

Binary Layout
0
Q
1
0111100000
a
b
c
cmode
0
1
d
e
f
g
h
Rd
 
Format SIMD Modified Imm
Opcode 0x2F000400
Extension NEON (SIMD)

Operands

  • Vd
    Destination SIMD/FP vector register
  • imm8
    Value

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x2F008400 MVNI <Vd>.<T>, #<imm8>{, LSL #<amount>} A64 0 | Q | 1 | 0111100000 | a | b | c | cmode | 0 | 1 | d | e | f | g | h | Rd
0x2F000400 MVNI <Vd>.<T>, #<imm8>{, LSL #<amount>} A64 0 | Q | 1 | 0111100000 | a | b | c | cmode | 0 | 1 | d | e | f | g | h | Rd
0x2F00C400 MVNI <Vd>.<T>, #<imm8>, MSL #<amount> A64 0 | Q | 1 | 0111100000 | a | b | c | cmode | 0 | 1 | d | e | f | g | h | Rd

Description

Move inverted Immediate (vector). This instruction places the inverse of an immediate constant into every vector element of the destination SIMD&FP register. Depending on the settings in the CPACR_EL1, CPTR_EL2, and CPTR_EL3 registers, and the current Security state and Exception level, an attempt to execute the instruction might be trapped.

Operation

CheckFPAdvSIMDEnabled64();
bits(datasize) operand;
bits(datasize) result;

case operation of
    when ImmediateOp_MOVI
        result = imm;
    when ImmediateOp_MVNI
        result = NOT(imm);
    when ImmediateOp_ORR
        operand = V[rd, datasize];
        result = operand OR imm;
    when ImmediateOp_BIC
        operand = V[rd, datasize];
        result = operand AND NOT(imm);

V[rd, datasize] = result;