This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM MUL instruction

Still more instruction things giving me head ache.

This time it's the MUL-instruction.

What the heck means:

Multiply multiplies two register values. The least significant 32 bits of the result are written to the destination

register. These 32 bits do not depend on whether the source register values are considered to be signed values or

unsigned values.

(The bolded part)

Parents
  • I played with Yasuhiko Koumoto's example using a calculator, and I saw what you mean.

    It's kind of funny though that only the lower part (the "common bits") is the same.

    I mean as many bits as the shorter one has.

    -0x8 = 0xFFFFFFFFFFFFFFF8

    0x12345678 * 0x00000000FFFFFFF8 = 0x123456776E5D4C40

    0x12345678 * 0xFFFFFFFFFFFFFFF8 = 0xFFFFFFFF6E5D4C40

    0x12345678 * 0x000000000000FFF8 = 0x1233C4D54C40

Reply
  • I played with Yasuhiko Koumoto's example using a calculator, and I saw what you mean.

    It's kind of funny though that only the lower part (the "common bits") is the same.

    I mean as many bits as the shorter one has.

    -0x8 = 0xFFFFFFFFFFFFFFF8

    0x12345678 * 0x00000000FFFFFFF8 = 0x123456776E5D4C40

    0x12345678 * 0xFFFFFFFFFFFFFFF8 = 0xFFFFFFFF6E5D4C40

    0x12345678 * 0x000000000000FFF8 = 0x1233C4D54C40

Children
No data