This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] GDB: Add support for the new set/show disassembler-options commands.
- From: Peter Bergner <bergner at sourceware dot org>
- To: bfd-cvs at sourceware dot org, gdb-cvs at sourceware dot org
- Date: 28 Feb 2017 18:32:51 -0000
- Subject: [binutils-gdb] GDB: Add support for the new set/show disassembler-options commands.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=65b48a81404cb058c75c562f7dfdeb74f07eba72
commit 65b48a81404cb058c75c562f7dfdeb74f07eba72
Author: Peter Bergner <bergner@vnet.ibm.com>
Date: Tue Feb 28 12:32:07 2017 -0600
GDB: Add support for the new set/show disassembler-options commands.
This commit adds support to GDB so that it can modify the disassembler-options
value that is passed to the disassembler, similar to objdump's -M option.
Currently, the only supported targets are ARM, PowerPC and S/390, but
adding support for a new target(s) is not difficult.
include/
* dis-asm.h (disasm_options_t): New typedef.
(parse_arm_disassembler_option): Remove prototype.
(set_arm_regname_option): Likewise.
(get_arm_regnames): Likewise.
(get_arm_regname_num_options): Likewise.
(disassemble_init_s390): New prototype.
(disassembler_options_powerpc): Likewise.
(disassembler_options_arm): Likewise.
(disassembler_options_s390): Likewise.
(remove_whitespace_and_extra_commas): Likewise.
(disassembler_options_cmp): Likewise.
(next_disassembler_option): New inline function.
(FOR_EACH_DISASSEMBLER_OPTION): New macro.
opcodes/
* disassemble.c Include "safe-ctype.h".
(disassemble_init_for_target): Handle s390 init.
(remove_whitespace_and_extra_commas): New function.
(disassembler_options_cmp): Likewise.
* arm-dis.c: Include "libiberty.h".
(NUM_ELEM): Delete.
(regnames): Use long disassembler style names.
Add force-thumb and no-force-thumb options.
(NUM_ARM_REGNAMES): Rename from this...
(NUM_ARM_OPTIONS): ...to this. Use ARRAY_SIZE.
(get_arm_regname_num_options): Delete.
(set_arm_regname_option): Likewise.
(get_arm_regnames): Likewise.
(parse_disassembler_options): Likewise.
(parse_arm_disassembler_option): Rename from this...
(parse_arm_disassembler_options): ...to this. Make static.
Use new FOR_EACH_DISASSEMBLER_OPTION macro to scan over options.
(print_insn): Use parse_arm_disassembler_options.
(disassembler_options_arm): New function.
(print_arm_disassembler_options): Handle updated regnames.
* ppc-dis.c: Include "libiberty.h".
(ppc_opts): Add "32" and "64" entries.
(ppc_parse_cpu): Use ARRAY_SIZE and disassembler_options_cmp.
(powerpc_init_dialect): Add break to switch statement.
Use new FOR_EACH_DISASSEMBLER_OPTION macro.
(disassembler_options_powerpc): New function.
(print_ppc_disassembler_options): Use ARRAY_SIZE.
Remove printing of "32" and "64".
* s390-dis.c: Include "libiberty.h".
(init_flag): Remove unneeded variable.
(struct s390_options_t): New structure type.
(options): New structure.
(init_disasm): Rename from this...
(disassemble_init_s390): ...to this. Add initializations for
current_arch_mask and option_use_insn_len_bits_p. Remove init_flag.
(print_insn_s390): Delete call to init_disasm.
(disassembler_options_s390): New function.
(print_s390_disassembler_options): Print using information from
struct 'options'.
* po/opcodes.pot: Regenerate.
binutils/
* objdump.c (main): Use remove_whitespace_and_extra_commas.
gdb/
* NEWS: Mention new set/show disassembler-options commands.
* doc/gdb.texinfo: Document new set/show disassembler-options commands.
* disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
(prospective_options): New static variable.
(gdb_disassembler::gdb_disassembler): Initialize
m_di.disassembler_options.
(gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
(get_disassembler_options): New function.
(set_disassembler_options): Likewise.
(set_disassembler_options_sfunc): Likewise.
(show_disassembler_options_sfunc): Likewise.
(disassembler_options_completer): Likewise.
(_initialize_disasm): Likewise.
* disasm.h (get_disassembler_options): New prototype.
(set_disassembler_options): Likewise.
* gdbarch.sh (gdbarch_disassembler_options): New variable.
(gdbarch_verify_disassembler_options): Likewise.
* gdbarch.c: Regenerate.
* gdbarch.h: Likewise.
* arm-tdep.c (num_disassembly_options): Delete.
(set_disassembly_style): Likewise.
(arm_disassembler_options): New static variable.
(set_disassembly_style_sfunc): Convert short style name into long
option name. Call set_disassembler_options.
(show_disassembly_style_sfunc): New function.
(arm_gdbarch_init): Call set_gdbarch_disassembler_options and
set_gdbarch_verify_disassembler_options.
(_initialize_arm_tdep): Delete regnames variable and update callers.
(arm_disassembler_options): Initialize.
(disasm_options): New variable.
(num_disassembly_options): Rename from this...
(num_disassembly_styles): ...to this. Compute by scanning through
disasm_options.
(valid_disassembly_styles): Initialize using disasm_options.
Remove calls to parse_arm_disassembler_option, get_arm_regnames and
set_arm_regname_option.
Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
* rs6000-tdep.c (powerpc_disassembler_options): New static variable.
(rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
set_gdbarch_verify_disassembler_options.
* s390-tdep.c (s390_disassembler_options): New static variable.
(s390_gdbarch_init):all set_gdbarch_disassembler_options and
set_gdbarch_verify_disassembler_options.
gdb/testsuite/
* gdb.arch/powerpc-power.exp: Delete test.
* gdb.arch/powerpc-power.s: Likewise.
* gdb.disasm/disassembler-options.exp: New test.
* gdb.arch/powerpc-altivec.exp: Likewise.
* gdb.arch/powerpc-altivec.s: Likewise.
* gdb.arch/powerpc-altivec2.exp: Likewise.
* gdb.arch/powerpc-altivec2.s: Likewise.
* gdb.arch/powerpc-altivec3.exp: Likewise.
* gdb.arch/powerpc-altivec3.s: Likewise.
* gdb.arch/powerpc-power7.exp: Likewise.
* gdb.arch/powerpc-power7.s: Likewise.
* gdb.arch/powerpc-power8.exp: Likewise.
* gdb.arch/powerpc-power8.s: Likewise.
* gdb.arch/powerpc-power9.exp: Likewise.
* gdb.arch/powerpc-power9.s: Likewise.
* gdb.arch/powerpc-vsx.exp: Likewise.
* gdb.arch/powerpc-vsx.s: Likewise.
* gdb.arch/powerpc-vsx2.exp: Likewise.
* gdb.arch/powerpc-vsx2.s: Likewise.
* gdb.arch/powerpc-vsx3.exp: Likewise.
* gdb.arch/powerpc-vsx3.s: Likewise.
* gdb.arch/arm-disassembler-options.exp: Likewise.
* gdb.arch/powerpc-disassembler-options.exp: Likewise.
* gdb.arch/s390-disassembler-options.exp: Likewise.
Diff:
---
binutils/ChangeLog | 4 +
binutils/objdump.c | 16 +-
gdb/ChangeLog | 46 +
gdb/NEWS | 10 +
gdb/arm-tdep.c | 106 +-
gdb/disasm.c | 179 +++
gdb/disasm.h | 8 +
gdb/doc/gdb.texinfo | 21 +
gdb/gdbarch.c | 44 +
gdb/gdbarch.h | 9 +
gdb/gdbarch.sh | 5 +
gdb/rs6000-tdep.c | 7 +
gdb/s390-linux-tdep.c | 7 +
gdb/testsuite/ChangeLog | 27 +
.../gdb.arch/arm-disassembler-options.exp | 56 +
gdb/testsuite/gdb.arch/powerpc-altivec.exp | 261 ++++
gdb/testsuite/gdb.arch/powerpc-altivec.s | 217 +++
gdb/testsuite/gdb.arch/powerpc-altivec2.exp | 178 +++
gdb/testsuite/gdb.arch/powerpc-altivec2.s | 135 ++
gdb/testsuite/gdb.arch/powerpc-altivec3.exp | 131 ++
gdb/testsuite/gdb.arch/powerpc-altivec3.s | 88 ++
.../gdb.arch/powerpc-disassembler-options.exp | 56 +
gdb/testsuite/gdb.arch/powerpc-power.exp | 1429 --------------------
gdb/testsuite/gdb.arch/powerpc-power.s | 1389 -------------------
gdb/testsuite/gdb.arch/powerpc-power7.exp | 164 +++
gdb/testsuite/gdb.arch/powerpc-power7.s | 121 ++
gdb/testsuite/gdb.arch/powerpc-power8.exp | 248 ++++
gdb/testsuite/gdb.arch/powerpc-power8.s | 205 +++
gdb/testsuite/gdb.arch/powerpc-power9.exp | 445 ++++++
gdb/testsuite/gdb.arch/powerpc-power9.s | 402 ++++++
gdb/testsuite/gdb.arch/powerpc-vsx.exp | 225 +++
gdb/testsuite/gdb.arch/powerpc-vsx.s | 182 +++
gdb/testsuite/gdb.arch/powerpc-vsx2.exp | 118 ++
gdb/testsuite/gdb.arch/powerpc-vsx2.s | 75 +
gdb/testsuite/gdb.arch/powerpc-vsx3.exp | 184 +++
gdb/testsuite/gdb.arch/powerpc-vsx3.s | 141 ++
.../gdb.arch/s390-disassembler-options.exp | 56 +
gdb/testsuite/gdb.disasm/disassembler-options.exp | 34 +
include/ChangeLog | 16 +
include/dis-asm.h | 41 +-
opcodes/ChangeLog | 43 +
opcodes/arm-dis.c | 169 +--
opcodes/disassemble.c | 70 +
opcodes/po/opcodes.pot | 199 +--
opcodes/ppc-dis.c | 59 +-
opcodes/s390-dis.c | 72 +-
46 files changed, 4603 insertions(+), 3095 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f54c12d..7004b0b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
+
+ * objdump.c (main): Use remove_whitespace_and_extra_commas.
+
2017-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compilation with GCC 4.4.7.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index b9fecef..4609858 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -3728,12 +3728,16 @@ main (int argc, char **argv)
machine = optarg;
break;
case 'M':
- if (disassembler_options)
- /* Ignore potential memory leak for now. */
- disassembler_options = concat (disassembler_options, ",",
- optarg, (const char *) NULL);
- else
- disassembler_options = optarg;
+ {
+ char *options;
+ if (disassembler_options)
+ /* Ignore potential memory leak for now. */
+ options = concat (disassembler_options, ",",
+ optarg, (const char *) NULL);
+ else
+ options = optarg;
+ disassembler_options = remove_whitespace_and_extra_commas (options);
+ }
break;
case 'j':
add_only (optarg);
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fafa10c..b060291 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,49 @@
+2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
+
+ * NEWS: Mention new set/show disassembler-options commands.
+ * doc/gdb.texinfo: Document new set/show disassembler-options commands.
+ * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
+ (prospective_options): New static variable.
+ (gdb_disassembler::gdb_disassembler): Initialize
+ m_di.disassembler_options.
+ (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
+ (get_disassembler_options): New function.
+ (set_disassembler_options): Likewise.
+ (set_disassembler_options_sfunc): Likewise.
+ (show_disassembler_options_sfunc): Likewise.
+ (disassembler_options_completer): Likewise.
+ (_initialize_disasm): Likewise.
+ * disasm.h (get_disassembler_options): New prototype.
+ (set_disassembler_options): Likewise.
+ * gdbarch.sh (gdbarch_disassembler_options): New variable.
+ (gdbarch_verify_disassembler_options): Likewise.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Likewise.
+ * arm-tdep.c (num_disassembly_options): Delete.
+ (set_disassembly_style): Likewise.
+ (arm_disassembler_options): New static variable.
+ (set_disassembly_style_sfunc): Convert short style name into long
+ option name. Call set_disassembler_options.
+ (show_disassembly_style_sfunc): New function.
+ (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
+ set_gdbarch_verify_disassembler_options.
+ (_initialize_arm_tdep): Delete regnames variable and update callers.
+ (arm_disassembler_options): Initialize.
+ (disasm_options): New variable.
+ (num_disassembly_options): Rename from this...
+ (num_disassembly_styles): ...to this. Compute by scanning through
+ disasm_options.
+ (valid_disassembly_styles): Initialize using disasm_options.
+ Remove calls to parse_arm_disassembler_option, get_arm_regnames and
+ set_arm_regname_option.
+ Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
+ * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
+ (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
+ set_gdbarch_verify_disassembler_options.
+ * s390-tdep.c (s390_disassembler_options): New static variable.
+ (s390_gdbarch_init):all set_gdbarch_disassembler_options and
+ set_gdbarch_verify_disassembler_options.
+
2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
* remote.c (remote_add_target_side_condition): Remove "struct"
diff --git a/gdb/NEWS b/gdb/NEWS
index 76de00e..cf58595 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -84,6 +84,16 @@ flash-erase
Erases all the flash memory regions reported by the target. This is
equivalent to the CLI command flash-erase.
+* New commands
+
+set disassembler-options
+show disassembler-options
+ Controls the passing of target specific information to the disassembler.
+ If it is necessary to specify more than one disassembler option then
+ multiple options can be placed together into a comma separated list.
+ The default value is the empty string. Currently, the only supported
+ targets are ARM, PowerPC and S/390.
+
*** Changes in GDB 7.12
* GDB and GDBserver now build with a C++ compiler by default.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 88ed391..3aee722 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -145,9 +145,6 @@ static const char *const arm_mode_strings[] =
static const char *arm_fallback_mode_string = "auto";
static const char *arm_force_mode_string = "auto";
-/* Number of different reg name sets (options). */
-static int num_disassembly_options;
-
/* The standard register names, and all the valid aliases for them. Note
that `fp', `sp' and `pc' are not added in this alias list, because they
have been added as builtin user registers in
@@ -208,6 +205,9 @@ static const char *const arm_register_names[] =
"f4", "f5", "f6", "f7", /* 20 21 22 23 */
"fps", "cpsr" }; /* 24 25 */
+/* Holds the current set of options to be passed to the disassembler. */
+static char *arm_disassembler_options;
+
/* Valid register name styles. */
static const char **valid_disassembly_styles;
@@ -218,7 +218,9 @@ static const char *disassembly_style;
style. */
static void set_disassembly_style_sfunc(char *, int,
struct cmd_list_element *);
-static void set_disassembly_style (void);
+static void show_disassembly_style_sfunc (struct ui_file *, int,
+ struct cmd_list_element *,
+ const char *);
static void convert_from_extended (const struct floatformat *, const void *,
void *, int);
@@ -8539,9 +8541,32 @@ arm_show_force_mode (struct ui_file *file, int from_tty,
static void
set_disassembly_style_sfunc (char *args, int from_tty,
- struct cmd_list_element *c)
+ struct cmd_list_element *c)
{
- set_disassembly_style ();
+ /* Convert the short style name into the long style name (eg, reg-names-*)
+ before calling the generic set_disassembler_options() function. */
+ std::string long_name = std::string ("reg-names-") + disassembly_style;
+ set_disassembler_options (&long_name[0]);
+}
+
+static void
+show_disassembly_style_sfunc (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ struct gdbarch *gdbarch = get_current_arch ();
+ char *options = get_disassembler_options (gdbarch);
+ const char *style = "";
+ int len = 0;
+ char *opt;
+
+ FOR_EACH_DISASSEMBLER_OPTION (opt, options)
+ if (CONST_STRNEQ (opt, "reg-names-"))
+ {
+ style = &opt[strlen ("reg-names-")];
+ len = strcspn (style, ",");
+ }
+
+ fprintf_unfiltered (file, "The disassembly style is \"%.*s\".\n", len, style);
}
/* Return the ARM register name corresponding to register I. */
@@ -8582,21 +8607,6 @@ arm_register_name (struct gdbarch *gdbarch, int i)
return arm_register_names[i];
}
-static void
-set_disassembly_style (void)
-{
- int current;
-
- /* Find the style that the user wants. */
- for (current = 0; current < num_disassembly_options; current++)
- if (disassembly_style == valid_disassembly_styles[current])
- break;
- gdb_assert (current < num_disassembly_options);
-
- /* Synchronize the disassembler. */
- set_arm_regname_option (current);
-}
-
/* Test whether the coff symbol specific value corresponds to a Thumb
function. */
@@ -9556,6 +9566,9 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
user_reg_add (gdbarch, arm_register_aliases[i].name,
value_of_arm_user_reg, &arm_register_aliases[i].regnum);
+ set_gdbarch_disassembler_options (gdbarch, &arm_disassembler_options);
+ set_gdbarch_valid_disassembler_options (gdbarch, disassembler_options_arm ());
+
return gdbarch;
}
@@ -9579,8 +9592,7 @@ _initialize_arm_tdep (void)
long length;
const char *setname;
const char *setdesc;
- const char *const *regnames;
- int i;
+ int i, j;
char regdesc[1024], *rdptr = regdesc;
size_t rest = sizeof (regdesc);
@@ -9608,9 +9620,6 @@ _initialize_arm_tdep (void)
initialize_tdesc_arm_with_vfpv3 ();
initialize_tdesc_arm_with_neon ();
- /* Get the number of possible sets of register names defined in opcodes. */
- num_disassembly_options = get_arm_regname_num_options ();
-
/* Add root prefix command for all "set arm"/"show arm" commands. */
add_prefix_cmd ("arm", no_class, set_arm_command,
_("Various ARM-specific commands."),
@@ -9620,30 +9629,30 @@ _initialize_arm_tdep (void)
_("Various ARM-specific commands."),
&showarmcmdlist, "show arm ", 0, &showlist);
- /* Sync the opcode insn printer with our register viewer. */
- parse_arm_disassembler_option ("reg-names-std");
- /* Initialize the array that will be passed to
- add_setshow_enum_cmd(). */
+ arm_disassembler_options = xstrdup ("reg-names-std");
+ const disasm_options_t *disasm_options = disassembler_options_arm ();
+ int num_disassembly_styles = 0;
+ for (i = 0; disasm_options->name[i] != NULL; i++)
+ if (CONST_STRNEQ (disasm_options->name[i], "reg-names-"))
+ num_disassembly_styles++;
+
+ /* Initialize the array that will be passed to add_setshow_enum_cmd(). */
valid_disassembly_styles = XNEWVEC (const char *,
- num_disassembly_options + 1);
- for (i = 0; i < num_disassembly_options; i++)
- {
- get_arm_regnames (i, &setname, &setdesc, ®names);
- valid_disassembly_styles[i] = setname;
- length = snprintf (rdptr, rest, "%s - %s\n", setname, setdesc);
- rdptr += length;
- rest -= length;
- /* When we find the default names, tell the disassembler to use
- them. */
- if (!strcmp (setname, "std"))
- {
- disassembly_style = setname;
- set_arm_regname_option (i);
- }
- }
+ num_disassembly_styles + 1);
+ for (i = j = 0; disasm_options->name[i] != NULL; i++)
+ if (CONST_STRNEQ (disasm_options->name[i], "reg-names-"))
+ {
+ size_t offset = strlen ("reg-names-");
+ const char *style = disasm_options->name[i];
+ valid_disassembly_styles[j++] = &style[offset];
+ length = snprintf (rdptr, rest, "%s - %s\n", &style[offset],
+ disasm_options->description[i]);
+ rdptr += length;
+ rest -= length;
+ }
/* Mark the end of valid options. */
- valid_disassembly_styles[num_disassembly_options] = NULL;
+ valid_disassembly_styles[num_disassembly_styles] = NULL;
/* Create the help text. */
std::string helptext = string_printf ("%s%s%s",
@@ -9657,8 +9666,7 @@ _initialize_arm_tdep (void)
_("Show the disassembly style."),
helptext.c_str (),
set_disassembly_style_sfunc,
- NULL, /* FIXME: i18n: The disassembly style is
- \"%s\". */
+ show_disassembly_style_sfunc,
&setarmcmdlist, &showarmcmdlist);
add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32,
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 64d6684..ab080e2 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -18,19 +18,26 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "arch-utils.h"
#include "target.h"
#include "value.h"
#include "ui-out.h"
#include "disasm.h"
#include "gdbcore.h"
+#include "gdbcmd.h"
#include "dis-asm.h"
#include "source.h"
+#include "safe-ctype.h"
#include <algorithm>
/* Disassemble functions.
FIXME: We should get rid of all the duplicate code in gdb that does
the same thing: disassemble_command() and the gdbtk variation. */
+/* This variable is used to hold the prospective disassembler_options value
+ which is set by the "set disassembler_options" command. */
+static char *prospective_options = NULL;
+
/* This structure is used to store line number information for the
deprecated /m option.
We need a different sort of line table from the normal one cuz we can't
@@ -780,6 +787,7 @@ gdb_disassembler::gdb_disassembler (struct gdbarch *gdbarch,
m_di.endian = gdbarch_byte_order (gdbarch);
m_di.endian_code = gdbarch_byte_order_for_code (gdbarch);
m_di.application_data = this;
+ m_di.disassembler_options = get_disassembler_options (gdbarch);
disassemble_init_for_target (&m_di);
}
@@ -888,6 +896,7 @@ gdb_buffered_insn_length_init_dis (struct gdbarch *gdbarch,
di->endian = gdbarch_byte_order (gdbarch);
di->endian_code = gdbarch_byte_order_for_code (gdbarch);
+ di->disassembler_options = get_disassembler_options (gdbarch);
disassemble_init_for_target (di);
}
@@ -904,3 +913,173 @@ gdb_buffered_insn_length (struct gdbarch *gdbarch,
return gdbarch_print_insn (gdbarch, addr, &di);
}
+
+char *
+get_disassembler_options (struct gdbarch *gdbarch)
+{
+ char **disassembler_options = gdbarch_disassembler_options (gdbarch);
+ if (disassembler_options == NULL)
+ return NULL;
+ return *disassembler_options;
+}
+
+void
+set_disassembler_options (char *prospective_options)
+{
+ struct gdbarch *gdbarch = get_current_arch ();
+ char **disassembler_options = gdbarch_disassembler_options (gdbarch);
+ const disasm_options_t *valid_options;
+ char *options = remove_whitespace_and_extra_commas (prospective_options);
+ char *opt;
+
+ /* Allow all architectures, even ones that do not support 'set disassembler',
+ to reset their disassembler options to NULL. */
+ if (options == NULL)
+ {
+ if (disassembler_options != NULL)
+ {
+ free (*disassembler_options);
+ *disassembler_options = NULL;
+ }
+ return;
+ }
+
+ valid_options = gdbarch_valid_disassembler_options (gdbarch);
+ if (valid_options == NULL)
+ {
+ fprintf_filtered (gdb_stdlog, _("\
+'set disassembler-options ...' is not supported on this architecture.\n"));
+ return;
+ }
+
+ /* Verify we have valid disassembler options. */
+ FOR_EACH_DISASSEMBLER_OPTION (opt, options)
+ {
+ size_t i;
+ for (i = 0; valid_options->name[i] != NULL; i++)
+ if (disassembler_options_cmp (opt, valid_options->name[i]) == 0)
+ break;
+ if (valid_options->name[i] == NULL)
+ {
+ fprintf_filtered (gdb_stdlog,
+ _("Invalid disassembler option value: '%s'.\n"),
+ opt);
+ return;
+ }
+ }
+
+ free (*disassembler_options);
+ *disassembler_options = xstrdup (options);
+}
+
+static void
+set_disassembler_options_sfunc (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ set_disassembler_options (prospective_options);
+}
+
+static void
+show_disassembler_options_sfunc (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ struct gdbarch *gdbarch = get_current_arch ();
+ const disasm_options_t *valid_options;
+
+ const char *options = get_disassembler_options (gdbarch);
+ if (options == NULL)
+ options = "";
+
+ fprintf_filtered (file, _("The current disassembler options are '%s'\n"),
+ options);
+
+ valid_options = gdbarch_valid_disassembler_options (gdbarch);
+
+ if (valid_options == NULL)
+ return;
+
+ fprintf_filtered (file, _("\n\
+The following disassembler options are supported for use with the\n\
+'set disassembler-options <option>[,<option>...]' command:\n"));
+
+ if (valid_options->description != NULL)
+ {
+ size_t i, max_len = 0;
+
+ /* Compute the length of the longest option name. */
+ for (i = 0; valid_options->name[i] != NULL; i++)
+ {
+ size_t len = strlen (valid_options->name[i]);
+ if (max_len < len)
+ max_len = len;
+ }
+
+ for (i = 0, max_len++; valid_options->name[i] != NULL; i++)
+ {
+ fprintf_filtered (file, " %s", valid_options->name[i]);
+ if (valid_options->description[i] != NULL)
+ fprintf_filtered (file, "%*c %s",
+ (int)(max_len - strlen (valid_options->name[i])), ' ',
+ valid_options->description[i]);
+ fprintf_filtered (file, "\n");
+ }
+ }
+ else
+ {
+ size_t i;
+ fprintf_filtered (file, " ");
+ for (i = 0; valid_options->name[i] != NULL; i++)
+ {
+ fprintf_filtered (file, "%s", valid_options->name[i]);
+ if (valid_options->name[i + 1] != NULL)
+ fprintf_filtered (file, ", ");
+ wrap_here (" ");
+ }
+ fprintf_filtered (file, "\n");
+ }
+}
+
+/* A completion function for "set disassembler". */
+
+static VEC (char_ptr) *
+disassembler_options_completer (struct cmd_list_element *ignore,
+ const char *text, const char *word)
+{
+ struct gdbarch *gdbarch = get_current_arch ();
+ const disasm_options_t *opts = gdbarch_valid_disassembler_options (gdbarch);
+
+ if (opts != NULL)
+ {
+ /* Only attempt to complete on the last option text. */
+ const char *separator = strrchr (text, ',');
+ if (separator != NULL)
+ text = separator + 1;
+ text = skip_spaces_const (text);
+ return complete_on_enum (opts->name, text, word);
+ }
+ return NULL;
+}
+
+
+/* Initialization code. */
+
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_disasm;
+
+void
+_initialize_disasm (void)
+{
+ struct cmd_list_element *cmd;
+
+ /* Add the command that controls the disassembler options. */
+ cmd = add_setshow_string_noescape_cmd ("disassembler-options", no_class,
+ &prospective_options, _("\
+Set the disassembler options.\n\
+Usage: set disassembler-options <option>[,<option>...]\n\n\
+See: 'show disassembler-options' for valid option values.\n"), _("\
+Show the disassembler options."), NULL,
+ set_disassembler_options_sfunc,
+ show_disassembler_options_sfunc,
+ &setlist, &showlist);
+ set_cmd_completer (cmd, disassembler_options_completer);
+}
diff --git a/gdb/disasm.h b/gdb/disasm.h
index 42c1f3a..ad3e8dd 100644
--- a/gdb/disasm.h
+++ b/gdb/disasm.h
@@ -138,4 +138,12 @@ extern int gdb_buffered_insn_length (struct gdbarch *gdbarch,
const gdb_byte *insn, int max_len,
CORE_ADDR memaddr);
+/* Returns GDBARCH's disassembler options. */
+
+extern char *get_disassembler_options (struct gdbarch *gdbarch);
+
+/* Sets the active gdbarch's disassembler options to OPTIONS. */
+
+extern void set_disassembler_options (char *options);
+
#endif
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 962325b..f19e80f 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -8520,6 +8520,27 @@ location of the relocation table. On some architectures, @value{GDBN}
might be able to resolve these to actual function names.
@table @code
+@kindex set disassembler-options
+@cindex disassembler options
+@item set disassembler-options @var{option1}[,@var{option2}@dots{}]
+This command controls the passing of target specific information to
+the disassembler. For a list of valid options, please refer to the
+@code{-M}/@code{--disassembler-options} section of the @samp{objdump}
+manual and/or the output of @kbd{objdump --help}
+(@pxref{objdump,,objdump,binutils.info,The GNU Binary Utilities}).
+The default value is the empty string.
+
+If it is necessary to specify more than one disassembler option, then
+multiple options can be placed together into a comma separated list.
+Currently this command is only supported on targets ARM, PowerPC
+and S/390.
+
+@kindex show disassembler-options
+@item show disassembler-options
+Show the current setting of the disassembler options.
+@end table
+
+@table @code
@kindex set disassembly-flavor
@cindex Intel disassembly flavor
@cindex AT&T disassembly flavor
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 266f2e9..f52cf5d 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -339,6 +339,8 @@ struct gdbarch
gdbarch_gcc_target_options_ftype *gcc_target_options;
gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
+ char ** disassembler_options;
+ const disasm_options_t * valid_disassembler_options;
};
/* Create a new ``struct gdbarch'' based on information provided by
@@ -692,6 +694,8 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of gcc_target_options, invalid_p == 0 */
/* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
/* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
+ /* Skip verify of disassembler_options, invalid_p == 0 */
+ /* Skip verify of valid_disassembler_options, invalid_p == 0 */
if (!log.empty ())
internal_error (__FILE__, __LINE__,
_("verify_gdbarch: the following are invalid ...%s"),
@@ -875,6 +879,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: deprecated_function_start_offset = %s\n",
core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
fprintf_unfiltered (file,
+ "gdbarch_dump: disassembler_options = %s\n",
+ pstring (*gdbarch->disassembler_options));
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
gdbarch_displaced_step_copy_insn_p (gdbarch));
fprintf_unfiltered (file,
@@ -1421,6 +1428,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: unwind_sp = <%s>\n",
host_address_to_string (gdbarch->unwind_sp));
fprintf_unfiltered (file,
+ "gdbarch_dump: valid_disassembler_options = %s\n",
+ host_address_to_string (gdbarch->valid_disassembler_options->name));
+ fprintf_unfiltered (file,
"gdbarch_dump: value_from_register = <%s>\n",
host_address_to_string (gdbarch->value_from_register));
fprintf_unfiltered (file,
@@ -4956,6 +4966,40 @@ set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
}
+char **
+gdbarch_disassembler_options (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of disassembler_options, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options called\n");
+ return gdbarch->disassembler_options;
+}
+
+void
+set_gdbarch_disassembler_options (struct gdbarch *gdbarch,
+ char ** disassembler_options)
+{
+ gdbarch->disassembler_options = disassembler_options;
+}
+
+const disasm_options_t *
+gdbarch_valid_disassembler_options (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of valid_disassembler_options, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_valid_disassembler_options called\n");
+ return gdbarch->valid_disassembler_options;
+}
+
+void
+set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch,
+ const disasm_options_t * valid_disassembler_options)
+{
+ gdbarch->valid_disassembler_options = valid_disassembler_options;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 50bc6a9..34f82a7 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -36,6 +36,7 @@
#define GDBARCH_H
#include "frame.h"
+#include "dis-asm.h"
struct floatformat;
struct ui_file;
@@ -1545,6 +1546,14 @@ typedef int (gdbarch_addressable_memory_unit_size_ftype) (struct gdbarch *gdbarc
extern int gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch);
extern void set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch, gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size);
+/* Functions for allowing a target to modify its disassembler options. */
+
+extern char ** gdbarch_disassembler_options (struct gdbarch *gdbarch);
+extern void set_gdbarch_disassembler_options (struct gdbarch *gdbarch, char ** disassembler_options);
+
+extern const disasm_options_t * gdbarch_valid_disassembler_options (struct gdbarch *gdbarch);
+extern void set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch, const disasm_options_t * valid_disassembler_options);
+
/* Definition for an unknown syscall, used basically in error-cases. */
#define UNKNOWN_SYSCALL (-1)
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 54549b6..6902e0e 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1163,6 +1163,10 @@ m:const char *:gnu_triplet_regexp:void:::default_gnu_triplet_regexp::0
# each address in memory.
m:int:addressable_memory_unit_size:void:::default_addressable_memory_unit_size::0
+# Functions for allowing a target to modify its disassembler options.
+v:char **:disassembler_options:::0:0::0:pstring (*gdbarch->disassembler_options)
+v:const disasm_options_t *:valid_disassembler_options:::0:0::0:host_address_to_string (gdbarch->valid_disassembler_options->name)
+
EOF
}
@@ -1259,6 +1263,7 @@ cat <<EOF
#define GDBARCH_H
#include "frame.h"
+#include "dis-asm.h"
struct floatformat;
struct ui_file;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 72ee05d..67c4d51 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -106,6 +106,9 @@
&& (regnum) >= (tdep)->ppc_efpr0_regnum \
&& (regnum) < (tdep)->ppc_efpr0_regnum + ppc_num_efprs)
+/* Holds the current set of options to be passed to the disassembler. */
+static char *powerpc_disassembler_options;
+
/* The list of available "set powerpc ..." and "show powerpc ..."
commands. */
static struct cmd_list_element *setpowerpccmdlist = NULL;
@@ -6609,6 +6612,10 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
register_ppc_ravenscar_ops (gdbarch);
+ set_gdbarch_disassembler_options (gdbarch, &powerpc_disassembler_options);
+ set_gdbarch_valid_disassembler_options (gdbarch,
+ disassembler_options_powerpc ());
+
return gdbarch;
}
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index febdd14..abc9438 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -79,6 +79,9 @@
#define XML_SYSCALL_FILENAME_S390 "syscalls/s390-linux.xml"
#define XML_SYSCALL_FILENAME_S390X "syscalls/s390x-linux.xml"
+/* Holds the current set of options to be passed to the disassembler. */
+static char *s390_disassembler_options;
+
enum s390_abi_kind
{
ABI_LINUX_S390,
@@ -8113,6 +8116,10 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
s390_init_linux_record_tdep (&s390_linux_record_tdep, ABI_LINUX_S390);
s390_init_linux_record_tdep (&s390x_linux_record_tdep, ABI_LINUX_ZSERIES);
+ set_gdbarch_disassembler_options (gdbarch, &s390_disassembler_options);
+ set_gdbarch_valid_disassembler_options (gdbarch,
+ disassembler_options_s390 ());
+
return gdbarch;
}
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b102b87..cb8bf53 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,30 @@
+2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
+
+ * gdb.arch/powerpc-power.exp: Delete test.
+ * gdb.arch/powerpc-power.s: Likewise.
+ * gdb.disasm/disassembler-options.exp: New test.
+ * gdb.arch/powerpc-altivec.exp: Likewise.
+ * gdb.arch/powerpc-altivec.s: Likewise.
+ * gdb.arch/powerpc-altivec2.exp: Likewise.
+ * gdb.arch/powerpc-altivec2.s: Likewise.
+ * gdb.arch/powerpc-altivec3.exp: Likewise.
+ * gdb.arch/powerpc-altivec3.s: Likewise.
+ * gdb.arch/powerpc-power7.exp: Likewise.
+ * gdb.arch/powerpc-power7.s: Likewise.
+ * gdb.arch/powerpc-power8.exp: Likewise.
+ * gdb.arch/powerpc-power8.s: Likewise.
+ * gdb.arch/powerpc-power9.exp: Likewise.
+ * gdb.arch/powerpc-power9.s: Likewise.
+ * gdb.arch/powerpc-vsx.exp: Likewise.
+ * gdb.arch/powerpc-vsx.s: Likewise.
+ * gdb.arch/powerpc-vsx2.exp: Likewise.
+ * gdb.arch/powerpc-vsx2.s: Likewise.
+ * gdb.arch/powerpc-vsx3.exp: Likewise.
+ * gdb.arch/powerpc-vsx3.s: Likewise.
+ * gdb.arch/arm-disassembler-options.exp: Likewise.
+ * gdb.arch/powerpc-disassembler-options.exp: Likewise.
+ * gdb.arch/s390-disassembler-options.exp: Likewise.
+
2017-02-23 Luis Machado <lgustavo@codesourcery.com>
* gdb.reverse/insn-reverse.x86.c (check_rdrand_support): Renamed to ...
diff --git a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
new file mode 100644
index 0000000..0116e6b
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp
@@ -0,0 +1,56 @@
+# Copyright 2014-2017 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.
+
+# This test exercises set/show disassembler-options results are preserved
+# across multiple set architecture calls.
+
+if {![istarget "arm*-*-*"]} then {
+ verbose "Skipping ARM disassembler options."
+ return
+}
+
+gdb_exit
+gdb_start
+
+set option "reg-names-gcc,force-thumb"
+set arch1 "armv2"
+set arch2 "armv5"
+
+gdb_test "set architecture $arch1" \
+ "The target architecture is assumed to be $arch1" \
+ "set architecture $arch1"
+
+gdb_test_no_output "set disassembler-options"
+gdb_test "show disassembler-options" \
+ "The current disassembler options are ''.*" \
+ "show NULL disassembler-options"
+
+gdb_test_no_output "set disassembler-options $option"
+gdb_test "show disassembler-options" \
+ "The current disassembler options are '$option'.*" \
+ "show disassembler-options $option"
+
+# Change architectures and verify the disassembler options have been preserved.
+
+gdb_test "set architecture $arch2" \
+ "The target architecture is assumed to be $arch2" \
+ "set architecture $arch2"
+
+gdb_test "show disassembler-options" \
+ "The current disassembler options are '$option'.*" \
+ "show disassembler-options $option"
+
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec.exp b/gdb/testsuite/gdb.arch/powerpc-altivec.exp
new file mode 100644
index 0000000..2587847
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec.exp
@@ -0,0 +1,261 @@
+# Copyright 2014-2017 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.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC instructions disassembly."
+ return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC instructions disassembly"
+ return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options altivec"
+set test "disass func"
+gdb_test_multiple $test $test {
+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+ set func $expect_out(1,string)
+ pass $test
+ }
+}
+
+proc instr_to_patt {instr} {
+ global decimal hex
+ # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
+ return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+ global func
+
+ set test "found: '$instr'"
+ set peb [instr_to_patt $instr]
+ if [regexp -nocase -line [instr_to_patt $instr] $func] {
+ pass $test
+ } else {
+ fail $peb
+ }
+}
+
+func_check "dss 3"
+func_check "dssall"
+func_check "dst r5,r4,1"
+func_check "dstt r8,r7,0"
+func_check "dstst r5,r6,3"
+func_check "dststt r4,r5,2"
+func_check "lvebx v30,r22,r24"
+func_check "lvebx v21,0,r24"
+func_check "lvehx v10,r16,r2"
+func_check "lvehx v20,0,r23"
+func_check "lvewx v17,r4,r18"
+func_check "lvewx v23,0,r8"
+func_check "lvsl v6,0,r25"
+func_check "lvsl v2,0,r6"
+func_check "lvsr v22,r16,r12"
+func_check "lvsr v0,0,r29"
+func_check "lvxl v15,r5,r13"
+func_check "lvxl v19,0,r23"
+func_check "lvx v22,r1,r2"
+func_check "lvx v18,0,r17"
+func_check "mfvrsave r31"
+func_check "mfvscr v24"
+func_check "mtvrsave r10"
+func_check "mtvscr v25"
+func_check "stvebx v18,r27,r10"
+func_check "stvebx v16,0,r6"
+func_check "stvehx v17,r13,r16"
+func_check "stvehx v23,0,r20"
+func_check "stvewx v11,r19,r31"
+func_check "stvewx v31,0,r1"
+func_check "stvxl v26,r21,r17"
+func_check "stvxl v13,0,r22"
+func_check "stvx v11,r31,r31"
+func_check "stvx v30,0,r16"
+func_check "vaddcuw v24,v7,v28"
+func_check "vaddfp v3,v30,v11"
+func_check "vaddsbs v8,v28,v9"
+func_check "vaddshs v7,v5,v4"
+func_check "vaddsws v22,v26,v27"
+func_check "vaddubm v16,v14,v28"
+func_check "vaddubs v6,v1,v25"
+func_check "vadduhm v2,v4,v6"
+func_check "vadduhs v26,v21,v8"
+func_check "vadduwm v29,v31,v1"
+func_check "vadduws v23,v13,v4"
+func_check "vandc v30,v16,v9"
+func_check "vand v3,v13,v27"
+func_check "vavgsb v4,v6,v17"
+func_check "vavgsh v23,v28,v19"
+func_check "vavgsw v8,v15,v31"
+func_check "vavgub v6,v7,v25"
+func_check "vavguh v25,v22,v10"
+func_check "vavguw v3,v23,v29"
+func_check "vctsxs v14,v2,6"
+func_check "vctuxs v9,v31,20"
+func_check "vcfsx v24,v30,3"
+func_check "vcfux v17,v21,29"
+func_check "vcmpbfp v18,v28,v0"
+func_check "vcmpbfp. v19,v26,v3"
+func_check "vcmpeqfp v16,v2,v11"
+func_check "vcmpeqfp. v23,v13,v13"
+func_check "vcmpequb v25,v19,v10"
+func_check "vcmpequb. v18,v11,v2"
+func_check "vcmpequh v9,v25,v7"
+func_check "vcmpequh. v14,v24,v21"
+func_check "vcmpequw v24,v12,v5"
+func_check "vcmpequw. v19,v16,v1"
+func_check "vcmpgefp v23,v17,v16"
+func_check "vcmpgefp. v19,v29,v17"
+func_check "vcmpgtfp v16,v28,v13"
+func_check "vcmpgtfp. v14,v24,v7"
+func_check "vcmpgtsb v16,v22,v6"
+func_check "vcmpgtsb. v2,v12,v14"
+func_check "vcmpgtsh v28,v3,v29"
+func_check "vcmpgtsh. v16,v19,v13"
+func_check "vcmpgtsw v15,v0,v5"
+func_check "vcmpgtsw. v21,v13,v0"
+func_check "vcmpgtub v5,v10,v30"
+func_check "vcmpgtub. v7,v13,v10"
+func_check "vcmpgtuh v24,v15,v16"
+func_check "vcmpgtuh. v25,v21,v27"
+func_check "vcmpgtuw v17,v27,v6"
+func_check "vcmpgtuw. v8,v21,v27"
+func_check "vcfsx v1,v1,14"
+func_check "vctsxs v4,v15,25"
+func_check "vctuxs v28,v23,14"
+func_check "vcfux v6,v6,0"
+func_check "vexptefp v0,v8"
+func_check "vlogefp v22,v27"
+func_check "vmaddfp v23,v18,v5,v18"
+func_check "vmaxfp v13,v13,v27"
+func_check "vmaxsb v8,v23,v14"
+func_check "vmaxsh v19,v17,v0"
+func_check "vmaxsw v19,v3,v22"
+func_check "vmaxub v23,v30,v28"
+func_check "vmaxuh v9,v20,v23"
+func_check "vmaxuw v21,v19,v1"
+func_check "vmhaddshs v22,v13,v5,v22"
+func_check "vmhraddshs v31,v0,v3,v18"
+func_check "vminfp v2,v21,v24"
+func_check "vminsb v20,v6,v10"
+func_check "vminsh v18,v27,v26"
+func_check "vminsw v3,v4,v1"
+func_check "vminub v7,v0,v13"
+func_check "vminuh v0,v12,v6"
+func_check "vminuw v6,v3,v1"
+func_check "vmladduhm v3,v29,v3,v26"
+func_check "vmrghb v21,v5,v31"
+func_check "vmrghh v21,v24,v0"
+func_check "vmrghw v16,v0,v22"
+func_check "vmrglb v1,v17,v16"
+func_check "vmrglh v14,v8,v15"
+func_check "vmrglw v31,v21,v5"
+func_check "vmr v24,v9"
+func_check "vmr v24,v9"
+func_check "vmsummbm v0,v24,v15,v23"
+func_check "vmsumshm v1,v4,v7,v25"
+func_check "vmsumshs v9,v8,v13,v31"
+func_check "vmsumubm v23,v31,v12,v30"
+func_check "vmsumuhm v29,v0,v26,v21"
+func_check "vmsumuhs v27,v14,v25,v5"
+func_check "vmulesb v10,v25,v14"
+func_check "vmulesh v1,v18,v8"
+func_check "vmuleub v17,v14,v9"
+func_check "vmuleuh v5,v26,v9"
+func_check "vmulosb v21,v18,v6"
+func_check "vmulosh v4,v5,v8"
+func_check "vmuloub v2,v9,v19"
+func_check "vmulouh v29,v5,v4"
+func_check "vnmsubfp v8,v2,v6,v5"
+func_check "vnor v31,v9,v10"
+func_check "vnot v25,v31"
+func_check "vnot v25,v31"
+func_check "vor v23,v7,v2"
+func_check "vperm v0,v28,v22,v25"
+func_check "vpkpx v16,v25,v17"
+func_check "vpkshss v12,v16,v17"
+func_check "vpkshus v1,v19,v23"
+func_check "vpkswss v25,v7,v13"
+func_check "vpkswus v4,v24,v10"
+func_check "vpkuhum v9,v27,v12"
+func_check "vpkuhus v22,v10,v25"
+func_check "vpkuwum v30,v18,v0"
+func_check "vpkuwus v7,v3,v22"
+func_check "vrefp v24,v28"
+func_check "vrfim v17,v19"
+func_check "vrfin v24,v25"
+func_check "vrfip v3,v5"
+func_check "vrfiz v8,v10"
+func_check "vrlb v26,v18,v30"
+func_check "vrlh v16,v17,v25"
+func_check "vrlw v23,v30,v9"
+func_check "vrsqrtefp v2,v18"
+func_check "vsel v20,v14,v18,v10"
+func_check "vslb v25,v25,v12"
+func_check "vsldoi v9,v9,v12,7"
+func_check "vslh v14,v2,v11"
+func_check "vslo v30,v5,v6"
+func_check "vsl v22,v30,v9"
+func_check "vslw v26,v26,v3"
+func_check "vspltb v1,v20,6"
+func_check "vsplth v16,v18,3"
+func_check "vspltisb v25,-13"
+func_check "vspltish v22,10"
+func_check "vspltisw v13,13"
+func_check "vspltw v9,v18,2"
+func_check "vsrab v14,v22,v0"
+func_check "vsrah v12,v12,v18"
+func_check "vsraw v2,v2,v13"
+func_check "vsrb v7,v27,v5"
+func_check "vsrh v7,v11,v29"
+func_check "vsro v18,v30,v31"
+func_check "vsr v2,v9,v28"
+func_check "vsrw v0,v25,v0"
+func_check "vsubcuw v24,v2,v10"
+func_check "vsubfp v22,v24,v20"
+func_check "vsubsbs v10,v22,v13"
+func_check "vsubshs v24,v17,v28"
+func_check "vsubsws v10,v26,v0"
+func_check "vsububm v16,v11,v24"
+func_check "vsububs v11,v21,v1"
+func_check "vsubuhm v6,v12,v24"
+func_check "vsubuhs v30,v11,v9"
+func_check "vsubuwm v19,v20,v13"
+func_check "vsubuws v18,v25,v6"
+func_check "vsum2sws v25,v10,v18"
+func_check "vsum4sbs v13,v16,v21"
+func_check "vsum4shs v23,v8,v4"
+func_check "vsum4ubs v28,v13,v30"
+func_check "vsumsws v22,v10,v8"
+func_check "vupkhpx v24,v14"
+func_check "vupkhsb v2,v22"
+func_check "vupkhsh v16,v2"
+func_check "vupklpx v10,v26"
+func_check "vupklsb v15,v28"
+func_check "vupklsh v8,v8"
+func_check "vxor v25,v0,v3"
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec.s b/gdb/testsuite/gdb.arch/powerpc-altivec.s
new file mode 100644
index 0000000..4148002
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec.s
@@ -0,0 +1,217 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2014-2017 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/>. */
+
+ .text
+ .globl func
+func:
+ .long 0x7c60066c /* dss 3 */
+ .long 0x7e00066c /* dssall */
+ .long 0x7c2522ac /* dst r5,r4,1 */
+ .long 0x7e083aac /* dstt r8,r7,0 */
+ .long 0x7c6532ec /* dstst r5,r6,3 */
+ .long 0x7e442aec /* dststt r4,r5,2 */
+ .long 0x7fd6c00e /* lvebx v30,r22,r24 */
+ .long 0x7ea0c00e /* lvebx v21,0,r24 */
+ .long 0x7d50104e /* lvehx v10,r16,r2 */
+ .long 0x7e80b84e /* lvehx v20,0,r23 */
+ .long 0x7e24908e /* lvewx v17,r4,r18 */
+ .long 0x7ee0408e /* lvewx v23,0,r8 */
+ .long 0x7cc0c80c /* lvsl v6,0,r25 */
+ .long 0x7c40300c /* lvsl v2,0,r6 */
+ .long 0x7ed0604c /* lvsr v22,r16,r12 */
+ .long 0x7c00e84c /* lvsr v0,0,r29 */
+ .long 0x7de56ace /* lvxl v15,r5,r13 */
+ .long 0x7e60bace /* lvxl v19,0,r23 */
+ .long 0x7ec110ce /* lvx v22,r1,r2 */
+ .long 0x7e4088ce /* lvx v18,0,r17 */
+ .long 0x7fe042a6 /* mfvrsave r31 */
+ .long 0x13000604 /* mfvscr v24 */
+ .long 0x7d4043a6 /* mtvrsave r10 */
+ .long 0x1000ce44 /* mtvscr v25 */
+ .long 0x7e5b510e /* stvebx v18,r27,r10 */
+ .long 0x7e00310e /* stvebx v16,0,r6 */
+ .long 0x7e2d814e /* stvehx v17,r13,r16 */
+ .long 0x7ee0a14e /* stvehx v23,0,r20 */
+ .long 0x7d73f98e /* stvewx v11,r19,r31 */
+ .long 0x7fe0098e /* stvewx v31,0,r1 */
+ .long 0x7f558bce /* stvxl v26,r21,r17 */
+ .long 0x7da0b3ce /* stvxl v13,0,r22 */
+ .long 0x7d7ff9ce /* stvx v11,r31,r31 */
+ .long 0x7fc081ce /* stvx v30,0,r16 */
+ .long 0x1307e180 /* vaddcuw v24,v7,v28 */
+ .long 0x107e580a /* vaddfp v3,v30,v11 */
+ .long 0x111c4b00 /* vaddsbs v8,v28,v9 */
+ .long 0x10e52340 /* vaddshs v7,v5,v4 */
+ .long 0x12dadb80 /* vaddsws v22,v26,v27 */
+ .long 0x120ee000 /* vaddubm v16,v14,v28 */
+ .long 0x10c1ca00 /* vaddubs v6,v1,v25 */
+ .long 0x10443040 /* vadduhm v2,v4,v6 */
+ .long 0x13554240 /* vadduhs v26,v21,v8 */
+ .long 0x13bf0880 /* vadduwm v29,v31,v1 */
+ .long 0x12ed2280 /* vadduws v23,v13,v4 */
+ .long 0x13d04c44 /* vandc v30,v16,v9 */
+ .long 0x106ddc04 /* vand v3,v13,v27 */
+ .long 0x10868d02 /* vavgsb v4,v6,v17 */
+ .long 0x12fc9d42 /* vavgsh v23,v28,v19 */
+ .long 0x110ffd82 /* vavgsw v8,v15,v31 */
+ .long 0x10c7cc02 /* vavgub v6,v7,v25 */
+ .long 0x13365442 /* vavguh v25,v22,v10 */
+ .long 0x1077ec82 /* vavguw v3,v23,v29 */
+ .long 0x11c613ca /* vctsxs v14,v2,6 */
+ .long 0x1134fb8a /* vctuxs v9,v31,20 */
+ .long 0x1303f34a /* vcfsx v24,v30,3 */
+ .long 0x123dab0a /* vcfux v17,v21,29 */
+ .long 0x125c03c6 /* vcmpbfp v18,v28,v0 */
+ .long 0x127a1fc6 /* vcmpbfp. v19,v26,v3 */
+ .long 0x120258c6 /* vcmpeqfp v16,v2,v11 */
+ .long 0x12ed6cc6 /* vcmpeqfp. v23,v13,v13 */
+ .long 0x13335006 /* vcmpequb v25,v19,v10 */
+ .long 0x124b1406 /* vcmpequb. v18,v11,v2 */
+ .long 0x11393846 /* vcmpequh v9,v25,v7 */
+ .long 0x11d8ac46 /* vcmpequh. v14,v24,v21 */
+ .long 0x130c2886 /* vcmpequw v24,v12,v5 */
+ .long 0x12700c86 /* vcmpequw. v19,v16,v1 */
+ .long 0x12f181c6 /* vcmpgefp v23,v17,v16 */
+ .long 0x127d8dc6 /* vcmpgefp. v19,v29,v17 */
+ .long 0x121c6ac6 /* vcmpgtfp v16,v28,v13 */
+ .long 0x11d83ec6 /* vcmpgtfp. v14,v24,v7 */
+ .long 0x12163306 /* vcmpgtsb v16,v22,v6 */
+ .long 0x104c7706 /* vcmpgtsb. v2,v12,v14 */
+ .long 0x1383eb46 /* vcmpgtsh v28,v3,v29 */
+ .long 0x12136f46 /* vcmpgtsh. v16,v19,v13 */
+ .long 0x11e02b86 /* vcmpgtsw v15,v0,v5 */
+ .long 0x12ad0786 /* vcmpgtsw. v21,v13,v0 */
+ .long 0x10aaf206 /* vcmpgtub v5,v10,v30 */
+ .long 0x10ed5606 /* vcmpgtub. v7,v13,v10 */
+ .long 0x130f8246 /* vcmpgtuh v24,v15,v16 */
+ .long 0x1335de46 /* vcmpgtuh. v25,v21,v27 */
+ .long 0x123b3286 /* vcmpgtuw v17,v27,v6 */
+ .long 0x1115de86 /* vcmpgtuw. v8,v21,v27 */
+ .long 0x102e0b4a /* vcfsx v1,v1,14 */
+ .long 0x10997bca /* vctsxs v4,v15,25 */
+ .long 0x138ebb8a /* vctuxs v28,v23,14 */
+ .long 0x10c0330a /* vcfux v6,v6,0 */
+ .long 0x1000418a /* vexptefp v0,v8 */
+ .long 0x12c0d9ca /* vlogefp v22,v27 */
+ .long 0x12f2916e /* vmaddfp v23,v18,v5,v18 */
+ .long 0x11addc0a /* vmaxfp v13,v13,v27 */
+ .long 0x11177102 /* vmaxsb v8,v23,v14 */
+ .long 0x12710142 /* vmaxsh v19,v17,v0 */
+ .long 0x1263b182 /* vmaxsw v19,v3,v22 */
+ .long 0x12fee002 /* vmaxub v23,v30,v28 */
+ .long 0x1134b842 /* vmaxuh v9,v20,v23 */
+ .long 0x12b30882 /* vmaxuw v21,v19,v1 */
+ .long 0x12cd2da0 /* vmhaddshs v22,v13,v5,v22 */
+ .long 0x13e01ca1 /* vmhraddshs v31,v0,v3,v18 */
+ .long 0x1055c44a /* vminfp v2,v21,v24 */
+ .long 0x12865302 /* vminsb v20,v6,v10 */
+ .long 0x125bd342 /* vminsh v18,v27,v26 */
+ .long 0x10640b82 /* vminsw v3,v4,v1 */
+ .long 0x10e06a02 /* vminub v7,v0,v13 */
+ .long 0x100c3242 /* vminuh v0,v12,v6 */
+ .long 0x10c30a82 /* vminuw v6,v3,v1 */
+ .long 0x107d1ea2 /* vmladduhm v3,v29,v3,v26 */
+ .long 0x12a5f80c /* vmrghb v21,v5,v31 */
+ .long 0x12b8004c /* vmrghh v21,v24,v0 */
+ .long 0x1200b08c /* vmrghw v16,v0,v22 */
+ .long 0x1031810c /* vmrglb v1,v17,v16 */
+ .long 0x11c8794c /* vmrglh v14,v8,v15 */
+ .long 0x13f5298c /* vmrglw v31,v21,v5 */
+ .long 0x13094c84 /* vmr v24,v9 */
+ .long 0x13094c84 /* vmr v24,v9 */
+ .long 0x10187de5 /* vmsummbm v0,v24,v15,v23 */
+ .long 0x10243e68 /* vmsumshm v1,v4,v7,v25 */
+ .long 0x11286fe9 /* vmsumshs v9,v8,v13,v31 */
+ .long 0x12ff67a4 /* vmsumubm v23,v31,v12,v30 */
+ .long 0x13a0d566 /* vmsumuhm v29,v0,v26,v21 */
+ .long 0x136ec967 /* vmsumuhs v27,v14,v25,v5 */
+ .long 0x11597308 /* vmulesb v10,v25,v14 */
+ .long 0x10324348 /* vmulesh v1,v18,v8 */
+ .long 0x122e4a08 /* vmuleub v17,v14,v9 */
+ .long 0x10ba4a48 /* vmuleuh v5,v26,v9 */
+ .long 0x12b23108 /* vmulosb v21,v18,v6 */
+ .long 0x10854148 /* vmulosh v4,v5,v8 */
+ .long 0x10499808 /* vmuloub v2,v9,v19 */
+ .long 0x13a52048 /* vmulouh v29,v5,v4 */
+ .long 0x110229af /* vnmsubfp v8,v2,v6,v5 */
+ .long 0x13e95504 /* vnor v31,v9,v10 */
+ .long 0x133ffd04 /* vnot v25,v31 */
+ .long 0x133ffd04 /* vnot v25,v31 */
+ .long 0x12e71484 /* vor v23,v7,v2 */
+ .long 0x101cb66b /* vperm v0,v28,v22,v25 */
+ .long 0x12198b0e /* vpkpx v16,v25,v17 */
+ .long 0x1190898e /* vpkshss v12,v16,v17 */
+ .long 0x1033b90e /* vpkshus v1,v19,v23 */
+ .long 0x132769ce /* vpkswss v25,v7,v13 */
+ .long 0x1098514e /* vpkswus v4,v24,v10 */
+ .long 0x113b600e /* vpkuhum v9,v27,v12 */
+ .long 0x12cac88e /* vpkuhus v22,v10,v25 */
+ .long 0x13d2004e /* vpkuwum v30,v18,v0 */
+ .long 0x10e3b0ce /* vpkuwus v7,v3,v22 */
+ .long 0x1300e10a /* vrefp v24,v28 */
+ .long 0x12209aca /* vrfim v17,v19 */
+ .long 0x1300ca0a /* vrfin v24,v25 */
+ .long 0x10602a8a /* vrfip v3,v5 */
+ .long 0x1100524a /* vrfiz v8,v10 */
+ .long 0x1352f004 /* vrlb v26,v18,v30 */
+ .long 0x1211c844 /* vrlh v16,v17,v25 */
+ .long 0x12fe4884 /* vrlw v23,v30,v9 */
+ .long 0x1040914a /* vrsqrtefp v2,v18 */
+ .long 0x128e92aa /* vsel v20,v14,v18,v10 */
+ .long 0x13396104 /* vslb v25,v25,v12 */
+ .long 0x112961ec /* vsldoi v9,v9,v12,7 */
+ .long 0x11c25944 /* vslh v14,v2,v11 */
+ .long 0x13c5340c /* vslo v30,v5,v6 */
+ .long 0x12de49c4 /* vsl v22,v30,v9 */
+ .long 0x135a1984 /* vslw v26,v26,v3 */
+ .long 0x1026a20c /* vspltb v1,v20,6 */
+ .long 0x1203924c /* vsplth v16,v18,3 */
+ .long 0x1333030c /* vspltisb v25,-13 */
+ .long 0x12ca034c /* vspltish v22,10 */
+ .long 0x11ad038c /* vspltisw v13,13 */
+ .long 0x1122928c /* vspltw v9,v18,2 */
+ .long 0x11d60304 /* vsrab v14,v22,v0 */
+ .long 0x118c9344 /* vsrah v12,v12,v18 */
+ .long 0x10426b84 /* vsraw v2,v2,v13 */
+ .long 0x10fb2a04 /* vsrb v7,v27,v5 */
+ .long 0x10ebea44 /* vsrh v7,v11,v29 */
+ .long 0x125efc4c /* vsro v18,v30,v31 */
+ .long 0x1049e2c4 /* vsr v2,v9,v28 */
+ .long 0x10190284 /* vsrw v0,v25,v0 */
+ .long 0x13025580 /* vsubcuw v24,v2,v10 */
+ .long 0x12d8a04a /* vsubfp v22,v24,v20 */
+ .long 0x11566f00 /* vsubsbs v10,v22,v13 */
+ .long 0x1311e740 /* vsubshs v24,v17,v28 */
+ .long 0x115a0780 /* vsubsws v10,v26,v0 */
+ .long 0x120bc400 /* vsububm v16,v11,v24 */
+ .long 0x11750e00 /* vsububs v11,v21,v1 */
+ .long 0x10ccc440 /* vsubuhm v6,v12,v24 */
+ .long 0x13cb4e40 /* vsubuhs v30,v11,v9 */
+ .long 0x12746c80 /* vsubuwm v19,v20,v13 */
+ .long 0x12593680 /* vsubuws v18,v25,v6 */
+ .long 0x132a9688 /* vsum2sws v25,v10,v18 */
+ .long 0x11b0af08 /* vsum4sbs v13,v16,v21 */
+ .long 0x12e82648 /* vsum4shs v23,v8,v4 */
+ .long 0x138df608 /* vsum4ubs v28,v13,v30 */
+ .long 0x12ca4788 /* vsumsws v22,v10,v8 */
+ .long 0x1300734e /* vupkhpx v24,v14 */
+ .long 0x1040b20e /* vupkhsb v2,v22 */
+ .long 0x1200124e /* vupkhsh v16,v2 */
+ .long 0x1140d3ce /* vupklpx v10,v26 */
+ .long 0x11e0e28e /* vupklsb v15,v28 */
+ .long 0x110042ce /* vupklsh v8,v8 */
+ .long 0x13201cc4 /* vxor v25,v0,v3 */
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec2.exp b/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
new file mode 100644
index 0000000..70f4ccb
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
@@ -0,0 +1,178 @@
+# Copyright 2014-2017 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.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC instructions disassembly."
+ return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC instructions disassembly"
+ return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options altivec"
+set test "disass func"
+gdb_test_multiple $test $test {
+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+ set func $expect_out(1,string)
+ pass $test
+ }
+}
+
+proc instr_to_patt {instr} {
+ global decimal hex
+ # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
+ return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+ global func
+
+ set test "found: $instr"
+ if [regexp -nocase -line [instr_to_patt $instr] $func] {
+ pass $test
+ } else {
+ fail $test
+ }
+}
+
+func_check "lvepxl v3,0,r28"
+func_check "lvepxl v19,r4,r18"
+func_check "lvepx v27,0,r19"
+func_check "lvepx v1,r25,r18"
+func_check "lvexbx v31,0,r27"
+func_check "lvexbx v28,r1,r12"
+func_check "lvexhx v31,0,r14"
+func_check "lvexhx v17,r16,r31"
+func_check "lvexwx v22,0,r29"
+func_check "lvexwx v23,r25,r5"
+func_check "lvsm v3,0,r12"
+func_check "lvsm v27,r29,r1"
+func_check "lvswxl v7,0,r6"
+func_check "lvswxl v7,r16,r8"
+func_check "lvswx v14,0,r18"
+func_check "lvswx v28,r28,r16"
+func_check "lvtlxl v27,0,r12"
+func_check "lvtlxl v27,r28,r0"
+func_check "lvtlx v23,0,r25"
+func_check "lvtlx v1,r25,r14"
+func_check "lvtrxl v20,0,r24"
+func_check "lvtrxl v22,r29,r24"
+func_check "lvtrx v24,0,r8"
+func_check "lvtrx v13,r23,r28"
+func_check "mvidsplt v12,r28,r12"
+func_check "mviwsplt v10,r27,r0"
+func_check "stvepxl v27,0,r13"
+func_check "stvepxl v2,r2,r31"
+func_check "stvepx v3,0,r10"
+func_check "stvepx v27,r28,r0"
+func_check "stvexbx v13,0,r6"
+func_check "stvexbx v13,r25,r3"
+func_check "stvexhx v22,0,r1"
+func_check "stvexhx v17,r14,r10"
+func_check "stvexwx v21,0,r27"
+func_check "stvexwx v31,r18,r1"
+func_check "stvflxl v26,0,r13"
+func_check "stvflxl v22,r13,r21"
+func_check "stvflx v5,0,r9"
+func_check "stvflx v21,r24,r1"
+func_check "stvfrxl v13,0,r10"
+func_check "stvfrxl v13,r17,r25"
+func_check "stvfrx v17,0,r10"
+func_check "stvfrx v8,r12,r31"
+func_check "stvswxl v18,0,r29"
+func_check "stvswxl v26,r14,r8"
+func_check "stvswx v0,0,r15"
+func_check "stvswx v13,r23,r7"
+func_check "vabsdub v6,v17,v16"
+func_check "vabsduh v21,v18,v4"
+func_check "vabsduw v25,v20,v9"
+func_check "vpermxor v6,v17,v20,v26"
+func_check "vaddeuqm v29,v26,v15,v28"
+func_check "vaddecuq v15,v8,v7,v24"
+func_check "vsubeuqm v2,v6,v21,v1"
+func_check "vsubecuq v29,v6,v0,v4"
+func_check "vmulouw v14,v9,v3"
+func_check "vmuluwm v24,v16,v18"
+func_check "vaddudm v10,v17,v17"
+func_check "vmaxud v30,v25,v4"
+func_check "vrld v10,v6,v28"
+func_check "vcmpequd v27,v7,v7"
+func_check "vadduqm v22,v16,v25"
+func_check "vaddcuq v1,v21,v29"
+func_check "vmulosw v20,v11,v19"
+func_check "vmaxsd v24,v19,v1"
+func_check "vmuleuw v13,v27,v30"
+func_check "vminud v9,v24,v17"
+func_check "vcmpgtud v10,v18,v28"
+func_check "vmulesw v0,v29,v22"
+func_check "vminsd v13,v28,v1"
+func_check "vsrad v10,v20,v5"
+func_check "vcmpgtsd v27,v21,v5"
+func_check "bcdadd. v0,v23,v30,1"
+func_check "vpmsumb v25,v24,v26"
+func_check "bcdsub. v8,v4,v4,1"
+func_check "vpmsumh v16,v14,v26"
+func_check "vpkudum v27,v2,v26"
+func_check "vpmsumw v6,v23,v17"
+func_check "vpmsumd v20,v6,v25"
+func_check "vpkudus v27,v22,v16"
+func_check "vsubudm v21,v20,v18"
+func_check "vsubuqm v21,v20,v18"
+func_check "vcipher v29,v29,v6"
+func_check "vcipherlast v2,v13,v20"
+func_check "vgbbd v20,v18"
+func_check "vsubcuq v19,v8,v25"
+func_check "vorc v9,v26,v29"
+func_check "vncipher v20,v20,v13"
+func_check "vncipherlast v15,v5,v27"
+func_check "vbpermq v3,v19,v6"
+func_check "vpksdus v30,v4,v28"
+func_check "vnand v0,v4,v14"
+func_check "vsld v17,v8,v29"
+func_check "vsbox v29,v20"
+func_check "vpksdss v11,v7,v11"
+func_check "vcmpequd. v3,v19,v16"
+func_check "vupkhsw v18,v17"
+func_check "vshasigmaw v29,v8,0,13"
+func_check "veqv v23,v28,v26"
+func_check "vmrgew v29,v0,v2"
+func_check "vmrgow v29,v0,v2"
+func_check "vshasigmad v27,v19,0,0"
+func_check "vsrd v20,v28,v28"
+func_check "vupklsw v18,v21"
+func_check "vclzb v30,v7"
+func_check "vpopcntb v29,v21"
+func_check "vclzh v25,v21"
+func_check "vpopcnth v16,v30"
+func_check "vclzw v28,v3"
+func_check "vpopcntw v10,v9"
+func_check "vclzd v22,v9"
+func_check "vpopcntd v15,v30"
+func_check "vcmpgtud. v2,v31,v6"
+func_check "vcmpgtsd. v20,v15,v2"
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec2.s b/gdb/testsuite/gdb.arch/powerpc-altivec2.s
new file mode 100644
index 0000000..6148fb9
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec2.s
@@ -0,0 +1,135 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2014-2017 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/>. */
+
+ .text
+ .globl func
+func:
+ .long 0x7c60e20e /* lvepxl v3,0,r28 */
+ .long 0x7e64920e /* lvepxl v19,r4,r18 */
+ .long 0x7f609a4e /* lvepx v27,0,r19 */
+ .long 0x7c39924e /* lvepx v1,r25,r18 */
+ .long 0x7fe0da0a /* lvexbx v31,0,r27 */
+ .long 0x7f81620a /* lvexbx v28,r1,r12 */
+ .long 0x7fe0724a /* lvexhx v31,0,r14 */
+ .long 0x7e30fa4a /* lvexhx v17,r16,r31 */
+ .long 0x7ec0ea8a /* lvexwx v22,0,r29 */
+ .long 0x7ef92a8a /* lvexwx v23,r25,r5 */
+ .long 0x7c60660a /* lvsm v3,0,r12 */
+ .long 0x7f7d0e0a /* lvsm v27,r29,r1 */
+ .long 0x7ce036ca /* lvswxl v7,0,r6 */
+ .long 0x7cf046ca /* lvswxl v7,r16,r8 */
+ .long 0x7dc094ca /* lvswx v14,0,r18 */
+ .long 0x7f9c84ca /* lvswx v28,r28,r16 */
+ .long 0x7f60668a /* lvtlxl v27,0,r12 */
+ .long 0x7f7c068a /* lvtlxl v27,r28,r0 */
+ .long 0x7ee0cc8a /* lvtlx v23,0,r25 */
+ .long 0x7c39748a /* lvtlx v1,r25,r14 */
+ .long 0x7e80c64a /* lvtrxl v20,0,r24 */
+ .long 0x7eddc64a /* lvtrxl v22,r29,r24 */
+ .long 0x7f00444a /* lvtrx v24,0,r8 */
+ .long 0x7db7e44a /* lvtrx v13,r23,r28 */
+ .long 0x7d9c60dc /* mvidsplt v12,r28,r12 */
+ .long 0x7d5b005c /* mviwsplt v10,r27,r0 */
+ .long 0x7f606e0e /* stvepxl v27,0,r13 */
+ .long 0x7c42fe0e /* stvepxl v2,r2,r31 */
+ .long 0x7c60564e /* stvepx v3,0,r10 */
+ .long 0x7f7c064e /* stvepx v27,r28,r0 */
+ .long 0x7da0330a /* stvexbx v13,0,r6 */
+ .long 0x7db91b0a /* stvexbx v13,r25,r3 */
+ .long 0x7ec00b4a /* stvexhx v22,0,r1 */
+ .long 0x7e2e534a /* stvexhx v17,r14,r10 */
+ .long 0x7ea0db8a /* stvexwx v21,0,r27 */
+ .long 0x7ff20b8a /* stvexwx v31,r18,r1 */
+ .long 0x7f406f8a /* stvflxl v26,0,r13 */
+ .long 0x7ecdaf8a /* stvflxl v22,r13,r21 */
+ .long 0x7ca04d8a /* stvflx v5,0,r9 */
+ .long 0x7eb80d8a /* stvflx v21,r24,r1 */
+ .long 0x7da0574a /* stvfrxl v13,0,r10 */
+ .long 0x7db1cf4a /* stvfrxl v13,r17,r25 */
+ .long 0x7e20554a /* stvfrx v17,0,r10 */
+ .long 0x7d0cfd4a /* stvfrx v8,r12,r31 */
+ .long 0x7e40efca /* stvswxl v18,0,r29 */
+ .long 0x7f4e47ca /* stvswxl v26,r14,r8 */
+ .long 0x7c007dca /* stvswx v0,0,r15 */
+ .long 0x7db73dca /* stvswx v13,r23,r7 */
+ .long 0x10d18403 /* vabsdub v6,v17,v16 */
+ .long 0x12b22443 /* vabsduh v21,v18,v4 */
+ .long 0x13344c83 /* vabsduw v25,v20,v9 */
+ .long 0x10d1a6ad /* vpermxor v6,v17,v20,v26 */
+ .long 0x13ba7f3c /* vaddeuqm v29,v26,v15,v28 */
+ .long 0x11e83e3d /* vaddecuq v15,v8,v7,v24 */
+ .long 0x1046a87e /* vsubeuqm v2,v6,v21,v1 */
+ .long 0x13a6013f /* vsubecuq v29,v6,v0,v4 */
+ .long 0x11c91888 /* vmulouw v14,v9,v3 */
+ .long 0x13109089 /* vmuluwm v24,v16,v18 */
+ .long 0x115188c0 /* vaddudm v10,v17,v17 */
+ .long 0x13d920c2 /* vmaxud v30,v25,v4 */
+ .long 0x1146e0c4 /* vrld v10,v6,v28 */
+ .long 0x136738c7 /* vcmpequd v27,v7,v7 */
+ .long 0x12d0c900 /* vadduqm v22,v16,v25 */
+ .long 0x1035e940 /* vaddcuq v1,v21,v29 */
+ .long 0x128b9988 /* vmulosw v20,v11,v19 */
+ .long 0x131309c2 /* vmaxsd v24,v19,v1 */
+ .long 0x11bbf288 /* vmuleuw v13,v27,v30 */
+ .long 0x11388ac2 /* vminud v9,v24,v17 */
+ .long 0x1152e2c7 /* vcmpgtud v10,v18,v28 */
+ .long 0x101db388 /* vmulesw v0,v29,v22 */
+ .long 0x11bc0bc2 /* vminsd v13,v28,v1 */
+ .long 0x11542bc4 /* vsrad v10,v20,v5 */
+ .long 0x13752bc7 /* vcmpgtsd v27,v21,v5 */
+ .long 0x1017f601 /* bcdadd. v0,v23,v30,1 */
+ .long 0x1338d408 /* vpmsumb v25,v24,v26 */
+ .long 0x11042641 /* bcdsub. v8,v4,v4,1 */
+ .long 0x120ed448 /* vpmsumh v16,v14,v26 */
+ .long 0x1362d44e /* vpkudum v27,v2,v26 */
+ .long 0x10d78c88 /* vpmsumw v6,v23,v17 */
+ .long 0x1286ccc8 /* vpmsumd v20,v6,v25 */
+ .long 0x137684ce /* vpkudus v27,v22,v16 */
+ .long 0x12b494c0 /* vsubudm v21,v20,v18 */
+ .long 0x12b49500 /* vsubuqm v21,v20,v18 */
+ .long 0x13bd3508 /* vcipher v29,v29,v6 */
+ .long 0x104da509 /* vcipherlast v2,v13,v20 */
+ .long 0x1280950c /* vgbbd v20,v18 */
+ .long 0x1268cd40 /* vsubcuq v19,v8,v25 */
+ .long 0x113aed44 /* vorc v9,v26,v29 */
+ .long 0x12946d48 /* vncipher v20,v20,v13 */
+ .long 0x11e5dd49 /* vncipherlast v15,v5,v27 */
+ .long 0x1073354c /* vbpermq v3,v19,v6 */
+ .long 0x13c4e54e /* vpksdus v30,v4,v28 */
+ .long 0x10047584 /* vnand v0,v4,v14 */
+ .long 0x1228edc4 /* vsld v17,v8,v29 */
+ .long 0x13b405c8 /* vsbox v29,v20 */
+ .long 0x11675dce /* vpksdss v11,v7,v11 */
+ .long 0x107384c7 /* vcmpequd. v3,v19,v16 */
+ .long 0x12408e4e /* vupkhsw v18,v17 */
+ .long 0x13a86e82 /* vshasigmaw v29,v8,0,13 */
+ .long 0x12fcd684 /* veqv v23,v28,v26 */
+ .long 0x13a0178c /* vmrgew v29,v0,v2 */
+ .long 0x13a0168c /* vmrgow v29,v0,v2 */
+ .long 0x137306c2 /* vshasigmad v27,v19,0,0 */
+ .long 0x129ce6c4 /* vsrd v20,v28,v28 */
+ .long 0x1240aece /* vupklsw v18,v21 */
+ .long 0x13c03f02 /* vclzb v30,v7 */
+ .long 0x13a0af03 /* vpopcntb v29,v21 */
+ .long 0x1320af42 /* vclzh v25,v21 */
+ .long 0x1200f743 /* vpopcnth v16,v30 */
+ .long 0x13801f82 /* vclzw v28,v3 */
+ .long 0x11404f83 /* vpopcntw v10,v9 */
+ .long 0x12c04fc2 /* vclzd v22,v9 */
+ .long 0x11e0f7c3 /* vpopcntd v15,v30 */
+ .long 0x105f36c7 /* vcmpgtud. v2,v31,v6 */
+ .long 0x128f17c7 /* vcmpgtsd. v20,v15,v2 */
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec3.exp b/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
new file mode 100644
index 0000000..b928e1b
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
@@ -0,0 +1,131 @@
+# Copyright 2014-2017 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.
+
+# Test PowerPC instructions disassembly.
+
+standard_testfile .s
+set objfile [standard_output_file ${testfile}.o]
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC instructions disassembly."
+ return
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC instructions disassembly"
+ return -1
+}
+
+clean_restart ${objfile}
+
+# Disassemble the function.
+set func ""
+
+gdb_test "set disassembler-options altivec"
+set test "disass func"
+gdb_test_multiple $test $test {
+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+ set func $expect_out(1,string)
+ pass $test
+ }
+}
+
+proc instr_to_patt {instr} {
+ global decimal hex
+ # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
+ return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
+}
+
+proc func_check {instr} {
+ global func
+
+ set test "found: $instr"
+ if [regexp -nocase -line [instr_to_patt $instr] $func] {
+ pass $test
+ } else {
+ fail $test
+ }
+}
+
+func_check "vmul10cuq v11,v30"
+func_check "vcmpneb v30,v1,v23"
+func_check "vpermr v30,v19,v30,v29"
+func_check "vmul10ecuq v20,v20,v17"
+func_check "vcmpneh v27,v19,v31"
+func_check "vrlwmi v6,v9,v23"
+func_check "vcmpnew v22,v26,v1"
+func_check "vrldmi v24,v30,v25"
+func_check "vcmpnezb v19,v29,v22"
+func_check "vcmpnezh v8,v23,v19"
+func_check "vrlwnm v27,v24,v11"
+func_check "vcmpnezw v21,v13,v10"
+func_check "vrldnm v5,v20,v29"
+func_check "vmul10uq v30,v19"
+func_check "vextractub v24,v21,12"
+func_check "vmul10euq v0,v19,v28"
+func_check "vextractuh v10,v3,12"
+func_check "vextractuw v28,v12,7"
+func_check "vextractd v30,v27,1"
+func_check "vinsertb v25,v31,4"
+func_check "bcdcpsgn. v21,v14,v30"
+func_check "vinserth v22,v18,5"
+func_check "vinsertw v29,v22,1"
+func_check "vinsertd v29,v13,7"
+func_check "vcmpneb. v22,v25,v8"
+func_check "vcmpneh. v16,v15,v21"
+func_check "bcdus. v22,v21,v31"
+func_check "vcmpnew. v1,v12,v12"
+func_check "bcds. v5,v3,v8,1"
+func_check "bcdtrunc. v27,v22,v1,0"
+func_check "vcmpnezb. v2,v26,v0"
+func_check "bcdutrunc. v26,v14,v7"
+func_check "vcmpnezh. v16,v5,v12"
+func_check "bcdctsq. v24,v5"
+func_check "bcdcfsq. v7,v0,0"
+func_check "bcdctz. v30,v12,1"
+func_check "bcdctn. v17,v23"
+func_check "bcdcfz. v4,v15,1"
+func_check "bcdcfn. v29,v5,1"
+func_check "bcdsetsgn. v27,v12,0"
+func_check "vcmpnezw. v14,v28,v25"
+func_check "bcdsr. v2,v2,v6,1"
+func_check "vbpermd v25,v0,v5"
+func_check "vclzlsbb r28,v25"
+func_check "vctzlsbb r2,v24"
+func_check "vnegw v21,v11"
+func_check "vnegd v17,v27"
+func_check "vprtybw v31,v23"
+func_check "vprtybd v21,v23"
+func_check "vprtybq v21,v18"
+func_check "vextsb2w v30,v4"
+func_check "vextsh2w v3,v26"
+func_check "vextsb2d v11,v17"
+func_check "vextsh2d v5,v10"
+func_check "vextsw2d v13,v25"
+func_check "vctzb v25,v2"
+func_check "vctzh v0,v3"
+func_check "vctzw v22,v6"
+func_check "vctzd v26,v24"
+func_check "vextublx r6,r31,v2"
+func_check "vextuhlx r13,r0,v18"
+func_check "vextuwlx r14,r30,v31"
+func_check "vsrv v15,v12,v14"
+func_check "vextubrx r20,r10,v30"
+func_check "vslv v21,v21,v2"
+func_check "vextuhrx r15,r9,v1"
+func_check "vextuwrx r21,r17,v16"
+func_check "vmsumudm v20,v21,v22,v23"
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec3.s b/gdb/testsuite/gdb.arch/powerpc-altivec3.s
new file mode 100644
index 0000000..9e33325
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec3.s
@@ -0,0 +1,88 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2014-2017 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/>. */
+
+ .text
+ .globl func
+func:
+ .long 0x117e0001 /* vmul10cuq v11,v30 */
+ .long 0x13c1b807 /* vcmpneb v30,v1,v23 */
+ .long 0x13d3f77b /* vpermr v30,v19,v30,v29 */
+ .long 0x12948841 /* vmul10ecuq v20,v20,v17 */
+ .long 0x1373f847 /* vcmpneh v27,v19,v31 */
+ .long 0x10c9b885 /* vrlwmi v6,v9,v23 */
+ .long 0x12da0887 /* vcmpnew v22,v26,v1 */
+ .long 0x131ec8c5 /* vrldmi v24,v30,v25 */
+ .long 0x127db107 /* vcmpnezb v19,v29,v22 */
+ .long 0x11179947 /* vcmpnezh v8,v23,v19 */
+ .long 0x13785985 /* vrlwnm v27,v24,v11 */
+ .long 0x12ad5187 /* vcmpnezw v21,v13,v10 */
+ .long 0x10b4e9c5 /* vrldnm v5,v20,v29 */
+ .long 0x13d30201 /* vmul10uq v30,v19 */
+ .long 0x130caa0d /* vextractub v24,v21,12 */
+ .long 0x1013e241 /* vmul10euq v0,v19,v28 */
+ .long 0x114c1a4d /* vextractuh v10,v3,12 */
+ .long 0x1387628d /* vextractuw v28,v12,7 */
+ .long 0x13c1dacd /* vextractd v30,v27,1 */
+ .long 0x1324fb0d /* vinsertb v25,v31,4 */
+ .long 0x12aef341 /* bcdcpsgn. v21,v14,v30 */
+ .long 0x12c5934d /* vinserth v22,v18,5 */
+ .long 0x13a1b38d /* vinsertw v29,v22,1 */
+ .long 0x13a76bcd /* vinsertd v29,v13,7 */
+ .long 0x12d94407 /* vcmpneb. v22,v25,v8 */
+ .long 0x120fac47 /* vcmpneh. v16,v15,v21 */
+ .long 0x12d5fc81 /* bcdus. v22,v21,v31 */
+ .long 0x102c6487 /* vcmpnew. v1,v12,v12 */
+ .long 0x10a346c1 /* bcds. v5,v3,v8,1 */
+ .long 0x13760d01 /* bcdtrunc. v27,v22,v1,0 */
+ .long 0x105a0507 /* vcmpnezb. v2,v26,v0 */
+ .long 0x134e3d41 /* bcdutrunc. v26,v14,v7 */
+ .long 0x12056547 /* vcmpnezh. v16,v5,v12 */
+ .long 0x13002d81 /* bcdctsq. v24,v5 */
+ .long 0x10e20581 /* bcdcfsq. v7,v0,0 */
+ .long 0x13c46781 /* bcdctz. v30,v12,1 */
+ .long 0x1225bd81 /* bcdctn. v17,v23 */
+ .long 0x10867f81 /* bcdcfz. v4,v15,1 */
+ .long 0x13a72f81 /* bcdcfn. v29,v5,1 */
+ .long 0x137f6581 /* bcdsetsgn. v27,v12,0 */
+ .long 0x11dccd87 /* vcmpnezw. v14,v28,v25 */
+ .long 0x104237c1 /* bcdsr. v2,v2,v6,1 */
+ .long 0x13202dcc /* vbpermd v25,v0,v5 */
+ .long 0x1380ce02 /* vclzlsbb r28,v25 */
+ .long 0x1041c602 /* vctzlsbb r2,v24 */
+ .long 0x12a65e02 /* vnegw v21,v11 */
+ .long 0x1227de02 /* vnegd v17,v27 */
+ .long 0x13e8be02 /* vprtybw v31,v23 */
+ .long 0x12a9be02 /* vprtybd v21,v23 */
+ .long 0x12aa9602 /* vprtybq v21,v18 */
+ .long 0x13d02602 /* vextsb2w v30,v4 */
+ .long 0x1071d602 /* vextsh2w v3,v26 */
+ .long 0x11788e02 /* vextsb2d v11,v17 */
+ .long 0x10b95602 /* vextsh2d v5,v10 */
+ .long 0x11bace02 /* vextsw2d v13,v25 */
+ .long 0x133c1602 /* vctzb v25,v2 */
+ .long 0x101d1e02 /* vctzh v0,v3 */
+ .long 0x12de3602 /* vctzw v22,v6 */
+ .long 0x135fc602 /* vctzd v26,v24 */
+ .long 0x10df160d /* vextublx r6,r31,v2 */
+ .long 0x11a0964d /* vextuhlx r13,r0,v18 */
+ .long 0x11defe8d /* vextuwlx r14,r30,v31 */
+ .long 0x11ec7704 /* vsrv v15,v12,v14 */
+ .long 0x128af70d /* vextubrx r20,r10,v30 */
+ .long 0x12b51744 /* vslv v21,v21,v2 */
+ .long 0x11e90f4d /* vextuhrx r15,r9,v1 */
+ .long 0x12b1878d /* vextuwrx r21,r17,v16 */
+ .long 0x1295b5e3 /* vmsumudm v20,v21,v22,v23 */
diff --git a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
new file mode 100644
index 0000000..80a937d
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp
@@ -0,0 +1,56 @@
+# Copyright 2014-2017 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.
+
+# This test exercises set/show disassembler-options results are preserved
+# across multiple set architecture calls.
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC disassembler options."
+ return
+}
+
+gdb_exit
+gdb_start
+
+set option "power9"
+set arch1 "rs6000:6000"
+set arch2 "powerpc:common64"
+
+gdb_test "set architecture $arch1" \
+ "The target architecture is assumed to be $arch1" \
+ "set architecture $arch1"
+
+gdb_test_no_output "set disassembler-options"
+gdb_test "show disassembler-options" \
+ "The current disassembler options are ''.*" \
+ "show NULL disassembler-options"
+
+gdb_test_no_output "set disassembler-options $option"
+gdb_test "show disassembler-options" \
+ "The current disassembler options are '$option'.*" \
+ "show disassembler-options $option"
+
+# Change architectures and verify the disassembler options have been preserved.
+
+gdb_test "set architecture $arch2" \
+ "The target architecture is assumed to be $arch2" \
+ "set architecture $arch2"
+
+gdb_test "show disassembler-options" \
+ "The current disassembler options are '$option'.*" \
+ "show disassembler-options $option"
+
diff --git a/gdb/testsuite/gdb.arch/powerpc-power.exp b/gdb/testsuite/gdb.arch/powerpc-power.exp
deleted file mode 100644
index c1c56c5..0000000
--- a/gdb/testsuite/gdb.arch/powerpc-power.exp
+++ /dev/null
@@ -1,1429 +0,0 @@
-# Copyright 2014-2017 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 2 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Test PowerPC instructions disassembly.
-
-standard_testfile .s
-set objfile [standard_output_file ${testfile}.o]
-
-if {![istarget "powerpc*-*-*"]} then {
- verbose "Skipping PowerPC instructions disassembly."
- return
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
- untested "PowerPC instructions disassembly"
- return -1
-}
-
-clean_restart ${objfile}
-
-# Disassemble the function.
-
-set test "disass func"
-gdb_test_multiple $test $test {
- -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
- set func $expect_out(1,string)
- pass $test
- }
-}
-
-proc instr_to_patt {offset instr} {
- # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
- return ".*\r\n\[ \t\]*0x\[0-9a-f\]+ <\\$offset>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
-}
-
-proc func_check {offset instr} {
- global func
-
- set test "found $offset: $instr"
- if [regexp -nocase -line [instr_to_patt $offset $instr] $func] {
- pass $test
- } else {
- fail $test
- }
-}
-
-
-## power7.d
-func_check +0 "lxvd2x vs3,r4,r5"
-func_check +4 "lxvd2x vs43,r4,r5"
-func_check +8 "stxvd2x vs3,r4,r5"
-func_check +12 "stxvd2x vs43,r4,r5"
-func_check +16 "xxmrghd vs3,vs4,vs5"
-func_check +20 "xxmrghd vs43,vs44,vs45"
-func_check +24 "xxmrgld vs3,vs4,vs5"
-func_check +28 "xxmrgld vs43,vs44,vs45"
-func_check +32 "xxmrghd vs3,vs4,vs5"
-func_check +36 "xxmrghd vs43,vs44,vs45"
-func_check +40 "xxmrgld vs3,vs4,vs5"
-func_check +44 "xxmrgld vs43,vs44,vs45"
-func_check +48 "xxpermdi vs3,vs4,vs5,1"
-func_check +52 "xxpermdi vs43,vs44,vs45,1"
-func_check +56 "xxpermdi vs3,vs4,vs5,2"
-func_check +60 "xxpermdi vs43,vs44,vs45,2"
-func_check +64 "xvmovdp vs3,vs4"
-func_check +68 "xvmovdp vs43,vs44"
-func_check +72 "xvmovdp vs3,vs4"
-func_check +76 "xvmovdp vs43,vs44"
-func_check +80 "xvcpsgndp vs3,vs4,vs5"
-func_check +84 "xvcpsgndp vs43,vs44,vs45"
-func_check +88 "doze"
-func_check +92 "nap"
-func_check +96 "sleep"
-func_check +100 "rvwinkle"
-func_check +104 "prtyw r3,r4"
-func_check +108 "prtyd r13,r14"
-func_check +112 "mfcfar r10"
-func_check +116 "mtcfar r11"
-func_check +120 "cmpb r3,r4,r5"
-func_check +124 "lwzcix r10,r11,r12"
-func_check +128 "dadd f16,f17,f18"
-func_check +132 "daddq f20,f22,f24"
-func_check +136 "dss 3"
-func_check +140 "dssall"
-func_check +144 "dst r5,r4,1"
-func_check +148 "dstt r8,r7,0"
-func_check +152 "dstst r5,r6,3"
-func_check +156 "dststt r4,r5,2"
-func_check +160 "divwe r10,r11,r12"
-func_check +164 "divwe\. r11,r12,r13"
-func_check +168 "divweo r12,r13,r14"
-func_check +172 "divweo\. r13,r14,r15"
-func_check +176 "divweu r10,r11,r12"
-func_check +180 "divweu\. r11,r12,r13"
-func_check +184 "divweuo r12,r13,r14"
-func_check +188 "divweuo\. r13,r14,r15"
-func_check +192 "bpermd r7,r17,r27"
-func_check +196 "popcntw r10,r20"
-func_check +200 "popcntd r10,r20"
-func_check +204 "ldbrx r20,r21,r22"
-func_check +208 "stdbrx r20,r21,r22"
-func_check +212 "lfiwzx f10,0,r10"
-func_check +216 "lfiwzx f10,r9,r10"
-func_check +220 "fcfids f4,f5"
-func_check +224 "fcfids\. f4,f5"
-func_check +228 "fcfidus f4,f5"
-func_check +232 "fcfidus\. f4,f5"
-func_check +236 "fctiwu f4,f5"
-func_check +240 "fctiwu\. f4,f5"
-func_check +244 "fctiwuz f4,f5"
-func_check +248 "fctiwuz\. f4,f5"
-func_check +252 "fctidu f4,f5"
-func_check +256 "fctidu\. f4,f5"
-func_check +260 "fctiduz f4,f5"
-func_check +264 "fctiduz\. f4,f5"
-func_check +268 "fcfidu f4,f5"
-func_check +272 "fcfidu\. f4,f5"
-func_check +276 "ftdiv cr0,f10,f11"
-func_check +280 "ftdiv cr7,f10,f11"
-func_check +284 "ftsqrt cr0,f10"
-func_check +288 "ftsqrt cr7,f10"
-func_check +292 "dcbtt r8,r9"
-func_check +296 "dcbtstt r8,r9"
-func_check +300 "dcffix f10,f12"
-func_check +304 "dcffix\. f20,f22"
-func_check +308 "fre f14,f15"
-func_check +312 "fre\. f14,f15"
-func_check +316 "fres f14,f15"
-func_check +320 "fres\. f14,f15"
-func_check +324 "frsqrte f14,f15"
-func_check +328 "frsqrte\. f14,f15"
-func_check +332 "frsqrtes f14,f15"
-func_check +336 "frsqrtes\. f14,f15"
-func_check +340 "isel r2,r3,r4,28"
-func_check +344 "yield"
-func_check +348 "yield"
-func_check +352 "ori r2,r2,0"
-func_check +356 "nop"
-func_check +360 "nop"
-func_check +364 "ori r2,r2,0"
-func_check +368 "mdoio"
-func_check +372 "mdoio"
-func_check +376 "mdoom"
-func_check +380 "mdoom"
-func_check +384 "mfppr r10"
-func_check +388 "mfppr32 r11"
-func_check +392 "mtppr r12"
-func_check +396 "mtppr32 r13"
-func_check +400 "tlbie r10,r11"
-
-## altivec.d
-func_check +404 "dss 3"
-func_check +408 "dssall"
-func_check +412 "dst r5,r4,1"
-func_check +416 "dstt r8,r7,0"
-func_check +420 "dstst r5,r6,3"
-func_check +424 "dststt r4,r5,2"
-func_check +428 "lvebx v30,r22,r24"
-func_check +432 "lvebx v21,0,r24"
-func_check +436 "lvehx v10,r16,r2"
-func_check +440 "lvehx v20,0,r23"
-func_check +444 "lvewx v17,r4,r18"
-func_check +448 "lvewx v23,0,r8"
-func_check +452 "lvsl v6,0,r25"
-func_check +456 "lvsl v2,0,r6"
-func_check +460 "lvsr v22,r16,r12"
-func_check +464 "lvsr v0,0,r29"
-func_check +468 "lvxl v15,r5,r13"
-func_check +472 "lvxl v19,0,r23"
-func_check +476 "lvx v22,r1,r2"
-func_check +480 "lvx v18,0,r17"
-func_check +484 "mfvrsave r31"
-func_check +488 "mfvscr v24"
-func_check +492 "mtvrsave r10"
-func_check +496 "mtvscr v25"
-func_check +500 "stvebx v18,r27,r10"
-func_check +504 "stvebx v16,0,r6"
-func_check +508 "stvehx v17,r13,r16"
-func_check +512 "stvehx v23,0,r20"
-func_check +516 "stvewx v11,r19,r31"
-func_check +520 "stvewx v31,0,r1"
-func_check +524 "stvxl v26,r21,r17"
-func_check +528 "stvxl v13,0,r22"
-func_check +532 "stvx v11,r31,r31"
-func_check +536 "stvx v30,0,r16"
-func_check +540 "vaddcuw v24,v7,v28"
-func_check +544 "vaddfp v3,v30,v11"
-func_check +548 "vaddsbs v8,v28,v9"
-func_check +552 "vaddshs v7,v5,v4"
-func_check +556 "vaddsws v22,v26,v27"
-func_check +560 "vaddubm v16,v14,v28"
-func_check +564 "vaddubs v6,v1,v25"
-func_check +568 "vadduhm v2,v4,v6"
-func_check +572 "vadduhs v26,v21,v8"
-func_check +576 "vadduwm v29,v31,v1"
-func_check +580 "vadduws v23,v13,v4"
-func_check +584 "vandc v30,v16,v9"
-func_check +588 "vand v3,v13,v27"
-func_check +592 "vavgsb v4,v6,v17"
-func_check +596 "vavgsh v23,v28,v19"
-func_check +600 "vavgsw v8,v15,v31"
-func_check +604 "vavgub v6,v7,v25"
-func_check +608 "vavguh v25,v22,v10"
-func_check +612 "vavguw v3,v23,v29"
-func_check +616 "vctsxs v14,v2,6"
-func_check +620 "vctuxs v9,v31,20"
-func_check +624 "vcfsx v24,v30,3"
-func_check +628 "vcfux v17,v21,29"
-func_check +632 "vcmpbfp v18,v28,v0"
-func_check +636 "vcmpbfp\. v19,v26,v3"
-func_check +640 "vcmpeqfp v16,v2,v11"
-func_check +644 "vcmpeqfp\. v23,v13,v13"
-func_check +648 "vcmpequb v25,v19,v10"
-func_check +652 "vcmpequb\. v18,v11,v2"
-func_check +656 "vcmpequh v9,v25,v7"
-func_check +660 "vcmpequh\. v14,v24,v21"
-func_check +664 "vcmpequw v24,v12,v5"
-func_check +668 "vcmpequw\. v19,v16,v1"
-func_check +672 "vcmpgefp v23,v17,v16"
-func_check +676 "vcmpgefp\. v19,v29,v17"
-func_check +680 "vcmpgtfp v16,v28,v13"
-func_check +684 "vcmpgtfp\. v14,v24,v7"
-func_check +688 "vcmpgtsb v16,v22,v6"
-func_check +692 "vcmpgtsb\. v2,v12,v14"
-func_check +696 "vcmpgtsh v28,v3,v29"
-func_check +700 "vcmpgtsh\. v16,v19,v13"
-func_check +704 "vcmpgtsw v15,v0,v5"
-func_check +708 "vcmpgtsw\. v21,v13,v0"
-func_check +712 "vcmpgtub v5,v10,v30"
-func_check +716 "vcmpgtub\. v7,v13,v10"
-func_check +720 "vcmpgtuh v24,v15,v16"
-func_check +724 "vcmpgtuh\. v25,v21,v27"
-func_check +728 "vcmpgtuw v17,v27,v6"
-func_check +732 "vcmpgtuw\. v8,v21,v27"
-func_check +736 "vcfsx v1,v1,14"
-func_check +740 "vctsxs v4,v15,25"
-func_check +744 "vctuxs v28,v23,14"
-func_check +748 "vcfux v6,v6,0"
-func_check +752 "vexptefp v0,v8"
-func_check +756 "vlogefp v22,v27"
-func_check +760 "vmaddfp v23,v18,v5,v18"
-func_check +764 "vmaxfp v13,v13,v27"
-func_check +768 "vmaxsb v8,v23,v14"
-func_check +772 "vmaxsh v19,v17,v0"
-func_check +776 "vmaxsw v19,v3,v22"
-func_check +780 "vmaxub v23,v30,v28"
-func_check +784 "vmaxuh v9,v20,v23"
-func_check +788 "vmaxuw v21,v19,v1"
-func_check +792 "vmhaddshs v22,v13,v5,v22"
-func_check +796 "vmhraddshs v31,v0,v3,v18"
-func_check +800 "vminfp v2,v21,v24"
-func_check +804 "vminsb v20,v6,v10"
-func_check +808 "vminsh v18,v27,v26"
-func_check +812 "vminsw v3,v4,v1"
-func_check +816 "vminub v7,v0,v13"
-func_check +820 "vminuh v0,v12,v6"
-func_check +824 "vminuw v6,v3,v1"
-func_check +828 "vmladduhm v3,v29,v3,v26"
-func_check +832 "vmrghb v21,v5,v31"
-func_check +836 "vmrghh v21,v24,v0"
-func_check +840 "vmrghw v16,v0,v22"
-func_check +844 "vmrglb v1,v17,v16"
-func_check +848 "vmrglh v14,v8,v15"
-func_check +852 "vmrglw v31,v21,v5"
-func_check +856 "vmr v24,v9"
-func_check +860 "vmr v24,v9"
-func_check +864 "vmsummbm v0,v24,v15,v23"
-func_check +868 "vmsumshm v1,v4,v7,v25"
-func_check +872 "vmsumshs v9,v8,v13,v31"
-func_check +876 "vmsumubm v23,v31,v12,v30"
-func_check +880 "vmsumuhm v29,v0,v26,v21"
-func_check +884 "vmsumuhs v27,v14,v25,v5"
-func_check +888 "vmulesb v10,v25,v14"
-func_check +892 "vmulesh v1,v18,v8"
-func_check +896 "vmuleub v17,v14,v9"
-func_check +900 "vmuleuh v5,v26,v9"
-func_check +904 "vmulosb v21,v18,v6"
-func_check +908 "vmulosh v4,v5,v8"
-func_check +912 "vmuloub v2,v9,v19"
-func_check +916 "vmulouh v29,v5,v4"
-func_check +920 "vnmsubfp v8,v2,v6,v5"
-func_check +924 "vnor v31,v9,v10"
-func_check +928 "vnot v25,v31"
-func_check +932 "vnot v25,v31"
-func_check +936 "vor v23,v7,v2"
-func_check +940 "vperm v0,v28,v22,v25"
-func_check +944 "vpkpx v16,v25,v17"
-func_check +948 "vpkshss v12,v16,v17"
-func_check +952 "vpkshus v1,v19,v23"
-func_check +956 "vpkswss v25,v7,v13"
-func_check +960 "vpkswus v4,v24,v10"
-func_check +964 "vpkuhum v9,v27,v12"
-func_check +968 "vpkuhus v22,v10,v25"
-func_check +972 "vpkuwum v30,v18,v0"
-func_check +976 "vpkuwus v7,v3,v22"
-func_check +980 "vrefp v24,v28"
-func_check +984 "vrfim v17,v19"
-func_check +988 "vrfin v24,v25"
-func_check +992 "vrfip v3,v5"
-func_check +996 "vrfiz v8,v10"
-func_check +1000 "vrlb v26,v18,v30"
-func_check +1004 "vrlh v16,v17,v25"
-func_check +1008 "vrlw v23,v30,v9"
-func_check +1012 "vrsqrtefp v2,v18"
-func_check +1016 "vsel v20,v14,v18,v10"
-func_check +1020 "vslb v25,v25,v12"
-func_check +1024 "vsldoi v9,v9,v12,7"
-func_check +1028 "vslh v14,v2,v11"
-func_check +1032 "vslo v30,v5,v6"
-func_check +1036 "vsl v22,v30,v9"
-func_check +1040 "vslw v26,v26,v3"
-func_check +1044 "vspltb v1,v20,6"
-func_check +1048 "vsplth v16,v18,3"
-func_check +1052 "vspltisb v25,-13"
-func_check +1056 "vspltish v22,10"
-func_check +1060 "vspltisw v13,13"
-func_check +1064 "vspltw v9,v18,2"
-func_check +1068 "vsrab v14,v22,v0"
-func_check +1072 "vsrah v12,v12,v18"
-func_check +1076 "vsraw v2,v2,v13"
-func_check +1080 "vsrb v7,v27,v5"
-func_check +1084 "vsrh v7,v11,v29"
-func_check +1088 "vsro v18,v30,v31"
-func_check +1092 "vsr v2,v9,v28"
-func_check +1096 "vsrw v0,v25,v0"
-func_check +1100 "vsubcuw v24,v2,v10"
-func_check +1104 "vsubfp v22,v24,v20"
-func_check +1108 "vsubsbs v10,v22,v13"
-func_check +1112 "vsubshs v24,v17,v28"
-func_check +1116 "vsubsws v10,v26,v0"
-func_check +1120 "vsububm v16,v11,v24"
-func_check +1124 "vsububs v11,v21,v1"
-func_check +1128 "vsubuhm v6,v12,v24"
-func_check +1132 "vsubuhs v30,v11,v9"
-func_check +1136 "vsubuwm v19,v20,v13"
-func_check +1140 "vsubuws v18,v25,v6"
-func_check +1144 "vsum2sws v25,v10,v18"
-func_check +1148 "vsum4sbs v13,v16,v21"
-func_check +1152 "vsum4shs v23,v8,v4"
-func_check +1156 "vsum4ubs v28,v13,v30"
-func_check +1160 "vsumsws v22,v10,v8"
-func_check +1164 "vupkhpx v24,v14"
-func_check +1168 "vupkhsb v2,v22"
-func_check +1172 "vupkhsh v16,v2"
-func_check +1176 "vupklpx v10,v26"
-func_check +1180 "vupklsb v15,v28"
-func_check +1184 "vupklsh v8,v8"
-func_check +1188 "vxor v25,v0,v3"
-
-## vsd.d
-func_check +1192 "lxsdx vs40,r10,r20"
-func_check +1196 "lxvd2x vs40,r10,r20"
-func_check +1200 "lxvdsx vs40,r10,r20"
-func_check +1204 "lxvw4x vs40,r10,r20"
-func_check +1208 "stxsdx vs40,r10,r20"
-func_check +1212 "stxvd2x vs40,r10,r20"
-func_check +1216 "stxvw4x vs40,r10,r20"
-func_check +1220 "xsabsdp vs40,vs60"
-func_check +1224 "xsadddp vs40,vs50,vs60"
-func_check +1228 "xscmpodp cr1,vs50,vs60"
-func_check +1232 "xscmpudp cr1,vs50,vs60"
-func_check +1236 "xscpsgndp vs40,vs50,vs60"
-func_check +1240 "xscvdpsp vs40,vs60"
-func_check +1244 "xscvdpsxds vs40,vs60"
-func_check +1248 "xscvdpsxws vs40,vs60"
-func_check +1252 "xscvdpuxds vs40,vs60"
-func_check +1256 "xscvdpuxws vs40,vs60"
-func_check +1260 "xscvspdp vs40,vs60"
-func_check +1264 "xscvsxddp vs40,vs60"
-func_check +1268 "xscvuxddp vs40,vs60"
-func_check +1272 "xsdivdp vs40,vs50,vs60"
-func_check +1276 "xsmaddadp vs40,vs50,vs60"
-func_check +1280 "xsmaddmdp vs40,vs50,vs60"
-func_check +1284 "xsmaxdp vs40,vs50,vs60"
-func_check +1288 "xsmindp vs40,vs50,vs60"
-func_check +1292 "xsmsubadp vs40,vs50,vs60"
-func_check +1296 "xsmsubmdp vs40,vs50,vs60"
-func_check +1300 "xsmuldp vs40,vs50,vs60"
-func_check +1304 "xsnabsdp vs40,vs60"
-func_check +1308 "xsnegdp vs40,vs60"
-func_check +1312 "xsnmaddadp vs40,vs50,vs60"
-func_check +1316 "xsnmaddmdp vs40,vs50,vs60"
-func_check +1320 "xsnmsubadp vs40,vs50,vs60"
-func_check +1324 "xsnmsubmdp vs40,vs50,vs60"
-func_check +1328 "xsrdpi vs40,vs60"
-func_check +1332 "xsrdpic vs40,vs60"
-func_check +1336 "xsrdpim vs40,vs60"
-func_check +1340 "xsrdpip vs40,vs60"
-func_check +1344 "xsrdpiz vs40,vs60"
-func_check +1348 "xsredp vs40,vs60"
-func_check +1352 "xsrsqrtedp vs40,vs60"
-func_check +1356 "xssqrtdp vs40,vs60"
-func_check +1360 "xssubdp vs40,vs50,vs60"
-func_check +1364 "xstdivdp cr1,vs50,vs60"
-func_check +1368 "xstsqrtdp cr1,vs60"
-func_check +1372 "xvabsdp vs40,vs60"
-func_check +1376 "xvabssp vs40,vs60"
-func_check +1380 "xvadddp vs40,vs50,vs60"
-func_check +1384 "xvaddsp vs40,vs50,vs60"
-func_check +1388 "xvcmpeqdp vs40,vs50,vs60"
-func_check +1392 "xvcmpeqdp\. vs40,vs50,vs60"
-func_check +1396 "xvcmpeqsp vs40,vs50,vs60"
-func_check +1400 "xvcmpeqsp\. vs40,vs50,vs60"
-func_check +1404 "xvcmpgedp vs40,vs50,vs60"
-func_check +1408 "xvcmpgedp\. vs40,vs50,vs60"
-func_check +1412 "xvcmpgesp vs40,vs50,vs60"
-func_check +1416 "xvcmpgesp\. vs40,vs50,vs60"
-func_check +1420 "xvcmpgtdp vs40,vs50,vs60"
-func_check +1424 "xvcmpgtdp\. vs40,vs50,vs60"
-func_check +1428 "xvcmpgtsp vs40,vs50,vs60"
-func_check +1432 "xvcmpgtsp\. vs40,vs50,vs60"
-func_check +1436 "xvcpsgndp vs40,vs50,vs60"
-func_check +1440 "xvmovdp vs40,vs60"
-func_check +1444 "xvmovdp vs40,vs60"
-func_check +1448 "xvcpsgnsp vs40,vs50,vs60"
-func_check +1452 "xvmovsp vs40,vs60"
-func_check +1456 "xvmovsp vs40,vs60"
-func_check +1460 "xvcvdpsp vs40,vs60"
-func_check +1464 "xvcvdpsxds vs40,vs60"
-func_check +1468 "xvcvdpsxws vs40,vs60"
-func_check +1472 "xvcvdpuxds vs40,vs60"
-func_check +1476 "xvcvdpuxws vs40,vs60"
-func_check +1480 "xvcvspdp vs40,vs60"
-func_check +1484 "xvcvspsxds vs40,vs60"
-func_check +1488 "xvcvspsxws vs40,vs60"
-func_check +1492 "xvcvspuxds vs40,vs60"
-func_check +1496 "xvcvspuxws vs40,vs60"
-func_check +1500 "xvcvsxddp vs40,vs60"
-func_check +1504 "xvcvsxdsp vs40,vs60"
-func_check +1508 "xvcvsxwdp vs40,vs60"
-func_check +1512 "xvcvsxwsp vs40,vs60"
-func_check +1516 "xvcvuxddp vs40,vs60"
-func_check +1520 "xvcvuxdsp vs40,vs60"
-func_check +1524 "xvcvuxwdp vs40,vs60"
-func_check +1528 "xvcvuxwsp vs40,vs60"
-func_check +1532 "xvdivdp vs40,vs50,vs60"
-func_check +1536 "xvdivsp vs40,vs50,vs60"
-func_check +1540 "xvmaddadp vs40,vs50,vs60"
-func_check +1544 "xvmaddmdp vs40,vs50,vs60"
-func_check +1548 "xvmaddasp vs40,vs50,vs60"
-func_check +1552 "xvmaddmsp vs40,vs50,vs60"
-func_check +1556 "xvmaxdp vs40,vs50,vs60"
-func_check +1560 "xvmaxsp vs40,vs50,vs60"
-func_check +1564 "xvmindp vs40,vs50,vs60"
-func_check +1568 "xvminsp vs40,vs50,vs60"
-func_check +1572 "xvmsubadp vs40,vs50,vs60"
-func_check +1576 "xvmsubmdp vs40,vs50,vs60"
-func_check +1580 "xvmsubasp vs40,vs50,vs60"
-func_check +1584 "xvmsubmsp vs40,vs50,vs60"
-func_check +1588 "xvmuldp vs40,vs50,vs60"
-func_check +1592 "xvmulsp vs40,vs50,vs60"
-func_check +1596 "xvnabsdp vs40,vs60"
-func_check +1600 "xvnabssp vs40,vs60"
-func_check +1604 "xvnegdp vs40,vs60"
-func_check +1608 "xvnegsp vs40,vs60"
-func_check +1612 "xvnmaddadp vs40,vs50,vs60"
-func_check +1616 "xvnmaddmdp vs40,vs50,vs60"
-func_check +1620 "xvnmaddasp vs40,vs50,vs60"
-func_check +1624 "xvnmaddmsp vs40,vs50,vs60"
-func_check +1628 "xvnmsubadp vs40,vs50,vs60"
-func_check +1632 "xvnmsubmdp vs40,vs50,vs60"
-func_check +1636 "xvnmsubasp vs40,vs50,vs60"
-func_check +1640 "xvnmsubmsp vs40,vs50,vs60"
-func_check +1644 "xvrdpi vs40,vs60"
-func_check +1648 "xvrdpic vs40,vs60"
-func_check +1652 "xvrdpim vs40,vs60"
-func_check +1656 "xvrdpip vs40,vs60"
-func_check +1660 "xvrdpiz vs40,vs60"
-func_check +1664 "xvredp vs40,vs60"
-func_check +1668 "xvresp vs40,vs60"
-func_check +1672 "xvrspi vs40,vs60"
-func_check +1676 "xvrspic vs40,vs60"
-func_check +1680 "xvrspim vs40,vs60"
-func_check +1684 "xvrspip vs40,vs60"
-func_check +1688 "xvrspiz vs40,vs60"
-func_check +1692 "xvrsqrtedp vs40,vs60"
-func_check +1696 "xvrsqrtesp vs40,vs60"
-func_check +1700 "xvsqrtdp vs40,vs60"
-func_check +1704 "xvsqrtsp vs40,vs60"
-func_check +1708 "xvsubdp vs40,vs50,vs60"
-func_check +1712 "xvsubsp vs40,vs50,vs60"
-func_check +1716 "xvtdivdp cr1,vs50,vs60"
-func_check +1720 "xvtdivsp cr1,vs50,vs60"
-func_check +1724 "xvtsqrtdp cr1,vs60"
-func_check +1728 "xvtsqrtsp cr1,vs60"
-func_check +1732 "xxland vs40,vs50,vs60"
-func_check +1736 "xxlandc vs40,vs50,vs60"
-func_check +1740 "xxlnor vs40,vs50,vs60"
-func_check +1744 "xxlor vs40,vs50,vs60"
-func_check +1748 "xxlxor vs40,vs50,vs60"
-func_check +1752 "xxmrghw vs40,vs50,vs60"
-func_check +1756 "xxmrglw vs40,vs50,vs60"
-func_check +1760 "xxmrghd vs40,vs50,vs60"
-func_check +1764 "xxpermdi vs40,vs50,vs60,1"
-func_check +1768 "xxpermdi vs40,vs50,vs60,2"
-func_check +1772 "xxmrgld vs40,vs50,vs60"
-func_check +1776 "xxspltd vs40,vs50,0"
-func_check +1780 "xxspltd vs40,vs50,0"
-func_check +1784 "xxspltd vs40,vs50,1"
-func_check +1788 "xxspltd vs40,vs50,1"
-func_check +1792 "xxmrghd vs40,vs50,vs60"
-func_check +1796 "xxmrghd vs40,vs50,vs60"
-func_check +1800 "xxmrgld vs40,vs50,vs60"
-func_check +1804 "xxswapd vs40,vs50"
-func_check +1808 "xxswapd vs40,vs50"
-func_check +1812 "xxsel vs40,vs50,vs60,vs62"
-func_check +1816 "xxsldwi vs40,vs50,vs60,2"
-func_check +1820 "xxspltw vs40,vs60,2"
-func_check +1824 "lxvd2x vs40,0,r20"
-func_check +1828 "lxvd2x vs40,r10,r20"
-func_check +1832 "stxvd2x vs40,0,r20"
-func_check +1836 "stxvd2x vs40,r10,r20"
-
-## power8.d
-func_check +1840 "tabort\. r5"
-func_check +1844 "tabortwc\. 7,r8,r16"
-func_check +1848 "tabortdc\. 20,r11,r10"
-func_check +1852 "tabortwci\. 17,r10,-13"
-func_check +1856 "tabortdci\. 29,r3,-5"
-func_check +1860 "tbegin\."
-func_check +1864 "tcheck cr7"
-func_check +1868 "tend\."
-func_check +1872 "tend\."
-func_check +1876 "tendall\."
-func_check +1880 "tendall\."
-func_check +1884 "treclaim\. r24"
-func_check +1888 "trechkpt\."
-func_check +1892 "tsuspend\."
-func_check +1896 "tsuspend\."
-func_check +1900 "tresume\."
-func_check +1904 "tresume\."
-func_check +1908 "ori r2,r2,0"
-func_check +1912 "nop"
-func_check +1916 "ori r2,r2,0"
-func_check +1920 "rfebb 0"
-func_check +1924 "rfebb"
-func_check +1928 "rfebb"
-func_check +1932 "bctar- 12,4\\*cr5\\+gt"
-func_check +1936 "bctarl- 4,4\\*cr1\\+so"
-func_check +1940 "bctar\\+ 12,4\\*cr3\\+lt"
-func_check +1944 "bctarl\\+ 4,eq"
-func_check +1948 "bctar 4,4\\*cr2\\+lt,1"
-func_check +1952 "bctarl 4,4\\*cr1\\+so,2"
-func_check +1956 "wait"
-func_check +1960 "msgsndp r8"
-func_check +1964 "mtsle 1"
-func_check +1968 "msgclrp r27"
-func_check[...]
[diff truncated at 100000 bytes]