|
Mark Wielaard |
59862e |
commit 50bd2282bce101012a5668b670cb185375600d2d
|
|
Mark Wielaard |
59862e |
Author: Andreas Arnez <arnez@linux.ibm.com>
|
|
Mark Wielaard |
59862e |
Date: Thu Oct 18 17:51:57 2018 +0200
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
Bug 397187 s390x: Add vector register support for vgdb
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
On s390x machines with a vector facility, Valgrind's gdbserver didn't
|
|
Mark Wielaard |
59862e |
represent the vector registers. This is fixed.
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
|
Mark Wielaard |
59862e |
index 8de1996..94030fd 100644
|
|
Mark Wielaard |
59862e |
--- a/coregrind/Makefile.am
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/Makefile.am
|
|
Mark Wielaard |
59862e |
@@ -685,6 +685,11 @@ GDBSERVER_XML_FILES = \
|
|
Mark Wielaard |
59862e |
m_gdbserver/s390x-linux64-valgrind-s1.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/s390x-linux64-valgrind-s2.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/s390x-linux64.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390-vx-valgrind-s1.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390-vx-valgrind-s2.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390-vx.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390x-vx-linux-valgrind.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390x-vx-linux.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/mips-cp0-valgrind-s1.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/mips-cp0-valgrind-s2.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/mips-cp0.xml \
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/m_gdbserver/s390-vx-valgrind-s1.xml b/coregrind/m_gdbserver/s390-vx-valgrind-s1.xml
|
|
Mark Wielaard |
59862e |
new file mode 100644
|
|
Mark Wielaard |
59862e |
index 0000000..ca461b3
|
|
Mark Wielaard |
59862e |
--- /dev/null
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/m_gdbserver/s390-vx-valgrind-s1.xml
|
|
Mark Wielaard |
59862e |
@@ -0,0 +1,43 @@
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ Copying and distribution of this file, with or without modification,
|
|
Mark Wielaard |
59862e |
+ are permitted in any medium without royalty provided the copyright
|
|
Mark Wielaard |
59862e |
+ notice and this notice are preserved. -->
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+<feature name="org.gnu.gdb.s390.vx-valgrind-s1">
|
|
Mark Wielaard |
59862e |
+ <reg name="v0ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v1ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v2ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v3ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v4ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v5ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v6ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v7ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v8ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v9ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v10ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v11ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v12ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v13ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v14ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v15ls1" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ <reg name="v16s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v17s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v18s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v19s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v20s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v21s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v22s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v23s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v24s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v25s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v26s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v27s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v28s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v29s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v30s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v31s1" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+</feature>
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/m_gdbserver/s390-vx-valgrind-s2.xml b/coregrind/m_gdbserver/s390-vx-valgrind-s2.xml
|
|
Mark Wielaard |
59862e |
new file mode 100644
|
|
Mark Wielaard |
59862e |
index 0000000..eccbd8d
|
|
Mark Wielaard |
59862e |
--- /dev/null
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/m_gdbserver/s390-vx-valgrind-s2.xml
|
|
Mark Wielaard |
59862e |
@@ -0,0 +1,43 @@
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ Copying and distribution of this file, with or without modification,
|
|
Mark Wielaard |
59862e |
+ are permitted in any medium without royalty provided the copyright
|
|
Mark Wielaard |
59862e |
+ notice and this notice are preserved. -->
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+<feature name="org.gnu.gdb.s390.vx-valgrind-s2">
|
|
Mark Wielaard |
59862e |
+ <reg name="v0ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v1ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v2ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v3ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v4ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v5ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v6ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v7ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v8ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v9ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v10ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v11ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v12ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v13ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v14ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v15ls2" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ <reg name="v16s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v17s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v18s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v19s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v20s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v21s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v22s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v23s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v24s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v25s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v26s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v27s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v28s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v29s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v30s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v31s2" bitsize="128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+</feature>
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/m_gdbserver/s390-vx.xml b/coregrind/m_gdbserver/s390-vx.xml
|
|
Mark Wielaard |
59862e |
new file mode 100644
|
|
Mark Wielaard |
59862e |
index 0000000..2a16873
|
|
Mark Wielaard |
59862e |
--- /dev/null
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/m_gdbserver/s390-vx.xml
|
|
Mark Wielaard |
59862e |
@@ -0,0 +1,59 @@
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ Copying and distribution of this file, with or without modification,
|
|
Mark Wielaard |
59862e |
+ are permitted in any medium without royalty provided the copyright
|
|
Mark Wielaard |
59862e |
+ notice and this notice are preserved. -->
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+<feature name="org.gnu.gdb.s390.vx">
|
|
Mark Wielaard |
59862e |
+ <vector id="v4f" type="ieee_single" count="4"/>
|
|
Mark Wielaard |
59862e |
+ <vector id="v2d" type="ieee_double" count="2"/>
|
|
Mark Wielaard |
59862e |
+ <vector id="v16i8" type="int8" count="16"/>
|
|
Mark Wielaard |
59862e |
+ <vector id="v8i16" type="int16" count="8"/>
|
|
Mark Wielaard |
59862e |
+ <vector id="v4i32" type="int32" count="4"/>
|
|
Mark Wielaard |
59862e |
+ <vector id="v2i64" type="int64" count="2"/>
|
|
Mark Wielaard |
59862e |
+ <union id="vec128">
|
|
Mark Wielaard |
59862e |
+ <field name="v4_float" type="v4f"/>
|
|
Mark Wielaard |
59862e |
+ <field name="v2_double" type="v2d"/>
|
|
Mark Wielaard |
59862e |
+ <field name="v16_int8" type="v16i8"/>
|
|
Mark Wielaard |
59862e |
+ <field name="v8_int16" type="v8i16"/>
|
|
Mark Wielaard |
59862e |
+ <field name="v4_int32" type="v4i32"/>
|
|
Mark Wielaard |
59862e |
+ <field name="v2_int64" type="v2i64"/>
|
|
Mark Wielaard |
59862e |
+ <field name="uint128" type="uint128"/>
|
|
Mark Wielaard |
59862e |
+ </union>
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ <reg name="v0l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v1l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v2l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v3l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v4l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v5l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v6l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v7l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v8l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v9l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v10l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v11l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v12l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v13l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v14l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v15l" bitsize="64" type="uint64"/>
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ <reg name="v16" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v17" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v18" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v19" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v20" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v21" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v22" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v23" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v24" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v25" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v26" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v27" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v28" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v29" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v30" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+ <reg name="v31" bitsize="128" type="vec128"/>
|
|
Mark Wielaard |
59862e |
+</feature>
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/m_gdbserver/s390x-vx-linux-valgrind.xml b/coregrind/m_gdbserver/s390x-vx-linux-valgrind.xml
|
|
Mark Wielaard |
59862e |
new file mode 100644
|
|
Mark Wielaard |
59862e |
index 0000000..0237002
|
|
Mark Wielaard |
59862e |
--- /dev/null
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/m_gdbserver/s390x-vx-linux-valgrind.xml
|
|
Mark Wielaard |
59862e |
@@ -0,0 +1,28 @@
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ Copying and distribution of this file, with or without modification,
|
|
Mark Wielaard |
59862e |
+ are permitted in any medium without royalty provided the copyright
|
|
Mark Wielaard |
59862e |
+ notice and this notice are preserved. -->
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+<target>
|
|
Mark Wielaard |
59862e |
+ <architecture>s390:64-bit</architecture>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-core64.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-acr.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-fpr.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-linux64.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-vx.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-core64-valgrind-s1.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-acr-valgrind-s1.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-fpr-valgrind-s1.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-linux64-valgrind-s1.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-vx-valgrind-s1.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-core64-valgrind-s2.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-acr-valgrind-s2.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-fpr-valgrind-s2.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-linux64-valgrind-s2.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-vx-valgrind-s2.xml"/>
|
|
Mark Wielaard |
59862e |
+</target>
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/m_gdbserver/s390x-vx-linux.xml b/coregrind/m_gdbserver/s390x-vx-linux.xml
|
|
Mark Wielaard |
59862e |
new file mode 100644
|
|
Mark Wielaard |
59862e |
index 0000000..e431c5b
|
|
Mark Wielaard |
59862e |
--- /dev/null
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/m_gdbserver/s390x-vx-linux.xml
|
|
Mark Wielaard |
59862e |
@@ -0,0 +1,18 @@
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+ Copying and distribution of this file, with or without modification,
|
|
Mark Wielaard |
59862e |
+ are permitted in any medium without royalty provided the copyright
|
|
Mark Wielaard |
59862e |
+ notice and this notice are preserved. -->
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+<target>
|
|
Mark Wielaard |
59862e |
+ <architecture>s390:64-bit</architecture>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-core64.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-acr.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-fpr.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390x-linux64.xml"/>
|
|
Mark Wielaard |
59862e |
+ <xi:include href="s390-vx.xml"/>
|
|
Mark Wielaard |
59862e |
+</target>
|
|
Mark Wielaard |
59862e |
diff --git a/coregrind/m_gdbserver/valgrind-low-s390x.c b/coregrind/m_gdbserver/valgrind-low-s390x.c
|
|
Mark Wielaard |
59862e |
index 7bbb2e3..a667f4b 100644
|
|
Mark Wielaard |
59862e |
--- a/coregrind/m_gdbserver/valgrind-low-s390x.c
|
|
Mark Wielaard |
59862e |
+++ b/coregrind/m_gdbserver/valgrind-low-s390x.c
|
|
Mark Wielaard |
59862e |
@@ -88,9 +88,42 @@ static struct reg regs[] = {
|
|
Mark Wielaard |
59862e |
{ "f14", 2592, 64 },
|
|
Mark Wielaard |
59862e |
{ "f15", 2656, 64 },
|
|
Mark Wielaard |
59862e |
{ "orig_r2", 2720, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v0l", 2784, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v1l", 2848, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v2l", 2912, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v3l", 2976, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v4l", 3040, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v5l", 3104, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v6l", 3168, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v7l", 3232, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v8l", 3296, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v9l", 3360, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v10l", 3424, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v11l", 3488, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v12l", 3552, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v13l", 3616, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v14l", 3680, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v15l", 3744, 64 },
|
|
Mark Wielaard |
59862e |
+ { "v16", 3808, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v17", 3936, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v18", 4064, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v19", 4192, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v20", 4320, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v21", 4448, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v22", 4576, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v23", 4704, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v24", 4832, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v25", 4960, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v26", 5088, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v27", 5216, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v28", 5344, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v29", 5472, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v30", 5600, 128 },
|
|
Mark Wielaard |
59862e |
+ { "v31", 5728, 128 },
|
|
Mark Wielaard |
59862e |
};
|
|
Mark Wielaard |
59862e |
static const char *expedite_regs[] = { "r14", "r15", "pswa", 0 };
|
|
Mark Wielaard |
59862e |
-#define num_regs (sizeof (regs) / sizeof (regs[0]))
|
|
Mark Wielaard |
59862e |
+#define num_regs_all (sizeof (regs) / sizeof (regs[0]))
|
|
Mark Wielaard |
59862e |
+static int num_regs;
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
static
|
|
Mark Wielaard |
59862e |
CORE_ADDR get_pc (void)
|
|
Mark Wielaard |
59862e |
@@ -165,7 +198,7 @@ void transfer_register (ThreadId tid, int abs_regno, void * buf,
|
|
Mark Wielaard |
59862e |
case 32: VG_(transfer) (&s390x->guest_a14, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 33: VG_(transfer) (&s390x->guest_a15, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 34: VG_(transfer) (&s390x->guest_fpc, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
- case 35: VG_(transfer) (&s390x->guest_v0, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 35: VG_(transfer) (&s390x->guest_v0.w64[0], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 36: VG_(transfer) (&s390x->guest_v1.w64[0], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 37: VG_(transfer) (&s390x->guest_v2.w64[0], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 38: VG_(transfer) (&s390x->guest_v3.w64[0], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
@@ -182,18 +215,65 @@ void transfer_register (ThreadId tid, int abs_regno, void * buf,
|
|
Mark Wielaard |
59862e |
case 49: VG_(transfer) (&s390x->guest_v14.w64[0], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 50: VG_(transfer) (&s390x->guest_v15.w64[0], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
case 51: *mod = False; break; //GDBTD??? { "orig_r2", 0, 64 },
|
|
Mark Wielaard |
59862e |
+ case 52: VG_(transfer) (&s390x->guest_v0.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 53: VG_(transfer) (&s390x->guest_v1.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 54: VG_(transfer) (&s390x->guest_v2.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 55: VG_(transfer) (&s390x->guest_v3.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 56: VG_(transfer) (&s390x->guest_v4.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 57: VG_(transfer) (&s390x->guest_v5.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 58: VG_(transfer) (&s390x->guest_v6.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 59: VG_(transfer) (&s390x->guest_v7.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 60: VG_(transfer) (&s390x->guest_v8.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 61: VG_(transfer) (&s390x->guest_v9.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 62: VG_(transfer) (&s390x->guest_v10.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 63: VG_(transfer) (&s390x->guest_v11.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 64: VG_(transfer) (&s390x->guest_v12.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 65: VG_(transfer) (&s390x->guest_v13.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 66: VG_(transfer) (&s390x->guest_v14.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 67: VG_(transfer) (&s390x->guest_v15.w64[1], buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 68: VG_(transfer) (&s390x->guest_v16, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 69: VG_(transfer) (&s390x->guest_v17, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 70: VG_(transfer) (&s390x->guest_v18, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 71: VG_(transfer) (&s390x->guest_v19, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 72: VG_(transfer) (&s390x->guest_v20, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 73: VG_(transfer) (&s390x->guest_v21, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 74: VG_(transfer) (&s390x->guest_v22, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 75: VG_(transfer) (&s390x->guest_v23, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 76: VG_(transfer) (&s390x->guest_v24, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 77: VG_(transfer) (&s390x->guest_v25, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 78: VG_(transfer) (&s390x->guest_v26, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 79: VG_(transfer) (&s390x->guest_v27, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 80: VG_(transfer) (&s390x->guest_v28, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 81: VG_(transfer) (&s390x->guest_v29, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 82: VG_(transfer) (&s390x->guest_v30, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
+ case 83: VG_(transfer) (&s390x->guest_v31, buf, dir, size, mod); break;
|
|
Mark Wielaard |
59862e |
default: vg_assert(0);
|
|
Mark Wielaard |
59862e |
}
|
|
Mark Wielaard |
59862e |
}
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
static
|
|
Mark Wielaard |
59862e |
+Bool have_vx (void)
|
|
Mark Wielaard |
59862e |
+{
|
|
Mark Wielaard |
59862e |
+ VexArch va;
|
|
Mark Wielaard |
59862e |
+ VexArchInfo vai;
|
|
Mark Wielaard |
59862e |
+ VG_(machine_get_VexArchInfo) (&va, &vai;;
|
|
Mark Wielaard |
59862e |
+ return (vai.hwcaps & VEX_HWCAPS_S390X_VX) != 0;
|
|
Mark Wielaard |
59862e |
+}
|
|
Mark Wielaard |
59862e |
+
|
|
Mark Wielaard |
59862e |
+static
|
|
Mark Wielaard |
59862e |
const char* target_xml (Bool shadow_mode)
|
|
Mark Wielaard |
59862e |
{
|
|
Mark Wielaard |
59862e |
if (shadow_mode) {
|
|
Mark Wielaard |
59862e |
- return "s390x-generic-valgrind.xml";
|
|
Mark Wielaard |
59862e |
+ if (have_vx())
|
|
Mark Wielaard |
59862e |
+ return "s390x-vx-linux-valgrind.xml";
|
|
Mark Wielaard |
59862e |
+ else
|
|
Mark Wielaard |
59862e |
+ return "s390x-generic-valgrind.xml";
|
|
Mark Wielaard |
59862e |
} else {
|
|
Mark Wielaard |
59862e |
- return "s390x-generic.xml";
|
|
Mark Wielaard |
59862e |
- }
|
|
Mark Wielaard |
59862e |
+ if (have_vx())
|
|
Mark Wielaard |
59862e |
+ return "s390x-vx-linux.xml";
|
|
Mark Wielaard |
59862e |
+ else
|
|
Mark Wielaard |
59862e |
+ return "s390x-generic.xml";
|
|
Mark Wielaard |
59862e |
+ }
|
|
Mark Wielaard |
59862e |
}
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
static CORE_ADDR** target_get_dtv (ThreadState *tst)
|
|
Mark Wielaard |
59862e |
@@ -206,7 +286,7 @@ static CORE_ADDR** target_get_dtv (ThreadState *tst)
|
|
Mark Wielaard |
59862e |
}
|
|
Mark Wielaard |
59862e |
|
|
Mark Wielaard |
59862e |
static struct valgrind_target_ops low_target = {
|
|
Mark Wielaard |
59862e |
- num_regs,
|
|
Mark Wielaard |
59862e |
+ -1, // Override at init time.
|
|
Mark Wielaard |
59862e |
regs,
|
|
Mark Wielaard |
59862e |
17, //sp = r15, which is register offset 17 in regs
|
|
Mark Wielaard |
59862e |
transfer_register,
|
|
Mark Wielaard |
59862e |
@@ -220,6 +300,11 @@ static struct valgrind_target_ops low_target = {
|
|
Mark Wielaard |
59862e |
void s390x_init_architecture (struct valgrind_target_ops *target)
|
|
Mark Wielaard |
59862e |
{
|
|
Mark Wielaard |
59862e |
*target = low_target;
|
|
Mark Wielaard |
59862e |
+ if (have_vx())
|
|
Mark Wielaard |
59862e |
+ num_regs = num_regs_all;
|
|
Mark Wielaard |
59862e |
+ else
|
|
Mark Wielaard |
59862e |
+ num_regs = num_regs_all - 32; // Remove all VX registers.
|
|
Mark Wielaard |
59862e |
+ target->num_regs = num_regs;
|
|
Mark Wielaard |
59862e |
set_register_cache (regs, num_regs);
|
|
Mark Wielaard |
59862e |
gdbserver_expedite_regs = expedite_regs;
|
|
Mark Wielaard |
59862e |
}
|
|
Mark Wielaard |
59862e |
diff -ru valgrind-3.14.0.orig/coregrind/Makefile.in valgrind-3.14.0/coregrind/Makefile.in
|
|
Mark Wielaard |
59862e |
--- valgrind-3.14.0.orig/coregrind/Makefile.in 2018-11-20 17:30:03.075888111 +0100
|
|
Mark Wielaard |
59862e |
+++ valgrind-3.14.0/coregrind/Makefile.in 2018-11-20 17:31:14.999314275 +0100
|
|
Mark Wielaard |
59862e |
@@ -1869,6 +1869,11 @@
|
|
Mark Wielaard |
59862e |
m_gdbserver/s390x-linux64-valgrind-s1.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/s390x-linux64-valgrind-s2.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/s390x-linux64.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390-vx-valgrind-s1.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390-vx-valgrind-s2.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390-vx.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390x-vx-linux-valgrind.xml \
|
|
Mark Wielaard |
59862e |
+ m_gdbserver/s390x-vx-linux.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/mips-cp0-valgrind-s1.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/mips-cp0-valgrind-s2.xml \
|
|
Mark Wielaard |
59862e |
m_gdbserver/mips-cp0.xml \
|