SPARC Architecture Online Reference Manual

Arithmetic

Arithmetic operations compute addition, subtraction, multiplication and division. Each instruction comes in two variations depending on whether it sets the code condition bits in %psr or not. In addition to that, multiplication and division can be either signed or unsigned.

The %y register is used to hold to 32 most significant bits from the result of multiplication and the 32 most significant bits of the dividend for division. It is up to the programmer to make sure that the value of the %y register is both examined for multiplication and set properly for division.

add addcc addx addxcc sdiv sdivcc smul smulcc sub subcc subx subxcc udiv udivcc umul umulcc

Home Page Index Page