From: Joern Rennecke <joern.rennecke@superh.com>
To: cgen@sources.redhat.com
Subject: RFA: sh64-media.cpu : msad.ubq has unsigned inputs.
Date: Wed, 21 May 2003 16:35:00 -0000 [thread overview]
Message-ID: <3ECBA8E5.C5CE3F41@superh.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
I've found that the msad.ubq instruction in the simulator
operated on signed bytes, although the architecture says these
bytes are unsigned.
Unfortunately, I couldn't regenerate the simulator files in the
current sources, as the sh64-elf build directory is not generated.
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
[-- Attachment #2: msad-diff --]
[-- Type: text/plain, Size: 2825 bytes --]
2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
* sh64-media.cpu (msad.ubq): Inputs are unsigned bytes.
Index: sh64-media.cpu
===================================================================
RCS file: /cvs/src/src/cgen/cpu/sh64-media.cpu,v
retrieving revision 1.5
diff -p -r1.5 sh64-media.cpu
*** sh64-media.cpu 21 May 2003 14:10:46 -0000 1.5
--- sh64-media.cpu 21 May 2003 16:21:36 -0000
***************
*** 1,6 ****
; SuperH SHmedia instruction set description. -*- Scheme -*-
; Copyright (C) 2000, 2001 Red Hat, Inc.
! ; Copyright (C) 2002 SuperH Ltd
; This file is part of CGEN.
; See file COPYING.CGEN for details.
\f
--- 1,6 ----
; SuperH SHmedia instruction set description. -*- Scheme -*-
; Copyright (C) 2000, 2001 Red Hat, Inc.
! ; Copyright (C) 2002, 2003 SuperH Ltd
; This file is part of CGEN.
; See file COPYING.CGEN for details.
\f
***************
*** 1276,1289 ****
"msad.ubq $rm, $rn, $rd"
(+ (f-op 18) rm (f-ext 0) rn rd (f-rsvd 0))
(sequence ((DI acc))
! (set acc (abs DI (sub (subword QI rm 0) (subword QI rn 0))))
! (set acc (add DI acc (abs (sub (subword QI rm 1) (subword QI rn 1)))))
! (set acc (add DI acc (abs (sub (subword QI rm 2) (subword QI rn 2)))))
! (set acc (add DI acc (abs (sub (subword QI rm 3) (subword QI rn 3)))))
! (set acc (add DI acc (abs (sub (subword QI rm 4) (subword QI rn 4)))))
! (set acc (add DI acc (abs (sub (subword QI rm 5) (subword QI rn 5)))))
! (set acc (add DI acc (abs (sub (subword QI rm 6) (subword QI rn 6)))))
! (set acc (add DI acc (abs (sub (subword QI rm 7) (subword QI rn 7)))))
(set rd (add rd acc))))
(define-pmacro (-mshaldsl arg) (saturate SI 32 (sll DI arg (and rn 31))))
--- 1276,1297 ----
"msad.ubq $rm, $rn, $rd"
(+ (f-op 18) rm (f-ext 0) rn rd (f-rsvd 0))
(sequence ((DI acc))
! (set acc (abs DI (sub (zext SI (subword UQI rm 0))
! (zext SI (subword UQI rn 0)))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 1))
! (zext SI (subword UQI rn 1))))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 2))
! (zext SI (subword UQI rn 2))))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 3))
! (zext SI (subword UQI rn 3))))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 4))
! (zext SI (subword UQI rn 4))))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 5))
! (zext SI (subword UQI rn 5))))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 6))
! (zext SI (subword UQI rn 6))))))
! (set acc (add DI acc (abs (sub (zext SI (subword UQI rm 7))
! (zext SI (subword UQI rn 7))))))
(set rd (add rd acc))))
(define-pmacro (-mshaldsl arg) (saturate SI 32 (sll DI arg (and rn 31))))
next reply other threads:[~2003-05-21 16:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 16:35 Joern Rennecke [this message]
2003-05-21 17:11 ` Doug Evans
2003-05-21 18:50 ` Joern Rennecke
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=3ECBA8E5.C5CE3F41@superh.com \
--to=joern.rennecke@superh.com \
--cc=cgen@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).