avr-llvm / llvm

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

Allow relocatable expressions in more places #201

Closed dylanmckay closed 8 years ago

dylanmckay commented 8 years ago

It was discovered in #184 that some instructions would silently ignore relocatable expressions (i.e. SYMBOL or SYMBOL+4) in place of immediates, and set them to zero.

This PR adds support for expressions to other instructions which are missing it.

dylanmckay commented 8 years ago

This is a worse problem that I had thought - even ldi doesn't support relocations.

dylanmckay commented 8 years ago

I have audited all instructions which take immediates, looked up the relocations they correspond to, and implemented all of them :)

Will merge once CI passes.