avr-llvm / llvm

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

[AVR] fix load/store tests #189

Closed rjordans closed 8 years ago

rjordans commented 8 years ago

Partially fixes #27 by updating load/store tests to match with currently generated output.

dylanmckay commented 8 years ago

Are these registers consistent with the AVR C calling convention?

rjordans commented 8 years ago

I think they are but I'll double check. I did already spot one problem with my widened tests, the ldd operation is apparently only available for the Y and Z registers so that should be reflected in the tests. Otherwise it looks OK I think, most tests don't actually check on the calling convention here anyway. I'll check the calling convention correctness and store tests tomorrow.

dylanmckay commented 8 years ago

Once you check, tell me and I'd be happy to merge :)

Nice work!

rjordans commented 8 years ago

Hi Dylan,

Sorry for the long delay but I checked the tests now. I've removed the X register from the option list for the load/store with displacement checks as those operations don't exist in the AVR architecture.

Besides that everything seems to be OK now on my system.

Cheers, Roel

rjordans commented 8 years ago

Oh, and I've also checked the calling convention which seems to be consistent as well. Some of the address registers do get moved from the input argument into other registers which was why the tests were failing. These new tests don't check for the added moves and will assume that the calling convention is checked elsewhere.

dylanmckay commented 8 years ago

Nice work @rjordans, merging now :)