[PATCH] D68524: [AVR] Rewrite the function calling convention.
Antal Szabó via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 06:43:38 PST 2020
Sh4rK added a comment.
Hi, sorry for the comments if it is not appropriate for me to review, since I'm not a maintainer, in fact, I know nothing about LLVM internals.
I came across this patch because I'm interested in Rust on AVR, and read it out of curiousity, and couldn't not notice the typos :)
================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:901
+static_assert(array_lengthof(RegList8) == array_lengthof(RegList16),
+ "8-bit and 15-bit register arrays must be of equal length");
----------------
**16**-bit
================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:979
+
+ for (unsigned i = 0; i != NumArgs; ++i) {
+ MVT VT = Args[i].VT;
----------------
This could be replaced with a range-based for loop, the LLVM coding standards seems to encourage this as well.
================
Comment at: llvm/lib/Target/AVR/AVRISelLowering.cpp:995
+ // CanLowerReturn() guarantees this assertion.
+ assert(TotalBytes <= 8 && "return values greter than 8 bytes cannot be lowered");
+
----------------
s/greter/greater
================
Comment at: llvm/lib/Target/AVR/AVRRegisterInfo.td:106
def R1R0 : AVRReg<0, "r1:r0", [R0, R1]>, DwarfRegNum<[0]>;
+ // Pseudo registers for unaligned i32
+ def R26R25 : AVRReg<25, "r26:r25", [R25, R26]>, DwarfRegNum<[25]>;
----------------
I'm not entirely sure, but I think **i32** was meant to be **i16**.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68524/new/
https://reviews.llvm.org/D68524
More information about the llvm-commits
mailing list