xref: /llvm-project/clang/test/CodeGen/X86/x86-ssc-mark.c (revision 4bb19de4b6cbe56636a1e7cd9c53aae3dcf4d4b0)
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 %s -triple=i386-unknown-unknown -S -ffreestanding -o - | FileCheck %s --check-prefix=X86
3 // RUN: %clang_cc1 %s -triple=x86_64-unknown-unknown -S -ffreestanding -o - | FileCheck %s --check-prefix=X64
4 
5 #include <immintrin.h>
6 
7 // The ebx may be use for base pointer, we need to restore it in time.
ssc_mark(void)8 void ssc_mark(void) {
9 // X86-LABEL: ssc_mark
10 // X86: #APP
11 // X86: movl    %ebx, %eax
12 // X86: movl    $9, %ebx
13 // X86: .byte   100
14 // X86: .byte   103
15 // X86: .byte   144
16 // X86: movl    %eax, %ebx
17 // X86: #NO_APP
18 
19 // X64-LABEL: ssc_mark
20 // X64: #APP
21 // X64: movq    %rbx, %rax
22 // X64: movl    $9, %ebx
23 // X64: .byte   100
24 // X64: .byte   103
25 // X64: .byte   144
26 // X64: movq    %rax, %rbx
27 // X64: #NO_APP
28   __SSC_MARK(0x9);
29 }
30