mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

These macros are defined in avr-gcc and are useful when working with assembly. For example, startup code needs to copy the contents of .data from flash to RAM, but should use elpm (instead of lpm) on devices with more than 64kB flash. Without __AVR_HAVE_ELPM__, there is no way to know whether the elpm instruction is supported. This partially fixes https://github.com/llvm/llvm-project/issues/56157. Differential Revision: https://reviews.llvm.org/D137572
10 lines
340 B
C
10 lines
340 B
C
// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown -target-cpu attiny104 /dev/null | FileCheck -match-full-lines %s
|
|
|
|
// CHECK: #define AVR 1
|
|
// CHECK: #define __AVR 1
|
|
// CHECK: #define __AVR_ARCH__ 100
|
|
// CHECK: #define __AVR_ATtiny104__ 1
|
|
// CHECK-NOT: #define __AVR_HAVE_MUL__ 1
|
|
// CHECK: #define __AVR__ 1
|
|
// CHECK: #define __ELF__ 1
|