You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support AVRTiny devices in AVR inline assembly
Note: This is still draft and this depends on rust-lang#146900 which adds necessary target feature. (The first commit is from it.)
---
Follow-up to rust-lang#131323.
AVR has devices that reduce the number of registers, similar to RISC-V's RV32E, which have different ABI than default. This PR supports such devices in inline assembly.
Refs: AVR-GCC docs https://gcc.gnu.org/wiki/avr-gcc#Reduced_Tiny
> On the Reduced Tiny cores (16 GPRs only) several modifications to the ABI above apply:
>
> Call-saved registers are: R18–R19, R28–R29.
Fixed Registers are R16 (__tmp_reg__) and R17 (__zero_reg__).
>
> Registers used to pass arguments to functions and return values from functions are R25...R20 (instead of R25...R8).
Values that occupy more than 4 registers are returned in memory (instead of more than 8 registers).
There is only limited library support both from libgcc and AVR-LibC, for example there is no float support and no printf support.
r? @Amanieu@rustbot label +O-AVR +A-inline-assembly
0 commit comments