Test clflushopt instruction decode (for RH BZ 1262471).

This commit is contained in:
Jan Kratochvil 2016-01-16 22:57:23 +01:00
parent eca6388b15
commit 65adaa87b1
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,50 @@
--- /dev/null 2016-01-16 21:50:55.732812229 +0100
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.exp 2016-01-16 22:49:19.950683918 +0100
@@ -0,0 +1,25 @@
+# Copyright 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if { ![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"] } then {
+ verbose "Skipping amd64 clflushopt test."
+ return
+}
+
+if [prepare_for_testing amd64-clflushopt.exp amd64-clflushopt amd64-clflushopt.S [list debug "additional_flags=-nostdlib"]] {
+ return -1
+}
+
+gdb_test "disas _start" "Dump of assembler code for function _start:\r\n *0x\[0-9a-f\]+ <\[+\]0>:\tclflushopt \\(%edi\\)\r\nEnd of assembler dump\\." "clflushopt"
--- /dev/null 2016-01-16 21:50:55.732812229 +0100
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.S 2016-01-16 22:49:26.398725209 +0100
@@ -0,0 +1,19 @@
+/* Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ This file is part of the gdb testsuite. */
+
+_start: .globl _start
+ clflushopt (%edi)

View File

@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc}
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 42%{?dist}
Release: 43%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
Group: Development/Debuggers
@ -564,6 +564,9 @@ Patch1067: gdb-fork-plus-threads-ascending-revert.patch
# Fix false FAILs on too long base directory.
Patch1070: gdb-testsuite-longdirname.patch
# Test clflushopt instruction decode (for RH BZ 1262471).
Patch1073: gdb-opcodes-clflushopt-test.patch
%if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch
@ -875,6 +878,7 @@ find -name "*.info*"|xargs rm -f
%patch1066 -p1
%patch1067 -p1
%patch1070 -p1
%patch1073 -p1
%patch848 -p1
%patch833 -p1
%patch642 -p1
@ -1397,6 +1401,9 @@ then
fi
%changelog
* Sat Jan 16 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-43.fc24
- Test clflushopt instruction decode (for RH BZ 1262471).
* Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-42.fc24
- Simplify .spec: Remove conditional revert of: gdb-pahole-python2.patch