[PATCH] D74213: [AVR] Don't adjust addresses by 2 for absolute values

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 02:30:17 PST 2020


dylanmckay requested changes to this revision.
dylanmckay added a comment.
This revision now requires changes to proceed.

Great work, thanks @aykevl.

I suspect it is possible to write a test for this using `llvc -show-encoding`

`llc ~/projects/llvm/llvm-project/llvm/test/CodeGen/AVR/and.ll -o - --show-mc-encoding -march=avr -mcpu=atmega328p`

Here's part of the output

  andi    r18, 253                ; encoding: [0x2d,0x7f]
  andi    r20, 155                ; encoding: [0x4b,0x79]
  andi    r21, 88                 ; encoding: [0x58,0x75]
  andi    r22, 76                 ; encoding: [0x6c,0x74]
  andi    r23, 73                 ; encoding: [0x79,0x74]
  andi    r24, 31                 ; encoding: [0x8f,0x71]
  andi    r25, 242                ; encoding: [0x92,0x7f]
  ret                             ; encoding: [0x08,0x95]

I believe that relocations will also be included in the output, as fixup values.

If that's not possible, then I agree that the tests will have to come in a pater patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74213/new/

https://reviews.llvm.org/D74213





More information about the llvm-commits mailing list