summaryrefslogtreecommitdiff
path: root/sys/arch/m68k/fpe/fpu_emulate.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-01-09 22:27:13 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-01-09 22:27:13 +0000
commit332a483dedd5c976b45635d3ef8337dfdd377f08 (patch)
treebcd0800a8732b7099fd64ce366155836b0f6e6ce /sys/arch/m68k/fpe/fpu_emulate.c
parentc88cb37963768d4ddbf78335478986b31599e25a (diff)
Remove fetch(9) and store(9) functions from the kernel, and replace the few
remaining instances of them with appropriate copy(9) usage. ok art@, tested on all arches unless my memory is non-ECC
Diffstat (limited to 'sys/arch/m68k/fpe/fpu_emulate.c')
-rw-r--r--sys/arch/m68k/fpe/fpu_emulate.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/arch/m68k/fpe/fpu_emulate.c b/sys/arch/m68k/fpe/fpu_emulate.c
index 23a03df3f2e..a3c5ffb12dc 100644
--- a/sys/arch/m68k/fpe/fpu_emulate.c
+++ b/sys/arch/m68k/fpe/fpu_emulate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_emulate.c,v 1.11 2002/04/29 22:23:49 miod Exp $ */
+/* $OpenBSD: fpu_emulate.c,v 1.12 2003/01/09 22:27:09 miod Exp $ */
/* $NetBSD: fpu_emulate.c,v 1.14 1996/12/18 05:44:31 scottr Exp $ */
/*
@@ -139,8 +139,7 @@ fpu_emulate(frame, fpf)
frame->f_pc = frame->f_fmt4.f_fslw;
}
- word = fusword((void *) (frame->f_pc));
- if (word < 0) {
+ if (copyin((void *)frame->f_pc, &word, sizeof(int)) != 0) {
#ifdef DEBUG
printf(" fpu_emulate: fault reading opcode\n");
#endif
@@ -170,8 +169,7 @@ fpu_emulate(frame, fpf)
insn.is_opcode = word;
optype = (word & 0x01C0);
- word = fusword((void *) (frame->f_pc + 2));
- if (word < 0) {
+ if (copyin((void *)(frame->f_pc + 2), &word, sizeof(int)) != 0) {
#ifdef DEBUG
printf(" fpu_emulate: fault reading word1\n");
#endif
@@ -1079,8 +1077,8 @@ fpu_emul_type1(fe, insn)
u_int16_t count = frame->f_regs[insn->is_opcode & 7];
if (count-- != 0) {
- displ = fusword((void *) (frame->f_pc + insn->is_advance));
- if (displ < 0) {
+ if (copyin((void *)(frame->f_pc + insn->is_advance),
+ &displ, sizeof(int)) != 0) {
#ifdef DEBUG
printf(" fpu_emul_type1: fault reading displacement\n");
#endif
@@ -1169,8 +1167,8 @@ fpu_emul_brcc(fe, insn)
displ = insn->is_word1;
if (insn->is_opcode & 0x40) {
- word2 = fusword((void *) (frame->f_pc + insn->is_advance));
- if (word2 < 0) {
+ if (copyin((void *)(frame->f_pc + insn->is_advance), &word2,
+ sizeof(int)) != 0) {
#ifdef DEBUG
printf(" fpu_emul_brcc: fault reading word2\n");
#endif