mvni

Move NOT Immediate (Vector)

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

Moves the inverse of an immediate value into every element.

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
31
Q
30
1
29
0111100000
28:19
a
18
b
17
c
16
cmode
15:12
0
11
1
10
d
9
e
8
f
7
g
6
h
5
Rd
4:0
 
Format SIMD Modified Imm
Opcode 0x2F000400
Extension NEON (SIMD)

Operands

  • Vd
    Destination SIMD/FP vector register
  • imm8
    Value

Related

More in NEON (SIMD)

Reference

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;