[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/6] tcg-hppa: Schedule the address masking after th
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 4/6] tcg-hppa: Schedule the address masking after the TLB load. |
Date: |
Fri, 9 Apr 2010 10:49:10 -0700 |
Issue the tlb load as early as possible and perform the address
masking while the load is completing.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/hppa/tcg-target.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tcg/hppa/tcg-target.c b/tcg/hppa/tcg-target.c
index 2f3b770..6941e22 100644
--- a/tcg/hppa/tcg-target.c
+++ b/tcg/hppa/tcg-target.c
@@ -904,7 +904,6 @@ static int tcg_out_tlb_read(TCGContext *s, int r0, int r1,
int addrlo,
CPU_TLB_ENTRY_BITS is > 3, so we can't merge that shift with the
add that follows. */
tcg_out_extr(s, r1, addrlo, TARGET_PAGE_BITS, CPU_TLB_BITS, 0);
- tcg_out_andi(s, r0, addrlo, TARGET_PAGE_MASK | ((1 << s_bits) - 1));
tcg_out_shli(s, r1, r1, CPU_TLB_ENTRY_BITS);
tcg_out_arith(s, r1, r1, TCG_AREG0, INSN_ADDL);
@@ -927,6 +926,12 @@ static int tcg_out_tlb_read(TCGContext *s, int r0, int r1,
int addrlo,
tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_R20, r1, offset);
}
+ /* Compute the value that ought to appear in the TLB for a hit, namely,
the page
+ of the address. We include the low N bits of the address to catch
unaligned
+ accesses and force them onto the slow path. Do this computation after
having
+ issued the load from the TLB slot to give the load time to complete. */
+ tcg_out_andi(s, r0, addrlo, TARGET_PAGE_MASK | ((1 << s_bits) - 1));
+
/* If not equal, jump to lab_miss. */
if (TARGET_LONG_BITS == 64) {
tcg_out_brcond2(s, TCG_COND_NE, TCG_REG_R20, TCG_REG_R23,
--
1.6.2.5
- [Qemu-devel] [PATCH 0/6] tcg-hppa improvements, Richard Henderson, 2010/04/14
- [Qemu-devel] [PATCH 4/6] tcg-hppa: Schedule the address masking after the TLB load.,
Richard Henderson <=
- [Qemu-devel] [PATCH 2/6] tcg-hppa: Fix GUEST_BASE initialization in prologue., Richard Henderson, 2010/04/14
- [Qemu-devel] [PATCH 5/6] tcg-hppa: Fix branch offset during retranslation., Richard Henderson, 2010/04/14
- [Qemu-devel] [PATCH 6/6] tcg-hppa: Remove automatically implemented opcodes., Richard Henderson, 2010/04/14
- [Qemu-devel] [PATCH 3/6] tcg-hppa: Fix softmmu loads and stores., Richard Henderson, 2010/04/14
- [Qemu-devel] [PATCH 1/6] tcg-hppa: Constrain immediate inputs to and_i32, or_i32, andc_i32., Richard Henderson, 2010/04/14
- [Qemu-devel] Re: [PATCH 0/6] tcg-hppa improvements, Paolo Bonzini, 2010/04/14