[Lldb-commits] [PATCH] D88795: [lldb] [test/Register] Attempt to fix x86-fp-read.test on Darwin
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Oct 4 23:05:15 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe8beb6988bab: [lldb] [test/Register] Attempt to fix x86-fp-read.test on Darwin (authored by mgorny, committed by JDevlieghere).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88795/new/
https://reviews.llvm.org/D88795
Files:
lldb/test/Shell/Register/Inputs/x86-fp-read.cpp
lldb/test/Shell/Register/x86-fp-read.test
Index: lldb/test/Shell/Register/x86-fp-read.test
===================================================================
--- lldb/test/Shell/Register/x86-fp-read.test
+++ lldb/test/Shell/Register/x86-fp-read.test
@@ -1,5 +1,4 @@
# XFAIL: system-windows
-# XFAIL: system-darwin
# REQUIRES: native && (target-x86 || target-x86_64)
# RUN: %clangxx_host -g %p/Inputs/x86-fp-read.cpp -o %t
# RUN: %lldb -b -s %s %t | FileCheck %s
@@ -8,20 +7,20 @@
register read --all
# CHECK-DAG: fctrl = 0x037b
-# CHECK-DAG: fstat = 0x8884
+# CHECK-DAG: fstat = 0x8084
# TODO: the following value is incorrect, it's a bug in the way
-# FXSAVE/XSAVE is interpreted; it should be 0xa963 once fixed
-# CHECK-DAG: ftag = 0x00fe
+# FXSAVE/XSAVE is interpreted
+# CHECK-DAG: ftag = 0x007f
# CHECK-DAG: fop = 0x0033
-# CHECK-DAG: st0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}
-# CHECK-DAG: st1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}
-# CHECK-DAG: st2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
-# CHECK-DAG: st3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}
-# CHECK-DAG: st4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}
-# CHECK-DAG: st5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}
-# CHECK-DAG: st6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}
-# CHECK-DAG: st7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
+# CHECK-DAG: st{{(mm)?}}0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}
+# CHECK-DAG: st{{(mm)?}}1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3f 0x00 0x00}
+# CHECK-DAG: st{{(mm)?}}2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
+# CHECK-DAG: st{{(mm)?}}3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80}
+# CHECK-DAG: st{{(mm)?}}4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x7f}
+# CHECK-DAG: st{{(mm)?}}5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0xff}
+# CHECK-DAG: st{{(mm)?}}6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xff 0xff}
+# CHECK-DAG: st{{(mm)?}}7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# fdiv (%rbx) gets encoded into 2 bytes, int3 into 1 byte
print (void*)($pc-3)
Index: lldb/test/Shell/Register/Inputs/x86-fp-read.cpp
===================================================================
--- lldb/test/Shell/Register/Inputs/x86-fp-read.cpp
+++ lldb/test/Shell/Register/Inputs/x86-fp-read.cpp
@@ -14,7 +14,8 @@
{0x8000000000000000, 0x7fff}, // +inf
{0x8000000000000000, 0xffff}, // -inf
{0xc000000000000000, 0xffff}, // nan
- // leave st7 empty to test tag word better
+ // st7 will be freed to test tag word better
+ {0x0000000000000000, 0x0000}, // +0
};
// unmask divide-by-zero exception
@@ -26,6 +27,7 @@
"finit\n\t"
"fldcw %1\n\t"
// load on stack in reverse order to make the result easier to read
+ "fldt 0x70(%0)\n\t"
"fldt 0x60(%0)\n\t"
"fldt 0x50(%0)\n\t"
"fldt 0x40(%0)\n\t"
@@ -33,6 +35,8 @@
"fldt 0x20(%0)\n\t"
"fldt 0x10(%0)\n\t"
"fldt 0x00(%0)\n\t"
+ // free st7
+ "ffree %%st(7)\n\t"
// this should trigger a divide-by-zero
"fdivs (%2)\n\t"
"int3\n\t"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88795.296098.patch
Type: text/x-patch
Size: 3112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201005/a2fbe647/attachment.bin>
More information about the lldb-commits
mailing list