projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: Convert language la_value_print field to a method
[deliverable/binutils-gdb.git]
/
sim
/
aarch64
/
simulator.c
diff --git
a/sim/aarch64/simulator.c
b/sim/aarch64/simulator.c
index 60972976fc31245ed3b174e7e1935a003a797c68..5f16a69478c8cb0edab4f85274c489cec0b23ad2 100644
(file)
--- a/
sim/aarch64/simulator.c
+++ b/
sim/aarch64/simulator.c
@@
-1,6
+1,6
@@
/* simulator.c -- Interface for the AArch64 simulator.
/* simulator.c -- Interface for the AArch64 simulator.
- Copyright (C) 2015-20
19
Free Software Foundation, Inc.
+ Copyright (C) 2015-20
20
Free Software Foundation, Inc.
Contributed by Red Hat.
Contributed by Red Hat.
@@
-13437,13
+13437,12
@@
br (sim_cpu *cpu)
static void
blr (sim_cpu *cpu)
{
static void
blr (sim_cpu *cpu)
{
- unsigned rn = INSTR (9, 5);
+ /* Ensure we read the destination before we write LR. */
+ uint64_t target = aarch64_get_reg_u64 (cpu, INSTR (9, 5), NO_SP);
TRACE_DECODE (cpu, "emulated at line %d", __LINE__);
TRACE_DECODE (cpu, "emulated at line %d", __LINE__);
- /* The pseudo code in the spec says we update LR before fetching.
- the value from the rn. */
aarch64_save_LR (cpu);
aarch64_save_LR (cpu);
- aarch64_set_next_PC (cpu,
aarch64_get_reg_u64 (cpu, rn, NO_SP)
);
+ aarch64_set_next_PC (cpu,
target
);
if (TRACE_BRANCH_P (cpu))
{
if (TRACE_BRANCH_P (cpu))
{
This page took
0.024574 seconds
and
4
git commands to generate.