From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gC6Fs-0006dd-Pb for qemu-devel@nongnu.org; Mon, 15 Oct 2018 13:02:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gC6Fq-0004Ec-2B for qemu-devel@nongnu.org; Mon, 15 Oct 2018 13:02:08 -0400 Received: from ste-pvt-msa2.bahnhof.se ([213.80.101.71]:34923) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gC6Fp-0004Dg-Qb for qemu-devel@nongnu.org; Mon, 15 Oct 2018 13:02:05 -0400 Date: Mon, 15 Oct 2018 19:02:02 +0200 From: Fredrik Noring Message-ID: <20181015170202.GB2364@sx9> References: <20181014142928.2784-1-f4bug@amsat.org> <20181014164140.GB2319@sx9> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] target/mips: Support Toshiba specific three-operand MADD and MADDU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Maciej W. Rozycki" Cc: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Richard Henderson , Aleksandar Markovic , Aurelien Jarno , "qemu-devel@nongnu.org Developers" , =?utf-8?Q?J=C3=BCrgen?= Urban Hi Maciej, Philippe, > So results of individual operations are as in the comments with this > code: > > mthi $0 # HI <- 0 > mtlo $0 # LO <- 0 > addiu $2, $0, 1 # $2 <- 1 > lui $3, 0x4000 # $3 <- 0x40000000 > maddu $4, $3, $2 # HI <- 0 > # LO <- 0x40000000 > # $4 <- 0x40000000 > maddu $5, $4, $2 # HI <- 0 > # LO <- 0xffffffff80000000 > # $5 <- 0xffffffff80000000 > maddu $6, $4, $2 # HI <- 1 > # LO <- 0 > # $6 <- 0 Adding tests such as the one above to for example tests/tcg/mips/txx9/ would be useful, I think. As previously noted, GCC can produce 32-bit R5900 programs but 64-bit compilations fail, so full test coverage may not be easily obtainable at the moment. Fredrik