public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug sim/11284] New: MADDU instruction increments ACX if non-carry
@ 2010-02-15 6:06 kiyoshi dot coquser at gmail dot com
2010-02-15 8:39 ` [Bug sim/11284] " kiyoshi dot coquser at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: kiyoshi dot coquser at gmail dot com @ 2010-02-15 6:06 UTC (permalink / raw)
To: gdb-prs
MADDU instruction unexpectedly increments ACX if *non-cally* on sim.
-- test case --
TEST_MADDU:
mflhxu $0 /* ACX|HI|LO >>= 32 */
mthi $0 /* HI = 0 */
mtlo $0 /* LO = 0 */
li $t0, 1 /* T0 = 1 */
maddu $t0, $t0 /* ACX|HI|LO += T0 * T0 */
mflhxu $0 /* ACX|HI|LO >>= 32 */
CHECKPOINT:
/* HI == 1 (HI SHOUD BE 0) */
-- proposed patch --
$ diff -c sim/mips/mips.igen
Index: sim/mips/mips.igen
===============================================================
====
RCS file: /cvs/src/src/sim/mips/mips.igen,v
retrieving revision 1.68
diff -c -r1.68 mips.igen
*** sim/mips/mips.igen 22 Oct 2007 20:02:25 -0000 1.68
--- sim/mips/mips.igen 15 Feb 2010 05:51:25 -0000
***************
*** 2482,2488 ****
TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
temp = (U8_4 (VL4_8 (HI), VL4_8 (LO))
+ ((unsigned64) VL4_8 (GPR[RS]) * (unsigned64) VL4_8 (GPR[RT])));
! ACX += U8_4 (VL4_8 (HI), VL4_8 (LO)) < temp; /* SmartMIPS */
LO = EXTEND32 (temp);
HI = EXTEND32 (VH4_8 (temp));
TRACE_ALU_RESULT2 (HI, LO);
--- 2482,2488 ----
TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
temp = (U8_4 (VL4_8 (HI), VL4_8 (LO))
+ ((unsigned64) VL4_8 (GPR[RS]) * (unsigned64) VL4_8 (GPR[RT])));
! ACX += U8_4 (VL4_8 (HI), VL4_8 (LO)) > temp; /* SmartMIPS */
LO = EXTEND32 (temp);
HI = EXTEND32 (VH4_8 (temp));
TRACE_ALU_RESULT2 (HI, LO);
***************
*** 2505,2511 ****
temp = (U8_4 (VL4_8 (DSPHI(AC)), VL4_8 (DSPLO(AC)))
+ ((unsigned64) VL4_8 (GPR[RS]) * (unsigned64) VL4_8 (GPR[RT])));
if (AC == 0)
! ACX += U8_4 (VL4_8 (HI), VL4_8 (LO)) < temp; /* SmartMIPS */
DSPLO(AC) = EXTEND32 (temp);
DSPHI(AC) = EXTEND32 (VH4_8 (temp));
if (AC == 0)
--- 2505,2511 ----
temp = (U8_4 (VL4_8 (DSPHI(AC)), VL4_8 (DSPLO(AC)))
+ ((unsigned64) VL4_8 (GPR[RS]) * (unsigned64) VL4_8 (GPR[RT])));
if (AC == 0)
! ACX += U8_4 (VL4_8 (HI), VL4_8 (LO)) > temp; /* SmartMIPS */
DSPLO(AC) = EXTEND32 (temp);
DSPHI(AC) = EXTEND32 (VH4_8 (temp));
if (AC == 0)
$
--
Summary: MADDU instruction increments ACX if non-carry
Product: gdb
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: sim
AssignedTo: unassigned at sourceware dot org
ReportedBy: kiyoshi dot coquser at gmail dot com
CC: gdb-prs at sourceware dot org
GCC host triplet: i386-apple-darwin10.2.0
GCC target triplet: mipsisa32-elf
http://sourceware.org/bugzilla/show_bug.cgi?id=11284
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sim/11284] MADDU instruction increments ACX if non-carry
2010-02-15 6:06 [Bug sim/11284] New: MADDU instruction increments ACX if non-carry kiyoshi dot coquser at gmail dot com
@ 2010-02-15 8:39 ` kiyoshi dot coquser at gmail dot com
2010-02-16 7:03 ` kiyoshi dot coquser at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: kiyoshi dot coquser at gmail dot com @ 2010-02-15 8:39 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From kiyoshi dot coquser at gmail dot com 2010-02-15 08:39 -------
(In reply to comment #0)
> MADDU instruction unexpectedly increments ACX if *non-cally* on sim.
Oh, misspelled:
s/non-cally/non-carry/
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11284
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sim/11284] MADDU instruction increments ACX if non-carry
2010-02-15 6:06 [Bug sim/11284] New: MADDU instruction increments ACX if non-carry kiyoshi dot coquser at gmail dot com
2010-02-15 8:39 ` [Bug sim/11284] " kiyoshi dot coquser at gmail dot com
@ 2010-02-16 7:03 ` kiyoshi dot coquser at gmail dot com
2010-02-16 7:05 ` kiyoshi dot coquser at gmail dot com
2010-02-16 22:30 ` tromey at redhat dot com
3 siblings, 0 replies; 6+ messages in thread
From: kiyoshi dot coquser at gmail dot com @ 2010-02-16 7:03 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From kiyoshi dot coquser at gmail dot com 2010-02-16 07:03 -------
I also found following issues:
1. -- MULT break ACX --
TEST_MULT:
li $t0, 1 /* T0 = 1 */
mthi $t0 /* HI = T0 */
mtlo $0 /* LO = 0 */
mtlhx $0 /* ACX|HI|LO <<= 32 */
mult $t0, $t0 /* HI|LO = T0 * T0 */
mflhxu $0 /* ACX|HI|LO >>= 32 */
CHECKPOINT1:
/* HI == 0 (HI SHOUD BE 1) */
2. -- MULTU ignore ACX --
TEST_MULTU:
li $t0, 1 /* T0 = 1 */
mthi $t0 /* HI = T0 */
mtlo $0 /* LO = 0 */
mtlhx $0 /* ACX|HI|LO <<= 32 */
multu $t0, $t0 /* ACX|HI|LO = T0 * T0 */
mflhxu $0 /* ACX|HI|LO >>= 32 */
CHECKPOINT2:
/* HI == 1 (HI SHOUD BE 0) */
The patch attached to this report will fix these issues.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11284
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sim/11284] MADDU instruction increments ACX if non-carry
2010-02-15 6:06 [Bug sim/11284] New: MADDU instruction increments ACX if non-carry kiyoshi dot coquser at gmail dot com
2010-02-15 8:39 ` [Bug sim/11284] " kiyoshi dot coquser at gmail dot com
2010-02-16 7:03 ` kiyoshi dot coquser at gmail dot com
@ 2010-02-16 7:05 ` kiyoshi dot coquser at gmail dot com
2010-02-16 22:30 ` tromey at redhat dot com
3 siblings, 0 replies; 6+ messages in thread
From: kiyoshi dot coquser at gmail dot com @ 2010-02-16 7:05 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From kiyoshi dot coquser at gmail dot com 2010-02-16 07:05 -------
Created an attachment (id=4602)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4602&action=view)
Proposal to fix issues on MADDU, MULT, and MULTU
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11284
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sim/11284] MADDU instruction increments ACX if non-carry
2010-02-15 6:06 [Bug sim/11284] New: MADDU instruction increments ACX if non-carry kiyoshi dot coquser at gmail dot com
` (2 preceding siblings ...)
2010-02-16 7:05 ` kiyoshi dot coquser at gmail dot com
@ 2010-02-16 22:30 ` tromey at redhat dot com
3 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2010-02-16 22:30 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2010-02-16 22:30 -------
The best way to get a patch in is to follow the contribution guideline:
http://sourceware.org/gdb/contribute/
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11284
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sim/11284] MADDU instruction increments ACX if non-carry
[not found] <bug-11284-4717@http.sourceware.org/bugzilla/>
@ 2014-03-14 0:46 ` vapier at gentoo dot org
0 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2014-03-14 0:46 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=11284
Mike Frysinger <vapier at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vapier at gentoo dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-14 0:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-15 6:06 [Bug sim/11284] New: MADDU instruction increments ACX if non-carry kiyoshi dot coquser at gmail dot com
2010-02-15 8:39 ` [Bug sim/11284] " kiyoshi dot coquser at gmail dot com
2010-02-16 7:03 ` kiyoshi dot coquser at gmail dot com
2010-02-16 7:05 ` kiyoshi dot coquser at gmail dot com
2010-02-16 22:30 ` tromey at redhat dot com
[not found] <bug-11284-4717@http.sourceware.org/bugzilla/>
2014-03-14 0:46 ` vapier at gentoo dot org
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).