35.3.1.5. INTEGER ARITHMETICAL ON POWER PC




0..5	opcode1
6..10	D
11..15	A
16..20	B
21	OE
22.30	opcode2
31	Rc

					(DEC).(DEC)
			OE  	Rc	opcode1.opcode2
add	rD,rA,rB	0	0	31.266		Add
add.	rD,rA,rB	0	1	
addo	rD,rA,rB	1	0
addo.	rD,rA,rB	1	1

addc	rD,rA,rB	0	0	31.10		Add Carrying
addc.	rD,rA,rB	0	1	
addco	rD,rA,rB	1	0
addco.	rD,rA,rB	1	1

	rD <- rA + rB


adde	rD,rA,rB	0	0	31.138		Add Extended
adde.	rD,rA,rB	0	1	
addeo	rD,rA,rB	1	0
addeo.	rD,rA,rB	1	1

	rD <- rA + rB + XER[CA]



divw	rD,rA,rB	0	0	31.491		Divide word
divw.	rD,rA,rB	0	1
divwo	rD,rA,rB	1	0
divwo.	rD,rA,rB	1	1

	rD <- rA / rB		(signed)



divwu	rD,rA,rB	0	0	31.459		Divide word unsigned
divwu.	rD,rA,rB	0	1
divwuo	rD,rA,rB	1	0
divwuo.	rD,rA,rB	1	1

	rD <- rA / rB		(unsigned)



mulhw	rD,rA,rB	0	0	31.75		Multiply High word
mulhw.	rD,rA,rB	0	1

	tmp[0-63] <- rA[32-63] * rB[32-63]	(Signed)
	rD[32-63] <- tmp[0-31]
	rD[0-31]  <- UNDEFINED



mulhwu	rD,rA,rB	0	0	31.11		Multiply High word
mulhwu.	rD,rA,rB	0	1			Unsigned	

	tmp[0-63] <- rA[32-63] * rB[32-63]	(Unsigned)
	rD[32-63] <- tmp[0-31]
	rD[0-31]  <- UNDEFINED



mullw	rD,rA,rB	0	0	31.235		Multiply Low
mullw.	rD,rA,rB	0	1
mullwo	rD,rA,rB	1	0
mullwo.	rD,rA,rB	1	1

	rD <- rA[32-63] * rB[32-63]


subf	rD,rA,rB	0	0	31.40		Subtract from
subf.	rD,rA,rB	0	1
subfo	rD,rA,rB	1	0
subfo.	rD,rA,rB	1	1
subfc	rD,rA,rB	0	0	31.8		Subtract from
subfc.	rD,rA,rB	0	1			Carrying
subfco	rD,rA,rB	1	0
subfco.	rD,rA,rB	1	1

	rD <- ~rA + rB + 1



subfe	rD,rA,rB	0	0	31.136		Subtract from
subfe.	rD,rA,rB	0	1			Extended
subfeo	rD,rA,rB	1	0
subfeo.	rD,rA,rB	1	1

	rD <- ~rA + rB + XER[CA]




		// ----------------------------------------------------------



0..5	opcode1
6..10	D
11..15	A
16..20	0s
21	OE
22.30	opcode2
31	Rc


addme	rD,rA		0	0	31.234		Add to Minus one
addme.	rD,rA		0	1			Extended
addmeo	rD,rA		1	0
addmeo.	rD,rA		1	1

	rD <- rA + XER[CA] - 1



addze	rD,rA		0	0	31.202		Add to zero
addze.	rD,rA		0	1			extended
addzeo	rD,rA		1	0
addzeo.	rD,rA		1	1

	rD <- rA + XER[CA]



neg	rD,rA		0	0	31.104		Negate
neg.	rD,rA		0	1
nego	rD,rA		1	0	
nego.	rD,rA		1	1

	rD <- ~ rA + 1



subfme	rD,rA		0	0	31.232		Subtract from Minus
subfme.	rD,rA		0	1			One Extended
subfmeo	rD,rA		1	0
subfmeo. rD,rA		1	1

	rD <- ~rA + XER[CA] - 1


subfze	rD,rA		0	0	31.200		Subtract from Zero
subfze.	rD,rA		0	1			One Extended
subfzeo	rD,rA		1	0
subfzeo. rD,rA		1	1

	rD <- ~rA + XER[CA]


		// ----------------------------------------------------------



0..5	opcode1
6..10	D
11..15	A
16..31	SIMM


			(DEC)
			opcode1
addi	rD,rA,SIMM	14		Add Immediate

	if rA = 0 then rD <- EXTS(SIMM)
	else	       rD <- rA + EXTS(SIMM)

addic	rD,rA,SIMM	12		Add Immediate Carrying
addic.	rD,rA,SIMM	13		Add Immediate Carrying and Record
	
	rD <- rA + EXTS(SIMM)


addis	rD,rA,SIMM	15		Add Immediate Shifted
	
	if rA = 0 then rD <- (SIMM << 16)
	else	       rD <- rA + (SIMM << 16)
					(Used for load value in high word)


mulli	rD,rA,SIMM	07		Multiply Low Immediate

	tmp[0-48] <- rA * SIMM
	rD <- tmp[16-48]


subfic	rD,rA,SIMM	08		Subtract from Immediate Carrying

	rD <- ~rA + EXTS(SIMM) + 1
			
	

// ----------------------------------------------------------------------



Index Prev Next