1# XFAIL: system-windows 2# REQUIRES: native && target-x86 3# RUN: %clangxx_host %p/Inputs/x86-fp-write.cpp -o %t 4# RUN: %lldb -b -s %s %t | FileCheck %s 5process launch 6 7register write fctrl 0x037b 8register write fstat 0x8884 9# note: this needs to enable all registers for writes to be effective 10# TODO: fix it to use proper ftag values instead of 'abridged' 11register write ftag 0x00ff 12register write fop 0x0033 13# the exact addresses do not matter, we want just to verify FXSAVE 14# note: segment registers are not supported on all CPUs 15register write fioff 0x89abcdef 16register write fooff 0x76543210 17 18register write st0 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}" 19register write st1 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}" 20register write st2 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}" 21register write st3 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}" 22register write st4 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}" 23register write st5 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}" 24register write st6 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}" 25register write st7 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}" 26 27process continue 28 29# CHECK: process continue 30# CHECK-DAG: fctrl = 0x037b 31# CHECK-DAG: fstat = 0x8884 32# CHECK-DAG: ftag = 0xa961 33# CHECK-DAG: fop = 0x0033 34# CHECK-DAG: fip = 0x89abcdef 35# CHECK-DAG: fdp = 0x76543210 36 37# CHECK-DAG: st0 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40 } 38# CHECK-DAG: st1 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00 } 39# CHECK-DAG: st2 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } 40# CHECK-DAG: st3 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 } 41# CHECK-DAG: st4 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f } 42# CHECK-DAG: st5 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff } 43# CHECK-DAG: st6 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff } 44# CHECK-DAG: st7 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } 45 46# CHECK: Process {{[0-9]+}} exited with status = 0 47