From: Richard Earnshaw Date: Mon, 21 Jul 2025 14:42:55 +0000 (+0100) Subject: aarch64: minor code cleanups to aarch64-gen.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db671074ca43fa119c5cd723c928846d5631976;p=thirdparty%2Fbinutils-gdb.git aarch64: minor code cleanups to aarch64-gen.c Fix some overly-long lines. --- diff --git a/opcodes/aarch64-asm-2.c b/opcodes/aarch64-asm-2.c index 30ec1e4d216..8b91b3a8c99 100644 --- a/opcodes/aarch64-asm-2.c +++ b/opcodes/aarch64-asm-2.c @@ -1,6 +1,6 @@ /* This file is automatically generated by aarch64-gen. Do not edit! */ /* Copyright (C) 2012-2025 Free Software Foundation, Inc. - Contributed by ARM Ltd. + Contributed by Arm Ltd. This file is part of the GNU opcodes library. diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c index f84562544cc..853732a1285 100644 --- a/opcodes/aarch64-dis-2.c +++ b/opcodes/aarch64-dis-2.c @@ -1,6 +1,6 @@ /* This file is automatically generated by aarch64-gen. Do not edit! */ /* Copyright (C) 2012-2025 Free Software Foundation, Inc. - Contributed by ARM Ltd. + Contributed by Arm Ltd. This file is part of the GNU opcodes library. diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c index ba48f06024e..47361990601 100644 --- a/opcodes/aarch64-gen.c +++ b/opcodes/aarch64-gen.c @@ -170,7 +170,8 @@ read_table (const struct aarch64_opcode* table) { fprintf (stderr, "%s (%08x,%08x): operands 1 and %u match, but tied=%u\n", - ent->name, ent->opcode, ent->mask, i + 1, ent->tied_operand); + ent->name, ent->opcode, ent->mask, i + 1, + ent->tied_operand); ++errors; } } @@ -199,7 +200,8 @@ read_table (const struct aarch64_opcode* table) /* If a subclass is set for one insn of an iclass, every insn of that iclass must have non-zero subclass field. */ if ((iclass_has_subclasses_p[ent->iclass] && !(ent->flags & F_SUBCLASS)) - || (!iclass_has_subclasses_p[ent->iclass] && (ent->flags & F_SUBCLASS))) + || (!iclass_has_subclasses_p[ent->iclass] + && (ent->flags & F_SUBCLASS))) { fprintf (stderr, "%s: unexpected subclass\n", ent->name); ++errors; @@ -533,7 +535,8 @@ print_find_next_opcode_1 (struct bittree* bittree) (unsigned int)(curr - aarch64_opcode_table)); if (list->next != NULL) { - printf ("value = %u; break;\t", real_index (list->next->index)); + printf ("value = %u; break;\t", + real_index (list->next->index)); printf ("/* %s --> %s. */\n", curr->name, next->name); } else @@ -723,8 +726,9 @@ print_find_next_alias_opcode (const opcode_node *table, int num) continue; while (node->next->next) { - printf (" case %u: value = %u; break;", real_index (node->next->index), - real_index (node->next->next->index)); + printf (" case %u: value = %u; break;", + real_index (node->next->index), + real_index (node->next->next->index)); printf ("\t/* %s --> %s. */\n", get_aarch64_opcode (node->next)->name, get_aarch64_opcode (node->next->next)->name); @@ -1183,8 +1187,9 @@ print_get_opcode (void) /* Print the table. */ printf ("\n"); - printf ("/* Indexed by an enum aarch64_op enumerator, the value is the offset of\n\ - the corresponding aarch64_opcode entry in the aarch64_opcode_table. */\n\n"); + printf ("/* Indexed by an enum aarch64_op enumerator, the value is the\n" + " offset of the corresponding aarch64_opcode entry in the\n" + " aarch64_opcode_table. */\n\n"); printf ("static const unsigned op_enum_table [] =\n"); printf ("{\n"); for (i = 0; i < num; ++i) @@ -1193,8 +1198,8 @@ print_get_opcode (void) /* Print the function. */ printf ("\n"); - printf ("/* Given the opcode enumerator OP, return the pointer to the corresponding\n"); - printf (" opcode entry. */\n"); + printf ("/* Given the opcode enumerator OP, return the pointer to the\n" + " corresponding opcode entry. */\n"); printf ("\n"); printf ("const aarch64_opcode *\n"); printf ("aarch64_get_opcode (enum aarch64_op op)\n"); @@ -1241,7 +1246,8 @@ usage (FILE * stream, int status) { fprintf (stream, "Usage: %s [-V | --version] [-d | --debug] [--help]\n", program_name); - fprintf (stream, "\t[ [-c | --gen-opc] | [-a | --gen-asm] | [-s | --gen-dis] ]\n"); + fprintf (stream, + "\t[ [-c | --gen-opc] | [-a | --gen-asm] | [-s | --gen-dis] ]\n"); xexit (status); } @@ -1301,25 +1307,24 @@ main (int argc, char **argv) if (debug) print_divide_result (decoder_tree); - printf ("/* This file is automatically generated by aarch64-gen. Do not edit! */\n"); - printf ("/* Copyright (C) 2012-2025 Free Software Foundation, Inc.\n\ - Contributed by ARM Ltd.\n\ -\n\ - This file is part of the GNU opcodes library.\n\ -\n\ - This library is free software; you can redistribute it and/or modify\n\ - it under the terms of the GNU General Public License as published by\n\ - the Free Software Foundation; either version 3, or (at your option)\n\ - any later version.\n\ -\n\ - It is distributed in the hope that it will be useful, but WITHOUT\n\ - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n\ - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public\n\ - License for more details.\n\ -\n\ - You should have received a copy of the GNU General Public License\n\ - along with this program; see the file COPYING3. If not,\n\ - see . */\n"); + printf + ("/* This file is automatically generated by aarch64-gen. " + "Do not edit! */\n"); + printf + ("/* Copyright (C) 2012-2025 Free Software Foundation, Inc.\n" + " Contributed by Arm Ltd.\n\n" + " This file is part of the GNU opcodes library.\n\n" + " This library is free software; you can redistribute it and/or modify\n" + " it under the terms of the GNU General Public License as published by\n" + " the Free Software Foundation; either version 3, or (at your option)\n" + " any later version.\n\n" + " It is distributed in the hope that it will be useful, but WITHOUT\n" + " ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n" + " or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public\n" + " License for more details.\n\n" + " You should have received a copy of the GNU General Public License\n" + " along with this program; see the file COPYING3. If not,\n" + " see . */\n"); printf ("\n"); printf ("#include \"sysdep.h\"\n"); diff --git a/opcodes/aarch64-opc-2.c b/opcodes/aarch64-opc-2.c index f36222c5a97..58393f5a6b3 100644 --- a/opcodes/aarch64-opc-2.c +++ b/opcodes/aarch64-opc-2.c @@ -1,6 +1,6 @@ /* This file is automatically generated by aarch64-gen. Do not edit! */ /* Copyright (C) 2012-2025 Free Software Foundation, Inc. - Contributed by ARM Ltd. + Contributed by Arm Ltd. This file is part of the GNU opcodes library. @@ -366,8 +366,9 @@ const struct aarch64_operand aarch64_operands[] = {AARCH64_OPND_CLASS_NIL, "", 0, {0}, "DUMMY"}, }; -/* Indexed by an enum aarch64_op enumerator, the value is the offset of - the corresponding aarch64_opcode entry in the aarch64_opcode_table. */ +/* Indexed by an enum aarch64_op enumerator, the value is the + offset of the corresponding aarch64_opcode entry in the + aarch64_opcode_table. */ static const unsigned op_enum_table [] = { @@ -455,8 +456,8 @@ static const unsigned op_enum_table [] = 131, }; -/* Given the opcode enumerator OP, return the pointer to the corresponding - opcode entry. */ +/* Given the opcode enumerator OP, return the pointer to the + corresponding opcode entry. */ const aarch64_opcode * aarch64_get_opcode (enum aarch64_op op)