From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH, MIPS64] Fix LDR and LDL instructions
Date: Sat, 19 May 2007 02:57:36 +0200 [thread overview]
Message-ID: <20070519005736.GA26262@amd64.aurel32.net> (raw)
Hi,
The trivial patch below fixes the LDR and LDL instructions. Before
modifying a register, it is better to load it :)
With this patch I am able to boot a 64-bit MIPS kernel on the emulated
Malta board up to the start of INIT. Then I get:
Freeing unused kernel memory: 168k freed
modprobe: FATAL: Could not load /lib/modules/2.6.21.1/modules.dep: No such file or directory
INIT: version 2.86 booting
schedule_timeout: wrong timeout value 7ffffffffffffffe
Call Trace:
[<ffffffff80107700>] dump_stack+0x8/0x38
[<ffffffff803f9ce4>] schedule_timeout+0xdc/0x108
[<ffffffff80194828>] do_select+0x428/0x548
[<ffffffff801bbbfc>] compat_core_sys_select+0x1a4/0x230
[<ffffffff801bdb64>] compat_sys_select+0x104/0x1f0
[<ffffffff80115108>] handle_sys+0x108/0x124
This call trace is then printed in loop.
Note that the kernel part of the 64-bit boot log is now the same as the
32-bit one, except for the addresses. The 64-bit specific error messages
(for example the USB ones) are fixed with this patch.
Bye,
Aurelien
Index: target-mips/translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-mips/translate.c,v
retrieving revision 1.80
diff -u -d -p -r1.80 translate.c
--- target-mips/translate.c 18 May 2007 11:55:54 -0000 1.80
+++ target-mips/translate.c 19 May 2007 00:46:59 -0000
@@ -761,6 +761,7 @@ static void gen_ldst (DisasContext *ctx,
opn = "scd";
break;
case OPC_LDL:
+ GEN_LOAD_REG_TN(T1, rt);
op_ldst(ldl);
GEN_STORE_TN_REG(rt, T0);
opn = "ldl";
@@ -771,6 +772,7 @@ static void gen_ldst (DisasContext *ctx,
opn = "sdl";
break;
case OPC_LDR:
+ GEN_LOAD_REG_TN(T1, rt);
op_ldst(ldr);
GEN_STORE_TN_REG(rt, T0);
opn = "ldr";
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
reply other threads:[~2007-05-19 0:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070519005736.GA26262@amd64.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.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).