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_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: fxrstor64 apparently truncates this to 48 bits, and sign extends 17# the highest bits, so let's keep the value safely below 18register write fip 0x0000056789abcdef 19register write fdp 0x00000a9876543210 20 21register write st0 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}" 22register write st1 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}" 23register write st2 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}" 24register write st3 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}" 25register write st4 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}" 26register write st5 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}" 27register write st6 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}" 28register write st7 "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}" 29 30process continue 31 32# CHECK: process continue 33# CHECK-DAG: fctrl = 0x037b 34# CHECK-DAG: fstat = 0x8884 35# CHECK-DAG: ftag = 0xa961 36# CHECK-DAG: fop = 0x0033 37# CHECK-DAG: fip = 0x0000056789abcdef 38# CHECK-DAG: fdp = 0x00000a9876543210 39 40# CHECK-DAG: st0 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40 } 41# CHECK-DAG: st1 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00 } 42# CHECK-DAG: st2 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } 43# CHECK-DAG: st3 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 } 44# CHECK-DAG: st4 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f } 45# CHECK-DAG: st5 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff } 46# CHECK-DAG: st6 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff } 47# CHECK-DAG: st7 = { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } 48 49# CHECK: Process {{[0-9]+}} exited with status = 0 50