qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Magnus Damm" <magnus.damm@gmail.com>
To: Thiemo Seufer <ths@networkno.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] sh4: further updates
Date: Mon, 14 May 2007 18:01:00 +0900	[thread overview]
Message-ID: <aec7e5c30705140201n5309e27fn7b1c0dea1d123a47@mail.gmail.com> (raw)
In-Reply-To: <20070513170238.GD8380@networkno.de>

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

Hi Thiemo!

Thanks for testing and applying!

On 5/14/07, Thiemo Seufer <ths@networkno.de> wrote:
> The sh4-fpu-new patch fails to build (on ppc/Linux) with:
>
> gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/home/ths/qemu/qemu-write/target-sh4 -I/home/ths/qemu/qemu-write -D__powerpc__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/ths/qemu/qemu-write/fpu -I/home/ths/qemu/qemu-write/slirp    -c -o translate-op.o /home/ths/qemu/qemu-write/translate-op.c
> In file included from /home/ths/qemu/qemu-write/translate-op.c:36:
> ./op.h: In function `dyngen_code':
> ./op.h:1220: error: syntax error before ')' token
> ./op.h:1221: error: syntax error before ')' token
> make[1]: *** [translate-op.o] Error 1
> make[1]: Leaving directory `/home/ths/qemu/qemu-write/sh4-softmmu'
> make: *** [subdir-sh4-softmmu] Error 2

Does the attached patch fix your problem? Apply on top of sh4-fpu-new.

/ magnus

[-- Attachment #2: qemu-cvs_20070514-fpu-new-fix-ppc.patch --]
[-- Type: text/x-patch, Size: 1205 bytes --]

sh4: Fix new fpu opcodes

This patch works around problems with references to the cst8 section that
occured on powerpc. This fix has been tested using gentoo crossdev and a
combination of gcc-3.4.6 and glibc-2.4.

Signed-off-by: Magnus Damm <damm@igel.co.jp>

--- 0002/target-sh4/op.c
+++ work/target-sh4/op.c	2007-05-14 17:46:06.000000000 +0900
@@ -804,9 +804,9 @@ void OPPROTO op_ftrc_DT(void)
     RETURN();
 }
 
-void OPPROTO op_movl_T0_FT0(void)
+void OPPROTO op_fmov_T0_frN(void)
 {
-    FT0 = T0;
+    *(unsigned int *)&env->fregs[PARAM1] = T0;
     RETURN();
 }
 
--- 0002/target-sh4/translate.c
+++ work/target-sh4/translate.c	2007-05-14 17:46:20.000000000 +0900
@@ -1156,16 +1156,14 @@ void decode_opc(DisasContext * ctx)
     case 0xf08d:		/* fldi0 FRn */
 	if (!(ctx->fpscr & FPSCR_PR)) {
 	    gen_op_movl_imm_T0(0);
-	    gen_op_movl_T0_FT0();
-	    gen_op_fmov_FT0_frN(FREG(B11_8));
+	    gen_op_fmov_T0_frN(FREG(B11_8));
 	    return;
 	}
 	break;
     case 0xf09d:		/* fldi1 FRn */
 	if (!(ctx->fpscr & FPSCR_PR)) {
 	    gen_op_movl_imm_T0(0x3f800000);
-	    gen_op_movl_T0_FT0();
-	    gen_op_fmov_FT0_frN(FREG(B11_8));
+	    gen_op_fmov_T0_frN(FREG(B11_8));
 	    return;
 	}
 	break;

      reply	other threads:[~2007-05-14  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09  8:48 [Qemu-devel] sh4: further updates Magnus Damm
2007-05-13 17:02 ` Thiemo Seufer
2007-05-14  9:01   ` Magnus Damm [this message]

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=aec7e5c30705140201n5309e27fn7b1c0dea1d123a47@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ths@networkno.de \
    /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).