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. 4# XFAIL: system-darwin 5# REQUIRES: native && (target-x86 || target-x86_64) 6# RUN: %clangxx_host %p/Inputs/x86-fp-write.cpp -o %t 7# RUN: %lldb -b -s %s %t | FileCheck %s 8process launch 9 10register write fctrl 0x037b 11register write fstat 0x8884 12# note: this needs to enable all registers for writes to be effective 13register write ftag 0x2a58 14register write fop 0x0033 15# the exact addresses do not matter, we want just to verify FXSAVE 16# note: segment registers are not supported on all CPUs 17register write fioff 0x89abcdef 18register write fooff 0x76543210 19 20register write st0 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}" 21register write st1 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}" 22register write st2 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}" 23register write st3 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}" 24register write st4 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}" 25register write st5 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}" 26register write st6 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}" 27register write st7 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}" 28 29process continue 30 31# CHECK: process continue 32# CHECK-DAG: fctrl = 0x037b 33# CHECK-DAG: fstat = 0x8884 34# CHECK-DAG: ftag = 0xa961 35# CHECK-DAG: fop = 0x0033 36 37# This test is run both on 32-bit and 64-bit systems, in order to test 38# that fioff/fooff setting works as well as fip/fdp. 39# CHECK-DAG: fip = 0x{{(00000000)?}}89abcdef 40# CHECK-DAG: fdp = 0x{{(00000000)?}}76543210 41 42# CHECK-DAG: st0 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40 } 43# CHECK-DAG: st1 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00 } 44# CHECK-DAG: st2 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } 45# CHECK-DAG: st3 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 } 46# CHECK-DAG: st4 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f } 47# CHECK-DAG: st5 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff } 48# CHECK-DAG: st6 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff } 49# CHECK-DAG: st7 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } 50 51# CHECK: Process {{[0-9]+}} exited with status = 0 52