From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5099 invoked by alias); 15 Feb 2010 06:06:45 -0000 Received: (qmail 5083 invoked by uid 48); 15 Feb 2010 06:06:44 -0000 Date: Mon, 15 Feb 2010 06:06:00 -0000 From: "kiyoshi dot coquser at gmail dot com" To: gdb-prs@sourceware.org Message-ID: <20100215060644.11284.kiyoshi.coquser@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug sim/11284] New: MADDU instruction increments ACX if non-carry X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q1/txt/msg00261.txt.bz2 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.