Am 23.11.2010 um 20:52 schrieb Blue Swirl:
On Tue, Nov 23, 2010 at 8:00 AM, Andreas Färber <andreas.faerber@web.de
wrote: Ugly but functional!
arch/ppc/qemu/start.S | 24 ++++++++++++++++++++++++ arch/ppc64/qemu/ldscript | 10 ++++++++++ 2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S index eef4293..a3b727d 100644 --- a/arch/ppc/qemu/start.S +++ b/arch/ppc/qemu/start.S @@ -272,12 +272,18 @@ GLOBL(__vectors):
call_dsi_exception: LOAD_REG_IMMEDIATE(r3, dsi_exception) +#ifdef __powerpc64__
ld r3, 0(r3)
+#endif
How about LOAD_REG_FUNC macro, which automatically performs the load?
Yeah, working on it, I had LOAD_REG_ADDR() in an earlier FYI patch. Depending on whether the dotted name is globally visible we could just load that instead and spare us the ld.
@@ -289,7 +295,11 @@ exception_return: __divide_error: trap_error: mflr r3 +#ifdef __powerpc64__
b .unexpected_excep
+#else b unexpected_excep +#endif
This #ifdeffery could be avoided with a macro to add the dot for ppc64: b BRANCH_LABEL(unexpected_excep)
Right. Alex suggested the same. I like your macro name. During local testing I do find my #ifdef'ery more convenient for going back and forth.
Andreas