[PATCH] D38029: [AVR] Override ParseDirective

Leslie Zhai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 02:02:37 PDT 2017


xiangzhai added a comment.

Dear Dylan,

BTW: AVR GNU toolchain can *not* support `ldi r16, -lo8(abc)` but `ldi r16, lo8(-(abc))` instead,

  $ avr-gcc -mmcu=atmega328p -o avr-gcc-relocations.o -c relocations.s
  
  relocations.s: Assembler messages:
  relocations.s:36: Error: garbage at end of line
  relocations.s:39: Error: garbage at end of line
  relocations.s:45: Error: garbage at end of line
  relocations.s:51: Error: garbage at end of line
  relocations.s:57: Error: garbage at end of line
  relocations.s:69: Error: garbage at end of line
  relocations.s:72: Error: garbage at end of line
  relocations.s:75: Error: garbage at end of line
  relocations.s:36: Error: can't resolve `0' {*UND* section} - `lo8' {*UND* section}
  relocations.s:36: Error: expression too complex
  relocations.s:39: Error: can't resolve `0' {*UND* section} - `hi8' {*UND* section}
  relocations.s:39: Error: expression too complex
  relocations.s:45: Error: can't resolve `0' {*UND* section} - `hh8' {*UND* section}
  relocations.s:45: Error: expression too complex
  relocations.s:51: Error: can't resolve `0' {*UND* section} - `hlo8' {*UND* section}
  relocations.s:51: Error: expression too complex
  relocations.s:57: Error: can't resolve `0' {*UND* section} - `hhi8' {*UND* section}
  relocations.s:57: Error: expression too complex
  relocations.s:69: Error: can't resolve `0' {*UND* section} - `pm_lo8' {*UND* section}
  relocations.s:69: Error: expression too complex
  relocations.s:72: Error: can't resolve `0' {*UND* section} - `pm_hi8' {*UND* section}
  relocations.s:72: Error: expression too complex
  relocations.s:75: Error: can't resolve `0' {*UND* section} - `pm_hh8' {*UND* section}
  relocations.s:75: Error: expression too complex

So do I need to rewrite `Check for sign` for LLD to meet GNU toolchain? https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AVR/AsmParser/AVRAsmParser.cpp#L402

Regards,
Leslie Zhai


Repository:
  rL LLVM

https://reviews.llvm.org/D38029





More information about the llvm-commits mailing list