Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC Numerics / Part 3 - Appendixes
Appendix F - PowerPC Assembly-Language Numerics Reference


Instructions

Note
Throughout the tables that follow, in the Exceptions column, I = invalid; X = inexact; O = overflow; U = underflow; D = divide by zero. In the Instructions column, * = append dot (.) to instruction name to update CR1.
Table F-5 FPSCR instructions
InstructionDescriptionSRCDSTExceptions
mcrfs DST, SRCDST <-- (SRC)FPSCR fieldCR field- - - - -
mffs* DSTDST <-- (FPSCR)FPSCRFPR- - - - -
mtfsf* DST, SRCDST <-- SRCFPRFPSCR field- - - - -
mtfsfi* DST, nDST <-- n 16-bit signed intFPSCR field- - - - -
mtfsb1* DSTDST <-- 1 --FPSCR bit- - - - -
mtfsb0* DSTDST <-- 0 --FPSCR bit- - - - -
Table F-6 Load instructions
InstructionDescriptionSRCDSTExceptions
lfd DST, n(GPR)DST <-- (n + (GPR)) MemoryFPR- - - - -
lfdu DST, n(GPR)DST <-- (n + (GPR))
GPR <-- n + (GPR)
MemoryFPR- - - - -
lfdx DST, GPR1, GPR2DST <-- ((GPR1) + (GPR2)) MemoryFPR- - - - -
lfdux DST, GPR1, GPR2DST <-- ((GPR1) + (GPR2))
GPR1 <-- (GPR1) + (GPR2)
MemoryFPR- - - - -
lfs DST, n(GPR)DST <-- (n + (GPR)) [80]MemoryFPR- - - - -
lfsu DST, n(GPR)DST <-- (n + (GPR))
GPR <-- n + (GPR)
MemoryFPR- - - - -
lfsx DST, GPR1, GPR2DST <-- ((GPR1) + (GPR2))MemoryFPR- - - - -
lfsux DST, GPR1, GPR2DST <-- ((GPR1) + (GPR2))
GPR1 <-- (GPR1) + (GPR2)
MemoryFPR- - - - -
Table F-7 Store instructions
InstructionDescriptionSRCDSTExceptions
stfd SRC, n(GPR)n + (GPR)<-- (SRC) FPRMemory- - - - -
stfdu SRC, n(GPR)n + (GPR)<-- (SRC)
GPR <-- n + (GPR)
FPRMemory- - - - -
stfdx SRC, GPR1, GPR2(GPR1) + (GPR2)<-- (SRC) FPRMemory- - - - -
stfdux SRC, GPR1, GPR2(GPR1) + (GPR2)<-- (SRC)
GPR1 <-- (GPR1) + (GPR2)
FPRMemory- - - - -
stfs SRC, n(GPR)n + (GPR)<-- (SRC) [82]FPRMemory- - - - -
stfsu SRC, n(GPR)n + (GPR)<-- (SRC)
GPR <-- n + (GPR)
FPRMemory- - - - -
stfsx SRC, GPR1, GPR2(GPR1) + (GPR2)<-- (SRC) FPRMemory- - - - -
stfsux SRC, GPR1, GPR2(GPR1) + (GPR2)<-- (SRC)
GPR1 <-- (GPR1) + (GPR2)
FPRMemory- - - - -
Table F-8 Conversions to integer format
InstructionDescriptionSRCDSTExceptions
fctiw* DST, SRCDST <-- (SRC) rounded to 32-bit int FPRGPRI X - - -
fctiwz* DST, SRCDST <-- (SRC) truncated to 32-bit int FPRGPRI X - - -
Table F-9 Conversions from double to single format
InstructionDescriptionSRCDSTExceptions
frsp* DST, SRCDST <-- (SRC) rounded to single formatFPRFPRI X O U -
Table F-10 Comparison instructions
InstructionDescriptionSRCDSTExceptions
fcmpo DST, SRC1, SRC2DST <-- (SRC1) compare (SRC2)FPRsCR fieldI - - - -
fcmpu DST, SRC1, SRC2DST <-- (SRC1) compare (SRC2)FPRsCR field- - - - -
Table F-11 Arithmetic instructions
InstructionDescriptionSRCDSTExceptions
fadd* DST, SRC1, SRC2DST <-- (SRC1) + (SRC2)FPRsFPRI X O U -
fsub* DST, SRC1, SRC2DST <-- (SRC1) - (SRC2)FPRsFPRI X O U -
fmul* DST, SRC1, SRC2DST <-- (SRC1) (SRC2)FPRsFPRI X O U -
fdiv* DST, SRC1, SRC2DST <-- (SRC1) / (SRC2)FPRsFPRI X O U D
Table F-12 Multiply-add instructions
InstructionDescriptionSRCDSTExceptions
fmadd* DST, SRC1, SRC2, SRC3DST <-- (SRC1) (SRC2)
+ (SRC3)
FPRsFPRI X O U -
fmsub* DST, SRC1, SRC2, SRC3DST <-- (SRC1) (SRC2)
- (SRC3)
FPRsFPRI X O U -
fnmadd* DST, SRC1, SRC2, SRC3DST <-- - ((SRC1) (SRC2) + (SRC3))FPRsFPRI X O U -
fnmsub* DST, SRC1, SRC2, SRC3DST <-- - ((SRC1) (SRC2) - (SRC3))FPRsFPRI X O U -
Table F-13 Move instructions
InstructionDescriptionSRCDSTExceptions
fabs* DST, SRCDST <-- |(SRC)|FPRFPR- - - - -
fmr* DST, SRCDST <-- (SRC)FPRFPR- - - - -
fneg* DST, SRCDST <-- - (SRC)FPRFPR- - - - -
fnabs* DST, SRCDST <-- - |(SRC)|FPRFPR- - - - -


[80] Converts single to double format automatically.
[82] Converts double to single automatically.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996