From: visa Date: Mon, 3 Jul 2017 16:37:07 +0000 (+0000) Subject: Use copyin32() instead of copyin() in RDHWR emulation. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=891e10e1971546166f7dea1ee7e442412d771869;p=openbsd Use copyin32() instead of copyin() in RDHWR emulation. This reduces emulation time about 5%. --- diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 6d572473f37..762141db48c 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.124 2017/05/30 15:39:04 mpi Exp $ */ +/* $OpenBSD: trap.c,v 1.125 2017/07/03 16:37:07 visa Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -727,7 +727,7 @@ fault_common_no_miss: va += 4; /* Get the faulting instruction. */ - if (copyin(va, &inst, sizeof(inst)) != 0) { + if (copyin32((void *)va, &inst.word) != 0) { i = SIGBUS; typ = BUS_OBJERR; break;