According to the invention, a processing core that executes a compare instruction
is disclosed. The processing core includes a register file, comparison logic, decode
logic, and a store path. Included in the register file are a number of general-purpose
registers. The general-purpose registers include a first input operand register,
a second input operand register and an output operand register. Comparison logic
is coupled to the register file. The comparison logic tests for at least two of
the following relationships: less than, equal to, greater than and no valid relationship.
The decode logic selects the output operand register from the plurality of general-purpose
registers. The store path extends between the comparison logic and the selected
output operand register.