From 891e10e1971546166f7dea1ee7e442412d771869 Mon Sep 17 00:00:00 2001 From: visa Date: Mon, 3 Jul 2017 16:37:07 +0000 Subject: [PATCH] Use copyin32() instead of copyin() in RDHWR emulation. This reduces emulation time about 5%. --- sys/arch/mips64/mips64/trap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.20.1