35.3.6.3. INDEGER COMPARES AND CONDITIONAL JUMPS ON HP-PA




+---------------------------+-------------------+-----------------------+
|	Len	Value       |			|			|
|	6	xx          |			|			|
|	5	r2          |	5	r	|	5	p	|
|	5	r1          |	5	im5	|			|
|	3	c	    |			|			|
|	11	w1          |			|			|
|	1	n           |			|			|	
|	1	w	    |			|			|
+---------------------------+-------------------+-----------------------+

Command


				xx
COMBT,cond,n	r1,r2,target	20	Compare and Branch if True
COMBF,cond,n	r1,r2,target	22	Compare and Branch if False
COMIBT,cond,n	i,r,target	21	Compare Immediate and Branch if True
COMIBF,cond,n	i,r,target	23	Compare Immediate and Branch if False

	Compare: GR[r1] + ~GR[r2] + 1			// COMBT/COMBF
	Compare: sign_ext(im5) + ~GR[r] + 1		// COMIBT/COMIBF

	disp <- lshift(sign_ext({w1,w},2))
	if (cond_satisfied)				// if true
	if (!cond_satisfied)				// if false
		IAQQ_Next <- IAQQ_Front + disp + 8
	if (n)
		if (disp < 0)
			PSW[N] <- !cond_satisfied
		else
			PSW[N] <- cond_satisfied


Additional operations:
ADDBT,cond,n	r1,r2,target	28	Add and Branch if true
ADDBF,cond,n	r1,r2,target	2A	Add and Branch if false
ADDIBT,cond,n	i,r,target	29	Add Immediate and Branch if true
ADDIBF,cond,n	i,r,target	2B	Add Immediate and Branch if false

Note:	The same as compare but calculated instead of compare
		GR[r2] <- GR[r1] + GR[r2]
	or	GR[r]  <- sign_ext(im5) + GR[r]



BVB,cond,n	r,target	30	Branch on Variable bit

Note:	Based on test lshift(GR[r],CR[11])


BB,cond,n	r,p,target	31	Branch on bit (fixed)



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


Index Prev Next