Encoding:

MSA

011110

0001

df

wt

ws

wd

3RF

011011

6

4

1

5

5

5

6

Format:

FSUB.df 

Vector Floating-Point Subtraction

FSUB.W wd,ws,wt

MSA

Vector Floating-Point Subtraction

FSUB.D wd,ws,wt

MSA

Vector Floating-Point Subtraction

Purpose:

Vector Floating-Point Subtraction

Vector floating-point subtraction.

Description:

wd[i] = ws[i] - wt[i]

The floating-point elements in vector wt are subtracted from the floa ting-point elements in vector ws. The result is written to vector wd.

The subtract operation is defined by the IEEE Standard for Floating-Point Arithmetic 754TM-2008.

The operands and results are values in floating-point data format df.

Restrictions:

Data-dependent exceptions are poss ible as s pecified by the I EEE Standard for Floating-Point Arithmetic 754TM2008.

Operation:

FSUB.W
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = SubtractFP(WR[ws]32i+31..32i, WR[wt]32i+31..32i, 32)
   endfor
FSUB.D
   for i in 0 .. WRLEN/64-1
      WR[wd]64i+63..64i = SubtractFP(WR[ws]64i+63..64i, WR[wt]64i+63..64i, 64)
   endfor
function SubtractFP(tt, ts, n)
   /* Implementation defined subtract operation. */
endfunction SubtractFP

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception, MSA Floating Point Exception.