4.4. HEXNUM: Using Arithmetic Instructions

We now illustrate Itanium arithmetic instructions with a brief program (Figure 4-3), which, like our program for computing a table of squares, consists of a simple sequence of instructions without branching. Suppose that we have stored three hexadecimal digits in three quad words starting at address H1. Further suppose that we want to combine these digits into a single value in register r20.

Figure 4-3. HEXNUM: An illustration of arithmetic instructions
 // HEXNUM Number Conversion // This program will convert the positive number expressed // by 3 digits in hexadecimal stored as quad words beginning // at H1 into a value in register r20 for inspection. .data // Declare storage .align 8 // Desired alignment ...

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.