Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed…
Browse files Browse the repository at this point in the history
…' into staging

qemu-sparc update

# gpg: Signature made Fri 24 Jun 2016 18:19:36 BST
# gpg:                using RSA key 0x5BC2C56FAE0F321F
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-sparc-signed:
  target-sparc: fix register corruption in ldstub if there is no write permission

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Jun 27, 2016
2 parents a01aef5 + b64d2e5 commit 929bf94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion target-sparc/translate.c
Expand Up @@ -4679,12 +4679,15 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
case 0xd: /* ldstub -- XXX: should be atomically */
{
TCGv r_const;
TCGv tmp = tcg_temp_new();

gen_address_mask(dc, cpu_addr);
tcg_gen_qemu_ld8u(cpu_val, cpu_addr, dc->mem_idx);
tcg_gen_qemu_ld8u(tmp, cpu_addr, dc->mem_idx);
r_const = tcg_const_tl(0xff);
tcg_gen_qemu_st8(r_const, cpu_addr, dc->mem_idx);
tcg_gen_mov_tl(cpu_val, tmp);
tcg_temp_free(r_const);
tcg_temp_free(tmp);
}
break;
case 0x0f:
Expand Down

0 comments on commit 929bf94

Please sign in to comment.