aboutsummaryrefslogtreecommitdiff
path: root/opcodes/aarch64-gen.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2016-09-21 16:48:06 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2016-09-21 16:48:06 +0100
commitbd11d5d83775e6d05c8e49f2233fb1cf883ff5b4 (patch)
treec49ef60218fbd862dbe8d9dcd8ad6e2fe317423d /opcodes/aarch64-gen.c
parenta235d3aece0b1eeba3789f7e15d64e2e03224a4e (diff)
downloadgdb-bd11d5d83775e6d05c8e49f2233fb1cf883ff5b4.zip
gdb-bd11d5d83775e6d05c8e49f2233fb1cf883ff5b4.tar.gz
gdb-bd11d5d83775e6d05c8e49f2233fb1cf883ff5b4.tar.bz2
[AArch64][SVE 02/32] Avoid hard-coded limit in indented_print
The maximum indentation needed by aarch64-gen.c grows as more instructions are added to aarch64-tbl.h. Rather than having to increase the indentation limit to a higher value, it seemed better to replace it with "%*s". opcodes/ * aarch64-gen.c (indented_print): Avoid hard-coded indentation limit.
Diffstat (limited to 'opcodes/aarch64-gen.c')
-rw-r--r--opcodes/aarch64-gen.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c
index ed0834a..a62f6c8 100644
--- a/opcodes/aarch64-gen.c
+++ b/opcodes/aarch64-gen.c
@@ -378,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);
}