A.24.1 Floating-Point Multiply-Add/Subtract

SPARC64 V uses IMPDEP2B opcode space to encode the Floating-Point Multiply Add/Subtract instructions.

Opcode

Variation

Size†

Operation

 

 

 

 

FMADDs

00

01

Multiply-Add Single

FMADDd

00

10

Multiply-Add Double

FMSUBs

01

01

Multiply-Subtract Single

FMSUBd

01

10

Multiply-Subtract Double

FNMADDs

11

01

Negative Multiply-Add Single

FNMADDd

11

10

Negative Multiply-Add Double

FNMSUBs

10

01

Negative Multiply-Subtract Single

FNMSUBd

10

10

Negative Multiply-Subtract Double

 

 

 

 

11 is reserved for quad.

Format (5)

10

 

rd

 

110111

 

rs1

 

rs3

 

var

size

 

rs2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31 30

29

25 24

19 18

14 13

9 8

7

6

5 4

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Operation

 

 

Implementation

 

 

 

 

 

 

 

 

Multiply-Add

Multiply-Subtract

Negative Multiply-Subtract

Negative Multiple-Add

rd

rs1

rs2 +

rs3

 

rd

rs1

rs2

rs3

 

rd

(rs1

rs2

rs3)

rd

(rs1

rs2 +

rs3)

Assembly Language Syntax

fmadds fregrs1, fregrs2, fregrs3, fregrd

fmaddd fregrs1, fregrs2, fregrs3, fregrd

fmsubs fregrs1, fregrs2, fregrs3, fregrd

fmsubd fregrs1, fregrs2, fregrs3, fregrd

fnmadds fregrs1, fregrs2, fregrs3, fregrd

fnmaddd fregrs1, fregrs2, fregrs3, fregrd

fnmsubs fregrs1, fregrs2, fregrs3, fregrd

fnmsubd fregrs1, fregrs2, fregrs3, fregrd

50 SPARC JPS1 Implementation Supplement: Fujitsu SPARC64 V • Release 1.0, 1 July 2002

Page 61
Image 61
Fujitsu Fujitsu SPARC64 V manual Floating-Point Multiply-Add/Subtract, Format