|
| From: | Bastian Koppelmann |
| Subject: | Re: [Qemu-devel] [PATCH] s390x: Implement SAM{24,31,64} |
| Date: | Tue, 04 Nov 2014 22:02:13 +0000 |
| User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 11/04/2014 08:19 PM, Alexander Graf wrote:
+static ExitStatus op_sam(DisasContext *s, DisasOps *o)
+{
+ int sam = s->insn->data;
+ TCGv_i64 tsam = tcg_const_i64(sam);
+
+ /* Overwrite PSW_MASK_64 and PSW_MASK_32 */
+ tcg_gen_deposit_i64(psw_mask, psw_mask, tsam, 31, 2);
+
+ tcg_temp_free_i64(tsam);
+ return EXIT_PC_STALE;
+}
+
You forgot to zero out bits 64-103 of psw, in case of sam24 and bits
64-96 in case of sam31.
Also you forgot to add 2 (the instruction length) to bits 64-127 of psw
or if this is a target of EXECUTE/EXECUTE RELATIVE LONG add 4/6.
static ExitStatus op_sar(DisasContext *s, DisasOps *o)
{
int r1 = get_field(s->fields, r1);
| [Prev in Thread] | Current Thread | [Next in Thread] |