summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdw <mdw@openbsd.org>2002-06-11 08:09:42 +0000
committermdw <mdw@openbsd.org>2002-06-11 08:09:42 +0000
commit600e658d7802464b961e4bf08df1297b50eb894d (patch)
treea536d448ea17335a780d44195f47485ccf929101
parentAdd manpage for umidi(4) (diff)
downloadwireguard-openbsd-600e658d7802464b961e4bf08df1297b50eb894d.tar.xz
wireguard-openbsd-600e658d7802464b961e4bf08df1297b50eb894d.zip
Recognize more v9 branches when stepping
-rw-r--r--sys/arch/sparc64/sparc64/db_interface.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c
index 1cef9b2576a..138bfc6656e 100644
--- a/sys/arch/sparc64/sparc64/db_interface.c
+++ b/sys/arch/sparc64/sparc64/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.9 2002/06/10 20:09:24 mdw Exp $ */
+/* $OpenBSD: db_interface.c,v 1.10 2002/06/11 08:09:42 mdw Exp $ */
/* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */
/*
@@ -1128,6 +1128,14 @@ db_branch_taken(inst, pc, regs)
insn.i_int = inst;
+ /* the fancy union just gets in the way of this: */
+ switch(inst & 0xffc00000) {
+ case 0x30400000: /* branch always, annul, with prediction */
+ return pc + ((inst<<(32-19))>>((32-19)-2));
+ case 0x30800000: /* branch always, annul */
+ return pc + ((inst<<(32-22))>>((32-22)-2));
+ }
+
/*
* if this is not an annulled conditional branch, the next pc is "npc".
*/
@@ -1169,6 +1177,14 @@ db_inst_branch(inst)
insn.i_int = inst;
+ /* the fancy union just gets in the way of this: */
+ switch(inst & 0xffc00000) {
+ case 0x30400000: /* branch always, annul, with prediction */
+ return TRUE;
+ case 0x30800000: /* branch always, annul */
+ return TRUE;
+ }
+
if (insn.i_any.i_op != IOP_OP2)
return FALSE;