30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using the Evaluate Window<br />

You write assembler expressions in the target machine’s native assembler<br />

language and in a <strong>TotalView</strong> assembler language. However, the operators<br />

available to construct expressions in instruction operands, and the set of<br />

available pseudo-operators, are the same on all machines, and are described<br />

below.<br />

The <strong>TotalView</strong> assembler accepts instructions using the same mnemonics<br />

recognized by the native assembler, and it recognizes the same names for<br />

registers that native assemblers recognize.<br />

Some architectures provide extended mnemonics that do not correspond<br />

exactly with machine instructions and which represent important, special<br />

cases of instructions, or provide for assembling short, commonly used<br />

sequences of instructions. The <strong>TotalView</strong> assembler recognizes mnemonics<br />

if:<br />

� They assemble to exactly one instruction.<br />

� The relationship between the operands of the extended mnemonics and<br />

the fields in the assembled instruction code is a simple one-to-one correspondence.<br />

Assembler language labels are indicated as name: and appear at the beginning<br />

of a line. You can place a label alone on a line. The symbols you can<br />

use include labels defined in the assembler expression and all program<br />

symbols.<br />

The <strong>TotalView</strong> assembler operators are described in the following table:<br />

Operators Description<br />

+ Plus<br />

– Minus (also unary)<br />

* Multiplication<br />

# Remainder<br />

/ Division<br />

& Bitwise AND<br />

^ Bitwise XOR<br />

! Bitwise OR NOT (also unary minus, bitwise NOT)<br />

| Bitwise OR<br />

(expr) Grouping<br />

> Right shift<br />

“text” Text string, 1-4 characters long, is right-justified in a 32-bit<br />

word<br />

hi16 (expr) Low 16 bits of operand expr<br />

hi32 (expr) High 32 bits of operand expr<br />

lo16 (expr) High 16 bits of operand expr<br />

lo32 (expr) Low 32 bits of operand expr<br />

The <strong>TotalView</strong> assembler pseudo-operations are as follows:<br />

392 Chapter 17: Evaluating Expressions

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!