aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-21 20:06:10 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-01 10:53:15 -0500
commit361a6d49c6526dcff3b530c8ceefcce95fe1b9d0 (patch)
tree525c6b45a815619aa7ee01d52b11762525d9b14b
parent58d38850b68914f4990714c8b8083050f4436726 (diff)
downloadbinutils-361a6d49c6526dcff3b530c8ceefcce95fe1b9d0.zip
binutils-361a6d49c6526dcff3b530c8ceefcce95fe1b9d0.tar.gz
binutils-361a6d49c6526dcff3b530c8ceefcce95fe1b9d0.tar.bz2
sim: arm: mark local read-only arrays as static const
Move it into read-only data sections to avoid constructing them on the stack at runtime.
-rw-r--r--sim/arm/thumbemu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/arm/thumbemu.c b/sim/arm/thumbemu.c
index 58a9c85..a26a404 100644
--- a/sim/arm/thumbemu.c
+++ b/sim/arm/thumbemu.c
@@ -2135,7 +2135,7 @@ ARMul_ThumbDecode (ARMul_State * state,
ARMword opcode;
enum { t_norm, t_shift, t_neg, t_mul } otype;
};
- struct insn_format subset[16] =
+ static const struct insn_format subset[16] =
{
{ 0xE0100000, t_norm}, /* ANDS Rd,Rd,Rs */
{ 0xE0300000, t_norm}, /* EORS Rd,Rd,Rs */
@@ -2158,7 +2158,7 @@ ARMul_ThumbDecode (ARMul_State * state,
if (in_IT_block ())
{
- struct insn_format it_subset[16] =
+ static const struct insn_format it_subset[16] =
{
{ 0xE0000000, t_norm}, /* AND Rd,Rd,Rs */
{ 0xE0200000, t_norm}, /* EOR Rd,Rd,Rs */