aboutsummaryrefslogtreecommitdiff
path: root/target/mips/cpu.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-04-18 23:41:10 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-05-02 16:49:34 +0200
commit830b87ea25b3710c3fce04dee782bcf1c89ba27f (patch)
tree48f310b3f6676987bd9cd3e213038bbda3532dd7 /target/mips/cpu.c
parentadbf1be325482af13e374573fc875fbe15600348 (diff)
target/mips: Optimize CPU/FPU regnames[] arrays
Since all entries are no more than 4 bytes (including nul terminator), can save space and pie runtime relocations by declaring regnames[] as array of 4 const char. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210428170410.479308-6-f4bug@amsat.org>
Diffstat (limited to 'target/mips/cpu.c')
-rw-r--r--target/mips/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index f354d18aec..ed9552ebeb 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -35,7 +35,7 @@
#include "qapi/qapi-commands-machine-target.h"
#include "fpu_helper.h"
-const char * const regnames[32] = {
+const char regnames[32][4] = {
"r0", "at", "v0", "v1", "a0", "a1", "a2", "a3",
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",