X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=opcodes%2Faarch64-gen.c;h=0ba22427d5ad9c8afa02bb2218f389b8bd885df3;hb=67d89901506da74d00a482b7560237dce404b41c;hp=bc1e58aaeada1bc888cc3ff724a06b89db637e7e;hpb=43e65147c07b1400ae0dbb6694882eceb2363713;p=binutils-gdb.git diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c index bc1e58aaead..0ba22427d5a 100644 --- a/opcodes/aarch64-gen.c +++ b/opcodes/aarch64-gen.c @@ -1,6 +1,6 @@ /* aarch64-gen.c -- Generate tables and routines for opcode lookup and instruction encoding and decoding. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2017 Free Software Foundation, Inc. Contributed by ARM Ltd. This file is part of the GNU opcodes library. @@ -28,6 +28,7 @@ #include "getopt.h" #include "opcode/aarch64.h" +#define VERIFIER(x) NULL #include "aarch64-tbl.h" static int debug = 0; @@ -377,13 +378,9 @@ initialize_decoder_tree (void) static void __attribute__ ((format (printf, 2, 3))) indented_print (unsigned int indent, const char *format, ...) { - /* 80 number of spaces pluc a NULL terminator. */ - static const char spaces[81] = - " "; va_list ap; va_start (ap, format); - assert (indent <= 80); - printf ("%s", &spaces[80 - indent]); + printf ("%*s", (int) indent, ""); vprintf (format, ap); va_end (ap); } @@ -690,15 +687,17 @@ opcode_node * find_alias_opcode (const aarch64_opcode *opcode) { int i; - /* Assume maximum of 8 disassemble preference candidates. */ - const int max_num_aliases = 8; + /* Assume maximum of 32 disassemble preference candidates. */ + const int max_num_aliases = 32; const aarch64_opcode *ent; - const aarch64_opcode *preferred[max_num_aliases]; + const aarch64_opcode *preferred[max_num_aliases + 1]; opcode_node head, **next; assert (opcode_has_alias (opcode)); i = 0; + if (opcode->name != NULL) + preferred[i++] = opcode; ent = aarch64_opcode_table; while (ent->name != NULL) { @@ -1242,7 +1241,7 @@ main (int argc, char **argv) print_divide_result (decoder_tree); printf ("/* This file is automatically generated by aarch64-gen. Do not edit! */\n"); - printf ("/* Copyright (C) 2012-2015 Free Software Foundation, Inc.\n\ + printf ("/* Copyright (C) 2012-2017 Free Software Foundation, Inc.\n\ Contributed by ARM Ltd.\n\ \n\ This file is part of the GNU opcodes library.\n\