aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-10-11 17:13:15 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2022-10-13 11:25:32 -0700
commitfc5c479ddecc82dafa385041fb0085020e47d446 (patch)
treea4cb87c7e21c78dbfd6658432f197282b16e6fbb
parent39cc5fc44cc24ac002f6622c5c2bb88b63fa700b (diff)
downloadfsf-binutils-gdb-fc5c479ddecc82dafa385041fb0085020e47d446.zip
fsf-binutils-gdb-fc5c479ddecc82dafa385041fb0085020e47d446.tar.gz
fsf-binutils-gdb-fc5c479ddecc82dafa385041fb0085020e47d446.tar.bz2
Don't call tag_map_regno twice for each index.
-rw-r--r--gdb/aarch64-fbsd-tdep.c4
-rw-r--r--gdb/aarch64-linux-tdep.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/aarch64-fbsd-tdep.c b/gdb/aarch64-fbsd-tdep.c
index a5931e8..5505910 100644
--- a/gdb/aarch64-fbsd-tdep.c
+++ b/gdb/aarch64-fbsd-tdep.c
@@ -293,7 +293,7 @@ aarch64_fbsd_supply_capregset (const struct regset *regset,
if (regno == -1)
continue;
if (regnum == -1 || regno == regnum)
- regcache->raw_supply_tag (tag_map_regno(tdep, i), tag_map & 1);
+ regcache->raw_supply_tag (regno, tag_map & 1);
tag_map >>= 1;
}
}
@@ -322,7 +322,7 @@ aarch64_fbsd_collect_capregset (const struct regset *regset,
if (regnum == -1 || regno == regnum)
{
mask = (uint64_t)1 << i;
- if (regcache->raw_collect_tag (tag_map_regno(tdep, i)))
+ if (regcache->raw_collect_tag (regno))
tag_map |= mask;
else
tag_map &= ~mask;
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 444acea..69243dd 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -631,7 +631,7 @@ aarch64_linux_supply_cregset (const struct regset *regset,
regno = tag_map_regno(tdep, i);
if (regnum == -1 || regno == regnum)
- regcache->raw_supply_tag (tag_map_regno(tdep, i), tag_map & 1);
+ regcache->raw_supply_tag (regno, tag_map & 1);
tag_map >>= 1;
}
}
@@ -658,7 +658,7 @@ aarch64_linux_collect_cregset (const struct regset *regset,
if (regnum == -1 || regno == regnum)
{
mask = (uint64_t)1 << i;
- if (regcache->raw_collect_tag (tag_map_regno(tdep, i)))
+ if (regcache->raw_collect_tag (regno))
tag_map |= mask;
else
tag_map &= ~mask;