VSELEQ, VSELGE, VSELGT, VSELVS
Floating-point conditional select
Floating-point conditional select allows the destination register to take the value in either one or the other source register according to the condition codes in the APSR.
It has encodings from the following instruction sets:
A32 (
A1
)
and
T32 (
T1
)
.
1
1
1
1
1
1
1
0
0
1
0
!= 00
0
0
0
0
0
1
VSELEQ.F16 <Sd>, <Sn>, <Sm>
0
0
1
0
VSELEQ.F32 <Sd>, <Sn>, <Sm>
0
0
1
1
VSELEQ.F64 <Dd>, <Dn>, <Dm>
1
0
0
1
VSELGE.F16 <Sd>, <Sn>, <Sm>
1
0
1
0
VSELGE.F32 <Sd>, <Sn>, <Sm>
1
0
1
1
VSELGE.F64 <Dd>, <Dn>, <Dm>
1
1
0
1
VSELGT.F16 <Sd>, <Sn>, <Sm>
1
1
1
0
VSELGT.F32 <Sd>, <Sn>, <Sm>
1
1
1
1
VSELGT.F64 <Dd>, <Dn>, <Dm>
0
1
0
1
VSELVS.F16 <Sd>, <Sn>, <Sm>
0
1
1
0
VSELVS.F32 <Sd>, <Sn>, <Sm>
0
1
1
1
VSELVS.F64 <Dd>, <Dn>, <Dm>
if size == '00' || (size == '01' && !HaveFP16Ext()) then UNDEFINED;
integer esize;
integer d;
integer n;
integer m;
case size of
when '01' esize = 16; d = UInt(Vd:D); n = UInt(Vn:N); m = UInt(Vm:M);
when '10' esize = 32; d = UInt(Vd:D); n = UInt(Vn:N); m = UInt(Vm:M);
when '11' esize = 64; d = UInt(D:Vd); n = UInt(N:Vn); m = UInt(M:Vm);
cond = cc:(cc<1> EOR cc<0>):'0';
1
1
1
1
1
1
1
0
0
1
0
!= 00
0
0
0
0
0
1
VSELEQ.F16 <Sd>, <Sn>, <Sm>
0
0
1
0
VSELEQ.F32 <Sd>, <Sn>, <Sm>
0
0
1
1
VSELEQ.F64 <Dd>, <Dn>, <Dm>
1
0
0
1
VSELGE.F16 <Sd>, <Sn>, <Sm>
1
0
1
0
VSELGE.F32 <Sd>, <Sn>, <Sm>
1
0
1
1
VSELGE.F64 <Dd>, <Dn>, <Dm>
1
1
0
1
VSELGT.F16 <Sd>, <Sn>, <Sm>
1
1
1
0
VSELGT.F32 <Sd>, <Sn>, <Sm>
1
1
1
1
VSELGT.F64 <Dd>, <Dn>, <Dm>
0
1
0
1
VSELVS.F16 <Sd>, <Sn>, <Sm>
0
1
1
0
VSELVS.F32 <Sd>, <Sn>, <Sm>
0
1
1
1
VSELVS.F64 <Dd>, <Dn>, <Dm>
if InITBlock() then UNPREDICTABLE;
if size == '00' || (size == '01' && !HaveFP16Ext()) then UNDEFINED;
integer esize;
integer d;
integer n;
integer m;
case size of
when '01' esize = 16; d = UInt(Vd:D); n = UInt(Vn:N); m = UInt(Vm:M);
when '10' esize = 32; d = UInt(Vd:D); n = UInt(Vn:N); m = UInt(Vm:M);
when '11' esize = 64; d = UInt(D:Vd); n = UInt(N:Vn); m = UInt(M:Vm);
cond = cc:(cc<1> EOR cc<0>):'0';
InITBlock()
The instruction executes as if it passes the Condition code check.
The instruction executes as NOP. This means it behaves as if it fails the Condition code check.
<Dd>
Is the 64-bit name of the SIMD&FP destination register, encoded in the "D:Vd" field.
<Dn>
Is the 64-bit name of the first SIMD&FP source register, encoded in the "N:Vn" field.
<Dm>
Is the 64-bit name of the second SIMD&FP source register, encoded in the "M:Vm" field.
<Sd>
Is the 32-bit name of the SIMD&FP destination register, encoded in the "Vd:D" field.
<Sn>
Is the 32-bit name of the first SIMD&FP source register, encoded in the "Vn:N" field.
<Sm>
Is the 32-bit name of the second SIMD&FP source register, encoded in the "Vm:M" field.
EncodingSpecificOperations(); CheckVFPEnabled(TRUE);
case esize of
when 16
S[d] = Zeros(16) : (if ConditionHolds(cond) then S[n] else S[m])<15:0>;
when 32
S[d] = if ConditionHolds(cond) then S[n] else S[m];
when 64
D[d] = if ConditionHolds(cond) then D[n] else D[m];