xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/builtins-arm-msvc-compat-only.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple thumbv7-windows -fms-extensions -emit-llvm -o - %s \
2*0a6a1f1dSLionel Sambuc // RUN:     | FileCheck %s -check-prefix CHECK-MSVC
3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o /dev/null 2>&1 \
4*0a6a1f1dSLionel Sambuc // RUN:     | FileCheck %s -check-prefix CHECK-EABI
5*0a6a1f1dSLionel Sambuc // REQUIRES: arm-registered-target
6*0a6a1f1dSLionel Sambuc 
emit()7*0a6a1f1dSLionel Sambuc void emit() {
8*0a6a1f1dSLionel Sambuc   __emit(0xdefe);
9*0a6a1f1dSLionel Sambuc }
10*0a6a1f1dSLionel Sambuc 
11*0a6a1f1dSLionel Sambuc // CHECK-MSVC: call void asm sideeffect ".inst.n 0xDEFE", ""()
12*0a6a1f1dSLionel Sambuc // CHECK-EABI: warning: implicit declaration of function '__emit' is invalid in C99
13*0a6a1f1dSLionel Sambuc 
emit_truncated()14*0a6a1f1dSLionel Sambuc void emit_truncated() {
15*0a6a1f1dSLionel Sambuc   __emit(0x11110000); // movs r0, r0
16*0a6a1f1dSLionel Sambuc }
17*0a6a1f1dSLionel Sambuc 
18*0a6a1f1dSLionel Sambuc // CHECK-MSVC: call void asm sideeffect ".inst.n 0x0", ""()
19*0a6a1f1dSLionel Sambuc 
20