Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Make the fixup code play nicely with the ...
details: https://anonhg.NetBSD.org/src/rev/8bf7cb98f0cf
branches: trunk
changeset: 347231:8bf7cb98f0cf
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Aug 18 19:24:31 2016 +0000
description:
Make the fixup code play nicely with the current exception handlers.
>From matt@
diffstat:
sys/arch/mips/mips/mips_fixup.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 0f4c90195827 -r 8bf7cb98f0cf sys/arch/mips/mips/mips_fixup.c
--- a/sys/arch/mips/mips/mips_fixup.c Thu Aug 18 19:23:20 2016 +0000
+++ b/sys/arch/mips/mips/mips_fixup.c Thu Aug 18 19:24:31 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fixup.c,v 1.16 2016/07/11 19:17:55 skrll Exp $ */
+/* $NetBSD: mips_fixup.c,v 1.17 2016/08/18 19:24:31 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.16 2016/07/11 19:17:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.17 2016/08/18 19:24:31 skrll Exp $");
#include "opt_mips3_wired.h"
#include "opt_multiprocessor.h"
@@ -145,6 +145,14 @@
}
lui_insnp = NULL;
}
+ } else if (INSN_LOAD_P(insn)) {
+ /*
+ * If we are loading the register used in the LUI,
+ * then that LUI is meaningless now.
+ */
+ size_t rt = (insn >> 16) & 31;
+ if (lui_reg == rt)
+ lui_insn = 0;
}
}
Home |
Main Index |
Thread Index |
Old Index