Both the ARM processor and the IA64 architecture have predicated instruction execution. In what way is the IA64’s predication mechanism superior to the ARM processor’s?

What will be an ideal response?


The ARM processors have a very basic predicated execution mode. The current instruction execution can be
predicated on the condition code register; for example


CMP r1,r2 ;compare r1 and r2
ADDEQ r1,r1,#1 ;if equal r1 = r1 + 1
ADDLT r1,r1,#2 ;if less than r1 = r1 + 2
ADDGT r1,r1,#3 ;if greater than r1 = r1 + 3


This code uses a test and then three predicated instructions to implement a simple three?way if construct
without branch operations. Furthermore, we can carry out several operations for each test; for example

CMP r1,r2 ;compare r1 and r2
ADDEQ r1,r1,#1 ;if equal r1 = r1 + 1
MULEQ r4,r1,r2 ;if equal r4 = r1 × r2 (two operations predicated on equality)
ADDLT r1,r1,#2 ;if less than r1 = r1 + 2

The Itanium IA64 architecture is a VLIW processor and the concept of a condition code register becomes
meaningless when instructions are carried out in parallel. The Itanium has 64 predication registers p0 to p63.
Operations can be carried out using several predicate registers; for example,

(p1) add r1 = r1,1 //
(p2) add r2 = r3,r4 //
(p3) add r6 = r7,r4 //

Here we can perform three predicated operations using three different predicate registers that have been
generated by previous operations. Of course, these instructions can be executed in parallel.
The following example from the text demonstrates how Itanium’s predication can be used in a more
sophisticated way to implement complicated logical constructs. Consider the following where three
comparisons are made in the same cycle using the same predicate register with the OR completer. If any one of
them is true, the predicate is true.


if ((a == 0)||(b == 1)||(c =! 2)) {x = 5;}
cmp.ne p1 = r0,r0;; //trick code to set p1 = 0
cmp.eq.or p1 = 0,r1 //do a == 0 (set p1 if true)
cmp.eq.or p1 = 1,r2 //do b == 1 (set p1 if true)
cmp.ne.or p1 = 2,r3;; //do c =! 2 (set p1 if true)
(p1) mov r4 = 5 //if P1 true then r4 = 5

Computer Science & Information Technology

You might also like to view...

There are Word templates available to help you create a resume

Indicate whether the statement is true or false

Computer Science & Information Technology

A picture from a file is inserted into a document ________

A) at the beginning B) at the bottom C) in the paragraph containing the insertion point D) before the paragraph containing the insertion point

Computer Science & Information Technology

The Favorites feature prevents Internet Explorer 11 from storing sensitive information in the browser for that tab or window

Indicate whether the statement is true or false

Computer Science & Information Technology

After making changes to a template, you should save it ____.

A. under the same name in the same location B. under a new name in the same location C. under the same name in a new location D. under a new name in a new location

Computer Science & Information Technology