)]}'
{
  "commit": "f0cc4aa8450376ca2aee3ebb09db71f9f2ff333b",
  "tree": "0db9cd6588f07b5b897511a8b9380aaf7ad9d81a",
  "parents": [
    "d688e5239aad2a1f991147974832ce026f78c1a3"
  ],
  "author": {
    "name": "Julio Guerra",
    "email": "guerr@julio.in",
    "time": "Fri Oct 19 00:17:13 2012 +0000"
  },
  "committer": {
    "name": "Alexander Graf",
    "email": "agraf@suse.de",
    "time": "Mon Nov 26 19:53:26 2012 +0100"
  },
  "message": "PPC: Fix missing TRACE exception\n\nThis patch fixes bug 1031698 :\nhttps://bugs.launchpad.net/qemu/+bug/1031698\n\nIf we look at the (truncated) translation of the conditional branch\ninstruction in the test submitted in the bug post, the call to the\nexception helper is missing in the \"bne-false\" chunk of translated\ncode :\n\nIN:\nbne-    0x1800278\n\nOUT:\n0xb544236d:  jne    0xb5442396\n\n0xb5442373:  mov    %ebp,(%esp)\n0xb5442376:  mov    $0x44,%ebx\n0xb544237b:  mov    %ebx,0x4(%esp)\n0xb544237f:  mov    $0x1800278,%ebx\n0xb5442384:  mov    %ebx,0x25c(%ebp)\n0xb544238a:  call   0x827475a\n                     ^^^^^^^^^^^^^^^^^^\n\n0xb5442396:  mov    %ebp,(%esp)\n0xb5442399:  mov    $0x44,%ebx\n0xb544239e:  mov    %ebx,0x4(%esp)\n0xb54423a2:  mov    $0x1800270,%ebx\n0xb54423a7:  mov    %ebx,0x25c(%ebp)\n\nIndeed, gen_exception(ctx, excp) called by gen_goto_tb (called by\ngen_bcond) changes ctx-\u003eexception\u0027s value to excp\u0027s :\n\ngen_bcond()\n{\n  gen_goto_tb(ctx, 0, ctx-\u003enip + li - 4);\n  /* ctx-\u003eexception value is POWERPC_EXCP_BRANCH */\n\n  gen_goto_tb(ctx, 1, ctx-\u003enip);\n  /* ctx-\u003eexception now value is POWERPC_EXCP_TRACE */\n}\n\nMaking the following gen_goto_tb()\u0027s test false during the second call :\n\nif ((ctx-\u003esinglestep_enabled \u0026\n    (CPU_BRANCH_STEP | CPU_SINGLE_STEP)) \u0026\u0026\n    ctx-\u003eexception \u003d\u003d POWERPC_EXCP_BRANCH /* false...*/) {\n         target_ulong tmp \u003d ctx-\u003enip;\n         ctx-\u003enip \u003d dest;\n         /* ... and this is the missing call */\n         gen_exception(ctx, POWERPC_EXCP_TRACE);\n         ctx-\u003enip \u003d tmp;\n}\n\nSo the patch simply adds the missing matching case, fixing our problem.\n\nSigned-off-by: Julio Guerra \u003cguerr@julio.in\u003e\nSigned-off-by: Alexander Graf \u003cagraf@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "16b9c5dd575b138876fb50422a7ad310e54383f0",
      "old_mode": 33188,
      "old_path": "target-ppc/translate.c",
      "new_id": "987b04eda54f9adc484350f1d1941062c3a617ff",
      "new_mode": 33188,
      "new_path": "target-ppc/translate.c"
    }
  ]
}
