qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5211] alpha: fix lit sign
Date: Sun, 14 Sep 2008 16:09:15 +0000	[thread overview]
Message-ID: <E1Keu9z-00052V-CV@cvs.savannah.gnu.org> (raw)

Revision: 5211
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5211
Author:   aurel32
Date:     2008-09-14 16:09:15 +0000 (Sun, 14 Sep 2008)

Log Message:
-----------
alpha: fix lit sign

according to the alpha arch reference, the literal field of an operate
instruction is unsigned:

If bit <12> of the instruction is 1, an 8-bit zero-extended literal
constant is formed by bits
<20:13> of the instruction. The l teral is interpreted as a positive
integer bet ween 0 and 255
and is zero-extended to 64 bits.

This patch fixes the mis-interpretation of the literal field.

(Tristan Gingold)

Modified Paths:
--------------
    trunk/target-alpha/translate.c

Modified: trunk/target-alpha/translate.c
===================================================================
--- trunk/target-alpha/translate.c	2008-09-14 13:59:34 UTC (rev 5210)
+++ trunk/target-alpha/translate.c	2008-09-14 16:09:15 UTC (rev 5211)
@@ -351,7 +351,7 @@
 
 static always_inline void gen_arith2 (DisasContext *ctx,
                                       void (*gen_arith_op)(void),
-                                      int rb, int rc, int islit, int8_t lit)
+                                      int rb, int rc, int islit, uint8_t lit)
 {
     if (islit)
         tcg_gen_movi_i64(cpu_T[0], lit);
@@ -367,7 +367,7 @@
 static always_inline void gen_arith3 (DisasContext *ctx,
                                       void (*gen_arith_op)(void),
                                       int ra, int rb, int rc,
-                                      int islit, int8_t lit)
+                                      int islit, uint8_t lit)
 {
     if (ra != 31)
         tcg_gen_mov_i64(cpu_T[0], cpu_ir[ra]);
@@ -387,7 +387,7 @@
 static always_inline void gen_cmov (DisasContext *ctx,
                                     void (*gen_test_op)(void),
                                     int ra, int rb, int rc,
-                                    int islit, int8_t lit)
+                                    int islit, uint8_t lit)
 {
     if (ra != 31)
         tcg_gen_mov_i64(cpu_T[0], cpu_ir[ra]);

                 reply	other threads:[~2008-09-14 16:09 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=E1Keu9z-00052V-CV@cvs.savannah.gnu.org \
    --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).