Module Name: src Committed By: skrll Date: Thu Aug 18 19:24:31 UTC 2016
Modified Files: src/sys/arch/mips/mips: mips_fixup.c Log Message: Make the fixup code play nicely with the current exception handlers. >From matt@ To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/mips/mips_fixup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/mips_fixup.c diff -u src/sys/arch/mips/mips/mips_fixup.c:1.16 src/sys/arch/mips/mips/mips_fixup.c:1.17 --- src/sys/arch/mips/mips/mips_fixup.c:1.16 Mon Jul 11 19:17:55 2016 +++ src/sys/arch/mips/mips/mips_fixup.c Thu Aug 18 19:24:31 2016 @@ -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 @@ mips_fixup_exceptions(mips_fixup_callbac } 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; } }