Fix extraction of PC offset from branch instruction.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 19 Jan 2019 08:03:41 +0000 (08:03 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 21 Aug 2019 21:34:03 +0000 (21:34 +0000)
src/microcode/cmpintmd/aarch64.c

index b6610c10b0846b4ef26c15f42d362d7e0add8d8a..d9bed8e6204a5ba277007229e3f221e8f11c6c02 100644 (file)
@@ -90,7 +90,7 @@ cc_return_address_to_entry_address (insn_t * pc)
 {
   insn_t insn = (pc[0]);
   if ((insn & 0xfc000000UL) == 0x14000000UL) /* B */
-    return (pc + (insn & 0x3fffffff));
+    return (pc + (insn & 0x03ffffff));
   else
     /* XXX What if it got branch-tensioned?  */
     error_external_return ();