forked from OSchip/llvm-project
Fix test from 5f1f4a5
My test needs a requires target clause to support inline assembly. This patch splits out the asm tests into a separate test so we don't skip the rest of the conditions.
This commit is contained in:
parent
eb282be9f8
commit
0c5db3e4aa
|
@ -0,0 +1,11 @@
|
|||
// REQUIRES: x86-registered-target
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s -Wimplicit-int-conversion -triple x86_64-gnu-linux -fasm-blocks
|
||||
|
||||
void NotAllowedInInlineAsm(_ExtInt(9) in, _ExtInt(9) out) {
|
||||
__asm { mov eax, in} // expected-error{{invalid type '_ExtInt(9)' in asm input}}
|
||||
__asm { mov out, eax} // expected-error{{invalid type '_ExtInt(9)' in asm output}}
|
||||
|
||||
asm("" : "=g" (in));// expected-error{{invalid type '_ExtInt(9)' in asm input}}
|
||||
asm("" :: "r" (out));// expected-error{{invalid type '_ExtInt(9)' in asm output}}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s -Wimplicit-int-conversion -triple x86_64-gnu-linux -fasm-blocks
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s -Wimplicit-int-conversion -triple x86_64-gnu-linux
|
||||
|
||||
template<int Bounds>
|
||||
struct HasExtInt {
|
||||
|
@ -275,13 +275,3 @@ void ImplicitCasts(_ExtInt(31) s31, _ExtInt(33) s33, int i) {
|
|||
// expected-warning@+1{{implicit conversion loses integer precision}}
|
||||
i = s33;
|
||||
}
|
||||
|
||||
|
||||
void NotAllowedInInlineAsm(_ExtInt(9) in, _ExtInt(9) out) {
|
||||
__asm { mov eax, in} // expected-error{{invalid type '_ExtInt(9)' in asm input}}
|
||||
__asm { mov out, eax} // expected-error{{invalid type '_ExtInt(9)' in asm output}}
|
||||
|
||||
asm("" : "=g" (in));// expected-error{{invalid type '_ExtInt(9)' in asm input}}
|
||||
asm("" :: "r" (out));// expected-error{{invalid type '_ExtInt(9)' in asm output}}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue