nmacchws
Negative Multiply Accumulate Cross Halfword to Word Saturate Signed
PPC440x5 CPU Core User’s Manual
Preliminary
Page 386 of 589
instrset.fm.
September 12, 2002
nmacchws
Negative Multiply Accumulate High Halfword to Word Saturate Signed
nprod
0:31
←
–((RA)
16:31
×
(RB)
0:15
signed
temp
0:32
←
nprod
0:31
+ (RT)
if ((nprod
0
= RT
0
)
∧
(RT
0
≠
temp
1
)) then (RT)
←
(RT
0
||
31
(
¬
RT
0
))
else (RT)
←
temp
1:32
The low-order halfword of RA is multiplied by the high-order halfword of RB. The signed product is subtracted
from the contents of RT.
If the result of the subtraction can be represented in 32 bits, then RT is updated with the low-order 32 bits of
the result.
If the result of the subtraction cannot be represented in 32 bits, then RT is updated with a value which is
“saturated” to the nearest representable value. That is, if the result is less than –2
31
, then RT is updated with
–2
31
. Likewise, if the result is greater than 2
31
– 1, then RT is updated with 2
31
– 1.
Registers Altered
• RT
• CR[CR0] if Rc contains 1
• XER[SO, OV] if OE contains 1
Architecture Note
This instruction is implementation-specific and programs which use this instruction may not be portable to
other PowerPC Book-E implementations. See Instruction Set Portability on page 250.
nmacchws
RT, RA, RB
OE=0, Rc=0
nmacchws.
RT, RA, RB
OE=0, Rc=1
nmacchwso
RT, RA, RB
OE=1, Rc=0
nmacchwso. RT, RA, RB
OE=1, Rc=1
4
RT
RA
RB
OE
238
Rc
0
6
11
16
21 22
31
Содержание PPC440X5 CPU Core
Страница 1: ...PPC440x5 CPU Core User s Manual Preliminary SA14 2613 02 September 12 2002 Title Page...
Страница 22: ...User s Manual PPC440x5 CPU Core Preliminary Page 22 of 583 ppc440x5LOT fm September 12 2002...
Страница 26: ...User s Manual PPC440x5 CPU Core Preliminary Page 26 of 589 preface fm September 12 2002...
Страница 38: ...User s Manual PPC440x5 CPU Core Preliminary Page 38 of 589 overview fm September 12 2002...
Страница 94: ...User s Manual PPC440x5 CPU Core Preliminary Page 94 of 589 init fm September 12 2002...
Страница 132: ...User s Manual PPC440x5 CPU Core Preliminary Page 132 of 589 cache fm September 12 2002...
Страница 158: ...User s Manual PPC440x5 CPU Core Preliminary Page 158 of 589 mmu fm September 12 2002...
Страница 218: ...User s Manual PPC440x5 CPU Core Preliminary Page 218 of 589 timers fm September 12 2002...
Страница 248: ...User s Manual PPC440x5 CPU Core Preliminary Page 248 of 589 debug fm September 12 2002...
Страница 458: ...User s Manual PPC440x5 CPU Core Preliminary Page 458 of 589 regsummIntro fm September 12 2002...
Страница 568: ...User s Manual PPC440x5 CPU Core Preliminary Page 568 of 589 instalfa fm September 12 2002...
Страница 588: ...User s Manual PPC440x5 CPU Core Preliminary Page 588 of 583 ppc440x5IX fm September 12 2002...
Страница 590: ......