xref: /llvm-project/lldb/test/Shell/Register/x86-fp-read.test (revision d875838e8b45cb0da5070298d0c1a2d1ee78ce7e)
1508ac0ecSMichał Górny# XFAIL: system-windows
28aea95f3SMichał Górny# Darwin uses the legacy behavior of reporting abridged ftag value,
38aea95f3SMichał Górny# it is covered by TestRegisters.py::fp_special_purpose_register_read.
48aea95f3SMichał Górny# XFAIL: system-darwin
5d8ff269fSMichał Górny# REQUIRES: native && target-x86
6381bdc75SMichał Górny# RUN: %clangxx_host -g %p/Inputs/x86-fp-read.cpp -o %t
7381bdc75SMichał Górny# RUN: %lldb -b -s %s %t | FileCheck %s
8381bdc75SMichał Górnyprocess launch
9381bdc75SMichał Górny# CHECK: Process {{.*}} stopped
10381bdc75SMichał Górny
11d8ff269fSMichał Górny# fdiv (%rbx) gets encoded into 2 bytes, int3 into 1 byte
12*d875838eSDave Leeexpression (void*)($pc-3)
13d8ff269fSMichał Górny# CHECK: (void *) $0 = [[FDIV:0x[0-9a-f]*]]
14*d875838eSDave Leeexpression &zero
15d8ff269fSMichał Górny# CHECK: (uint32_t *) $1 = [[ZERO:0x[0-9a-f]*]]
16d8ff269fSMichał Górny
17381bdc75SMichał Górnyregister read --all
18381bdc75SMichał Górny# CHECK-DAG: fctrl = 0x037b
19e8beb698SMichał Górny# CHECK-DAG: fstat = 0x8084
208aea95f3SMichał Górny# CHECK-DAG: ftag = 0xea58
21381bdc75SMichał Górny# CHECK-DAG: fop = 0x0033
22d8ff269fSMichał Górny# CHECK-DAG: fioff = [[FDIV]]
23d8ff269fSMichał Górny# CHECK-DAG: fooff = [[ZERO]]
24381bdc75SMichał Górny
25e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}
26e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}
27e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
28e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}
29e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}
30e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}
31e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}
32e8beb698SMichał Górny# CHECK-DAG: st{{(mm)?}}7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
33381bdc75SMichał Górny
34381bdc75SMichał Górnyprocess continue
35381bdc75SMichał Górny# CHECK: Process {{[0-9]+}} exited with status = 0
36