.long 0x0
1: // try way 1
+ #if defined(VGABI_64)
ld $14, FCS_g1($16)
bne $14, $10, 2f // cmp against .guest1
// hit at way 1; swap upwards
sd $13, FCS_h0($16) // new .host0 = old .host1
sd $11, FCS_g1($16) // new .guest1 = old .guest0
sd $12, FCS_h1($16) // new .host1 = old .host0
+ #elif defined(VGABI_N32)
+ lw $14, FCS_g1($16)
+ bne $14, $10, 2f
+ lw $11, FCS_g0($16)
+ lw $12, FCS_h0($16)
+ lw $13, FCS_h1($16)
+ sw $10, FCS_g0($16)
+ sw $13, FCS_h0($16)
+ sw $11, FCS_g1($16)
+ sw $12, FCS_h1($16)
+ #endif
// stats only
lw $15, VG_(stats__n_xIndir_hits1_32)
addiu $15, $15, 1
.long 0x0
2: // try way 2
+ #if defined(VGABI_64)
ld $14, FCS_g2($16)
bne $14, $10, 3f // cmp against .guest2
// hit at way 2; swap upwards
sd $13, FCS_h1($16)
sd $11, FCS_g2($16)
sd $12, FCS_h2($16)
+ #elif defined(VGABI_N32)
+ lw $14, FCS_g2($16)
+ bne $14, $10, 3f
+ lw $11, FCS_g1($16)
+ lw $12, FCS_h1($16)
+ lw $13, FCS_h2($16)
+ sw $10, FCS_g1($16)
+ sw $13, FCS_h1($16)
+ sw $11, FCS_g2($16)
+ sw $12, FCS_h2($16)
+ #endif
// stats only
lw $15, VG_(stats__n_xIndir_hits2_32)
addiu $15, $15, 1
.long 0x0
3: // try way 3
+ #if defined(VGABI_64)
ld $14, FCS_g3($16)
bne $14, $10, 4f // cmp against .guest3
// hit at way 3; swap upwards
sd $13, FCS_h2($16)
sd $11, FCS_g3($16)
sd $12, FCS_h3($16)
+ #elif defined(VGABI_N32)
+ lw $14, FCS_g3($16)
+ bne $14, $10, 4f
+ lw $11, FCS_g2($16)
+ lw $12, FCS_h2($16)
+ lw $13, FCS_h3($16)
+ sw $10, FCS_g2($16)
+ sw $13, FCS_h2($16)
+ sw $11, FCS_g3($16)
+ sw $12, FCS_h3($16)
+ #endif
// stats only
lw $15, VG_(stats__n_xIndir_hits3_32)
addiu $15, $15, 1
// Log2(sizeof(FastCacheSet)). This is needed in the handwritten assembly.
#if defined(VGA_amd64) || defined(VGA_arm64) \
- || defined(VGA_ppc64be) || defined(VGA_ppc64le) || defined(VGA_mips64) \
+ || defined(VGA_ppc64be) || defined(VGA_ppc64le) \
+ || (defined(VGA_mips64) && defined(VGABI_64)) \
|| defined(VGA_s390x)
// And all other 64-bit hosts
# define VG_FAST_CACHE_SET_BITS 6
# define FCS_h3 56
#elif defined(VGA_x86) || defined(VGA_arm) || defined(VGA_ppc32) \
- || defined(VGA_mips32) || defined(VGP_nanomips_linux)
+ || defined(VGA_mips32) || defined(VGP_nanomips_linux) \
+ || (defined(VGA_mips64) && defined(VGABI_N32))
// And all other 32-bit hosts
# define VG_FAST_CACHE_SET_BITS 5
# define FCS_g0 0