[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-commits
Subject: [PATCH] D139807: [lld][ELF] Support relocation R_AVR_LDS_STS_16 on AVRTiny devices.
From: Ben Shi via Phabricator via llvm-commits <llvm-commits () lists ! llvm ! org>
Date: 2022-12-31 10:16:47
Message-ID: HZRMq1PjSWmjBNO9M3UHZg () geopod-ismtpd-6-0
[Download RAW message or body]
benshi001 marked 2 inline comments as done.
benshi001 added inline comments.
================
Comment at: lld/ELF/Arch/AVR.cpp:175
+ case R_AVR_LDS_STS_16: {
+ if ((calcEFlags() & EF_AVR_ARCH_MASK) != EF_AVR_ARCH_AVRTINY)
+ error(getErrorLocation(loc) + "relocation 'R_AVR_LDS_STS_16' is only "
----------------
MaskRay wrote:
> benshi001 wrote:
> > The assembler won't emit `R_AVR_LDS_STS_16` for AVRTiny devices. And this check \
> > is hard to be tested in the unit tests.
> `calcEFlags` is costly. I don't think any other arch has such an eflags based \
> relocation check. Is it really necessary?
> I suggest that you remove it, at the very least, there is no trailing dot in all \
> lld/ELF diagnostics.
Thanks. I have removed this unnecessary check.
================
Comment at: lld/test/ELF/avr-reloc.s:48
+; CHECK-LABEL: section .SIX:
+; CHECK: std Y+30, r9
+; CHECK-NEXT: ldd r9, Y+30
----------------
Currently the disassembler can correctly decode those instructions.
================
Comment at: lld/test/ELF/avrtiny-reloc.s:1
+; REQUIRES: avr
+; RUN: llvm-mc -filetype=obj -triple=avr -mcpu=attiny10 %s -o %t.o
----------------
MaskRay wrote:
> `avr-tiny*`
>
> Can `avr-reloc.s` be augmented to test `-mcpu=attiny10`?
I would like to do that, but it is impossible. Since `avr-reloc.s` contains \
instructions which are invalid on AVRTiny, the assembler will report errors, so I \
have to create a seperate file for AVRTiny.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139807/new/
https://reviews.llvm.org/D139807
_______________________________________________
llvm-commits mailing list
llvm-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic