Geert Uytterhoeven [off-list ref] writes:
On Wed, 4 Jul 2001, David Edelsohn wrote:
quoted
You do not seem to have understood my reply. I will repeat the
important sentence:
SHIFT IS NOT THE SAME AS DIVIDE FOR SIGNED INTEGERS.
Indeed. That's why you have `logical shift right' and
`arithmetic shift right'.
The former inserts zeroes, the latter inserts a copy of the MSB.
Don't know from memory whether PPC has them...
Yes, PowerPC has both; but some forms don't have their own opcodes, as they
are emulated with bitfield instructions.
And: 'arithmetic shift right' is _not_ the same as signed divide, because the
rounding of negative operands or results may differ.
Holger
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/