mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-16 10:56:21 +00:00

According to https://www.nongnu.org/avr-libc/user-manual/inline_asm.html, 'G' only represents floating point constant '0.0'. And avr-gcc also rejects other non-zero FP values.
10 lines
433 B
C
10 lines
433 B
C
// RUN: %clang_cc1 -triple avr-unknown-unknown -verify %s
|
|
|
|
const unsigned char val = 0;
|
|
|
|
int foo(void) {
|
|
__asm__ volatile("foo %0, 1" : : "fo" (val)); // expected-error {{invalid input constraint 'fo' in asm}}
|
|
__asm__ volatile("foo %0, 1" : : "Nd" (val)); // expected-error {{invalid input constraint 'Nd' in asm}}
|
|
__asm__ volatile("subi r30, %0" : : "G" (1)); // expected-error {{value '1' out of range for constraint 'G'}}
|
|
}
|