target/mips: Optimize regnames[] arrays

Since all entries are no more than 3/4/6 bytes (including nul
terminator), can save space and pie runtime relocations by
declaring regnames[] as array of 3/4/6 const char.

Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210617174323.2900831-10-f4bug@amsat.org>
This commit is contained in:
Philippe Mathieu-Daudé 2021-05-29 20:13:44 +02:00
parent dae7324b97
commit 0610677293
5 changed files with 7 additions and 7 deletions

View file

@ -35,7 +35,7 @@
#include "qapi/qapi-commands-machine-target.h"
#include "fpu_helper.h"
const char regnames[32][4] = {
const char regnames[32][3] = {
"r0", "at", "v0", "v1", "a0", "a1", "a2", "a3",
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",