avr-llvm / llvm

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

Improve register constraint error messages #67

Closed dylanmckay closed 7 years ago

dylanmckay commented 9 years ago

Many instructions only take a subset of registers out of the register class.

For example, SBR Rd, Rr only works with the upper half of GP registers.

Currently we print out the error "invalid operand" -- the same error that occurs if you put an immediate instead of a register.

Improve the error message so that the actual problem is elaborated on.

dylanmckay commented 7 years ago

Not bothered with this anymore, can raise again in the future if it's ever actually a problem.