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
[parent not found: <bug-11284-4717@http.sourceware.org/bugzilla/>]

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).