qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org, rob.herring@linaro.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [Qemu-devel] [PATCH 2/5] target-arm: support AArch64 for arm_cpu_set_pc
Date: Mon,  1 Sep 2014 09:53:18 +0200	[thread overview]
Message-ID: <1409558001-12148-3-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1409558001-12148-1-git-send-email-ard.biesheuvel@linaro.org>

From: Rob Herring <rob.herring@linaro.org>

Add AArch64 support to arm_cpu_set_pc and make it available to other files.

Signed-off-by: Rob Herring <rob.herring@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 target-arm/cpu.c |  7 -------
 target-arm/cpu.h | 12 ++++++++++++
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index b4c06c17cf87..633a533af716 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -31,13 +31,6 @@
 #include "sysemu/kvm.h"
 #include "kvm_arm.h"
 
-static void arm_cpu_set_pc(CPUState *cs, vaddr value)
-{
-    ARMCPU *cpu = ARM_CPU(cs);
-
-    cpu->env.regs[15] = value;
-}
-
 static bool arm_cpu_has_work(CPUState *cs)
 {
     ARMCPU *cpu = ARM_CPU(cs);
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 51bedc826299..5fa91b4f1d6c 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -1348,4 +1348,16 @@ static inline void cpu_pc_from_tb(CPUARMState *env, TranslationBlock *tb)
     }
 }
 
+static inline void arm_cpu_set_pc(CPUState *cs, vaddr value)
+{
+    ARMCPU *cpu = ARM_CPU(cs);
+
+    if (is_a64(&cpu->env)) {
+        cpu->env.pc = value;
+    } else {
+        cpu->env.regs[15] = value;
+    }
+
+}
+
 #endif
-- 
1.8.3.2

  parent reply	other threads:[~2014-09-01  7:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01  7:53 [Qemu-devel] [PATCH 0/5] ARM: add PSCI 0.2 support in TCG mode Ard Biesheuvel
2014-09-01  7:53 ` [Qemu-devel] [PATCH 1/5] target-arm: add powered off cpu state Ard Biesheuvel
2014-09-01  7:53 ` Ard Biesheuvel [this message]
2014-09-01  9:09   ` [Qemu-devel] [PATCH 2/5] target-arm: support AArch64 for arm_cpu_set_pc Peter Maydell
2014-09-01  9:12     ` Ard Biesheuvel
2014-09-01  7:53 ` [Qemu-devel] [PATCH 3/5] target-arm: add hvc and smc exception emulation handling infrastructure Ard Biesheuvel
2014-09-01  7:53 ` [Qemu-devel] [PATCH 4/5] target-arm: add emulation of PSCI calls for system emulation Ard Biesheuvel
2014-09-01  7:53 ` [Qemu-devel] [PATCH 5/5] arm/virt: enable PSCI emulation support " Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409558001-12148-3-git-send-email-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob.herring@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).