next up previous
Next: Register Window Instructions Up: Instruction Set Previous: Loads and Stores

Arithmetic and Logic Instructions

The arithmetic and logic instructions available in the Sparc v9 architecture aren't terribly distinctive from those in other instruction set architectures. They provide addition, multiplication, and, or, divide, etc. Each function provides both a version for immediate-addressing and for register-addressing. The immediate version takes a register and an immediate value, operates on them and stores them into a second register. The register-addressing version takes two register contents, operates on them, and puts the result into a third register. One thing that makes them slightly more distinctive than the MIPS variants is that most of the instructions provide a variant that will update the contents of one of the condition code registers. This feature can be combined with the appropriate conditonal-move and/or branch instructions to more efficiently use the general purpose registers.



David McWherter
2000-03-08