$ &
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

%

Synopsis

%reg
arg1 % arg2

Description

When used as a prefix on a register name, the register reg for the current frontend processor is accessed. This is a convenient way to use register values in expressions like disassemble (%pc - 4*3) 10 or %pc = 0x1000.

The % operator is also used for arithmetic modulo of integer and floating point values.

If the argument to the left of the % operator is a string, then string formatting using Python format specifiers such as %s and %d is performed. To provide multiple values to be formatted, a CLI list should be used as right hand argument. For example:

simics> "about %.2f %s" % [5.12345, "hours"]
about 5.12 hours

Provided By

Simics Core

See Also

read-reg, write-reg, print-processor-registers, pselect
$ &