summaryrefslogtreecommitdiffstats
path: root/tcg/arm/tcg-target.c
diff options
context:
space:
mode:
authorRichard Henderson2015-05-29 18:16:51 +0200
committerRichard Henderson2015-06-09 15:35:29 +0200
commit2b7ec66f025263a5331f37d5ad78a625496fd7bd (patch)
tree4aff7cbedd37871e0a9d5ba3548de92a65234ce9 /tcg/arm/tcg-target.c
parentMerge remote-tracking branch 'remotes/borntraeger/tags/s390x-20150609' into s... (diff)
downloadqemu-2b7ec66f025263a5331f37d5ad78a625496fd7bd.tar.gz
qemu-2b7ec66f025263a5331f37d5ad78a625496fd7bd.tar.xz
qemu-2b7ec66f025263a5331f37d5ad78a625496fd7bd.zip
tcg: Mask TCGMemOp appropriately for indexing
The addition of MO_AMASK means that places that used inverted masks need to be changed to use positive masks, and places that failed to mask the intended bits need updating. Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com> Tested-by: Yongbok Kim <yongbok.kim@imgtec.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/arm/tcg-target.c')
-rw-r--r--tcg/arm/tcg-target.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index 06a8064a9f..ae2ec7a922 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -1260,9 +1260,9 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
icache usage. For pre-armv6, use the signed helpers since we do
not have a single insn sign-extend. */
if (use_armv6_instructions) {
- func = qemu_ld_helpers[opc & ~MO_SIGN];
+ func = qemu_ld_helpers[opc & (MO_BSWAP | MO_SIZE)];
} else {
- func = qemu_ld_helpers[opc];
+ func = qemu_ld_helpers[opc & (MO_BSWAP | MO_SSIZE)];
if (opc & MO_SIGN) {
opc = MO_UL;
}
@@ -1337,7 +1337,7 @@ static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
argreg = tcg_out_arg_reg32(s, argreg, TCG_REG_R14);
/* Tail-call to the helper, which will return to the fast path. */
- tcg_out_goto(s, COND_AL, qemu_st_helpers[opc]);
+ tcg_out_goto(s, COND_AL, qemu_st_helpers[opc & (MO_BSWAP | MO_SIZE)]);
}
#endif /* SOFTMMU */