brintos

brintos / llvm-project-archived public Read only

0
0
Text · 854 B · 3f67182 Raw
25 lines · plain
1## Check that HLT instruction is handled differently depending on the flags.2## It's a terminator in the user-level code, but the execution can resume in3## ring 0.4 5# RUN: %clang %cflags %s -static -o %t.exe -nostdlib6# RUN: llvm-bolt %t.exe --print-cfg --print-only=main --terminal-x86-hlt=0 \7# RUN:   -o %t.ring0 2>&1 | FileCheck %s --check-prefix=CHECK-RING08# RUN: llvm-bolt %t.exe --print-cfg --print-only=main \9# RUN:   -o %t.ring3 2>&1 | FileCheck %s --check-prefix=CHECK-RING310# RUN: llvm-objdump -d %t.ring0 --print-imm-hex | FileCheck %s --check-prefix=CHECK-BIN11 12# CHECK-RING0: BB Count    : 113# CHECK-RING3: BB Count    : 214 15# CHECK-BIN: <main>:16# CHECK-BIN-NEXT: f4                            hlt17# CHECK-BIN-NEXT: c3                            retq18 19.global main20  .type main, %function21main:22        hlt23        retq24.size main, .-main25