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);


Reply via email to