avr-llvm / llvm

[MERGED UPSTREAM] AVR backend for the LLVM compiler library
220 stars 21 forks source link

Multiplication instruction definitions are incorrect #90

Closed dylanmckay closed 9 years ago

dylanmckay commented 9 years ago

The multiplication instructions are defined as Rd = Rd * Rr; that is, multiply registers Rd and Rr and place the result back into Rd.

This is incorrect. The multiplication instructions all produce 16-bit products from two 8-bit operands. All of the multiplication instructions should actually be r1:r0 = Rd * Rr.

dylanmckay commented 9 years ago

Fixed in 2720106c8c74a436a794f64761c5a69bd43b1d57 and f4c17039f1504f1a9a9d4d1b6d5e76feef1e50b2.