1 # XFAIL: system-windows
2 # Darwin uses the legacy behavior of reporting abridged ftag value,
3 # it is covered by TestRegisters.py::fp_special_purpose_register_read.
5 # REQUIRES: native && target-x86_64
6 # RUN: %clangxx_host -g %p/Inputs/x86-fp-read.cpp -o %t
7 # RUN: %lldb -b -s %s %t | FileCheck %s
9 # CHECK: Process {{.*}} stopped
11 # fdiv (%rbx) gets encoded into 2 bytes, int3 into 1 byte
12 expression (void*)($pc-3)
13 # CHECK: (void *) $0 = [[FDIV:0x[0-9a-f]*]]
15 # CHECK: (uint32_t *) $1 = [[ZERO:0x[0-9a-f]*]]
18 # CHECK-DAG: fctrl = 0x037b
19 # CHECK-DAG: fstat = 0x8084
20 # CHECK-DAG: ftag = 0xea58
21 # CHECK-DAG: fop = 0x0033
22 # CHECK-DAG: fip = [[FDIV]]
23 # CHECK-DAG: fdp = [[ZERO]]
25 # CHECK-DAG: st{{(mm)?}}0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}
26 # CHECK-DAG: st{{(mm)?}}1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}
27 # CHECK-DAG: st{{(mm)?}}2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
28 # CHECK-DAG: st{{(mm)?}}3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}
29 # CHECK-DAG: st{{(mm)?}}4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}
30 # CHECK-DAG: st{{(mm)?}}5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}
31 # CHECK-DAG: st{{(mm)?}}6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}
32 # CHECK-DAG: st{{(mm)?}}7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
34 # legacy approach, superseded by fip/fdp registers
35 expression (void*)($fiseg*0x100000000 + $fioff)
36 # CHECK: (void *) $2 = [[FDIV]]
37 expression (uint32_t*)($foseg * 0x100000000 + $fooff)
38 # CHECK: (uint32_t *) $3 = [[ZERO]]
41 # CHECK: Process {{[0-9]+}} exited with status = 0