From: Richard Henderson <rth@twiddle.net>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH 06/24] tcg-mips: Move softmmu slow path out of line
Date: Sat, 24 May 2014 08:42:00 -0700 [thread overview]
Message-ID: <5380BDC8.7050502@twiddle.net> (raw)
In-Reply-To: <53806C74.3050602@redhat.com>
On 05/24/2014 02:55 AM, Paolo Bonzini wrote:
> Il 14/05/2014 09:17, Richard Henderson ha scritto:
>> + tcg_out_opc_imm(s, OPC_LW, TCG_REG_A0, TCG_REG_A0, add_off);
>> + tcg_out_opc_reg(s, OPC_AND, TCG_REG_T0, TCG_REG_T0, addrl);
>> +
>> + label_ptr[0] = s->code_ptr;
>> tcg_out_opc_br(s, OPC_BNE, TCG_REG_T0, TCG_REG_AT);
>> - tcg_out_nop(s);
>
> I don't remember mips very well, LW cannot be put in the delay slot? This would
> let you fill both delay slots for the 64-bit case. Or is it just that the code
> becomes harder to follow due to the TARGET_LONG_BITS == 64 "if"s?
>
> Alternatively, for 64-bit you could use OR+BNE instead of BNE+NOP+BNE. Of
> course this can be done later, this patchset is already a big improvement.
It's MIPS I that had all sorts of problems with scheduling loads. Including
requiring two cycles between load issue and use. TCG doesn't handle any of
that; we require a fully interlocked pipeline. Without looking it up, I'd
guess that was at least MIPS III (circa 1992?).
Mostly that nop is hard to fill because of the if's, and I wanted to fill the
last slot with the addition to make up the full host address.
OR+BNE doesn't help; you need 2 XORs and 1 OR to do a double-word equality
comparison. That's something that might take a bit of measurement to show it's
worthwhile.
r~
next prev parent reply other threads:[~2014-05-24 15:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 7:17 [Qemu-devel] [PATCH 00/24] tcg mips updates Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 01/24] tcg-mips: Layout executable and code_gen_buffer Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 02/24] tcg-mips: Constrain the code_gen_buffer to be within one 256mb segment Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 03/24] tcg-mips: Use J and JAL opcodes Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 04/24] tcg-mips: Fill the exit_tb delay slot Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 05/24] tcg-mips: Split large ldst offsets Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 06/24] tcg-mips: Move softmmu slow path out of line Richard Henderson
2014-05-24 9:55 ` Paolo Bonzini
2014-05-24 15:42 ` Richard Henderson [this message]
2014-05-14 7:17 ` [Qemu-devel] [PATCH 07/24] tcg-mips: Convert to new qemu_l/st helpers Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 08/24] tcg-mips: Convert to new_ldst Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 09/24] tcg-mips: Rearrange register allocation Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 10/24] tcg-mips: Introduce TCG_TMP0, TCG_TMP1 Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 11/24] tcg-mips: Use T9 for TCG_TMP1 Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 12/24] tcg-mips: Use EXT for AND on mips32r2 Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 13/24] tcg-mips: Name the opcode enumeration Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 14/24] tcg-mips: Fix subtract immediate range Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 15/24] tcg-mips: Hoist args loads Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 16/24] tcg-mips: Improve add2/sub2 Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 17/24] tcg-mips: Commonize opcode implementations Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 18/24] tcg-mips: Simplify setcond Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 19/24] tcg-mips: Simplify brcond Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 20/24] tcg-mips: Simplify setcond2 Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 21/24] tcg-mips: Improve setcond eq/ne vs zeros Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 22/24] tcg-mips: Simplify brcond2 Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 23/24] tcg-mips: Simplify movcond Richard Henderson
2014-05-14 7:17 ` [Qemu-devel] [PATCH 24/24] tcg-mips: Enable direct chaining of TBs Richard Henderson
2014-05-23 19:15 ` [Qemu-devel] [PATCH 00/24] tcg mips updates Richard Henderson
2014-05-23 19:47 ` Paolo Bonzini
2014-05-24 10:06 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5380BDC8.7050502@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).