[llvm] [AVR] Support return address intrinsics (PR #67266)
Emil J via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 09:27:31 PDT 2023
================
@@ -0,0 +1,21 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
+; RUN: llc < %s -mtriple=avr | FileCheck %s
+
+declare ptr @llvm.addressofreturnaddress()
+
+define ptr @a() {
+; CHECK-LABEL: a:
+; CHECK: ; %bb.0:
+; CHECK-NEXT: push r28
+; CHECK-NEXT: push r29
+; CHECK-NEXT: in r28, 61
+; CHECK-NEXT: in r29, 62
+; CHECK-NEXT: mov r24, r28
+; CHECK-NEXT: mov r25, r29
+; CHECK-NEXT: adiw r24, 3
----------------
ekliptik wrote:
Seems like this affects old chips specifically if they had 256B or less. Which we have no way of checking. What GCC seems to do is let the user set `-mtiny-stack` and also maybe have per-architecture defaults
https://github.com/llvm/llvm-project/pull/67266
More information about the llvm-commits
mailing list