Received: from eggs.gnu.org ([2001:4830:134:3::10]:32853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTUCu-0006aO-6G for qemu-devel@nongnu.org; Wed, 10 Feb 2016 07:49:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTUCq-0004o7-UC for qemu-devel@nongnu.org; Wed, 10 Feb 2016 07:49:20 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:12732 helo=imgpgp01.kl.imgtec.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTUCq-0004o1-Mm for qemu-devel@nongnu.org; Wed, 10 Feb 2016 07:49:16 -0500 Date: Wed, 10 Feb 2016 12:49:15 +0000 From: James Hogan Message-ID: <20160210124914.GG3678@jhogan-linux.le.imgtec.org> References: <1455014403-10742-1-git-send-email-rth@twiddle.net> <1455014403-10742-16-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5UGlQXeG3ziZS81+" Content-Disposition: inline In-Reply-To: <1455014403-10742-16-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 15/15] tcg-mips: Use mipsr6 instructions in calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, aurelien@aurel32.net --5UGlQXeG3ziZS81+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Richard, On Tue, Feb 09, 2016 at 09:40:03PM +1100, Richard Henderson wrote: > @@ -1313,28 +1315,30 @@ static void tcg_out_movcond(TCGContext *s, TCGCon= d cond, TCGReg ret, > } > } > =20 > -static void tcg_out_call_int(TCGContext *s, tcg_insn_unit *arg, bool tai= l) > +static void tcg_out_call_int(TCGContext *s, tcg_insn_unit *arg, > + bool tail, bool delay) > { > /* Note that the ABI requires the called function's address to be > loaded into T9, even if a direct branch is in range. */ > tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_T9, (uintptr_t)arg); > =20 > /* But do try a direct branch, allowing the cpu better insn prefetch= =2E */ > - if (tail) { > - if (!tcg_out_opc_jmp(s, OPC_J, arg)) { > - tcg_out_opc_reg(s, OPC_JR, 0, TCG_REG_T9, 0); > - } > + if (tcg_out_opc_jmp(s, tail ? OPC_J : OPC_JAL, arg)) { > + if (!delay) { > + tcg_out_nop(s); > + } > + } else if (use_mips32r6_instructions && !delay) { > + tcg_out_opc_reg(s, tail ? OPC_JIC : OPC_JIALC, 0, TCG_REG_T9, 0); this needs to be "...JIALC, 0, 0, TCG_REG_T9);" to get t9 into rt. Cheers James --5UGlQXeG3ziZS81+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWuzHKAAoJEGwLaZPeOHZ6SuMQAKMsNuYMoDdP+xWvCmTkXZOH B8XIdPHg8Th52qwAS4uodhmm/pXa6LvD4t0j/EOhti2Lj/n5TwxohJMfF6cdf6AY SOwwPPww6/Z42XCH1hvrals0l0se/Y5omxe8mD9uasCK09jbQb2Xrs7CldDrNzc0 2P205d6WUsLwWvd8ReQfn9CbMT7Y5biTp4xYmHmkekfIK+e6a05ItS8uv4cataBq L+cGeTv6xPiwqwds9O0O/jg6CgE5G8RhFgjcFb4VBsC4jI1RVhVehidIfTqQJbDV JM2X/YU5Isx8YicM7VhMqyaJD90X/NNU7u8uWOGsPsiJvRD4a/rMdUrIWyyGZ2kY YdgdkCjQgE19rnppq3o8md3NzUBW0PjTezlmswSf2oHJD0MzbT+r2h2/cQ/RZwux jgMIs2sWN3wostsIXEaZYD6Mht7TsCGcVy7gPk3lu8Z+uW+9WPJZmO73Mo4ZNYqW HHJfcy96FSrJjtiiMDnt7CnxP4hmn3GEPV/dtDqXtGNT2U6KSMwF17NYT/bIHwP2 KhohNqiWluE5VGOlnNa5wh7ypIv7nuhoFlv8Rer83qRjaBWMZNIGUbn9yaYAQQQp N6XffK88dy7uiNbWOVUcrlWqZel73mlchEaSkN8FwxzMVzW7mU1SS6n7xZoS6IXb rDVNS2tIgdkROUDrqi++ =bImX -----END PGP SIGNATURE----- --5UGlQXeG3ziZS81+--