diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-25 15:45:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-25 15:45:05 +0000 |
commit | 8ca5717eaa45d08be233b30ce9ff26ab82a903be (patch) | |
tree | b31a5b2212aea0db4f95a1aaa6f12386d9bd1177 /sys/arch | |
parent | 00c3722ec9627c9b46b409cdf4db155198de3c3f (diff) |
Accept valid forms of double-precision fmul/fadd/fsub/fdiv and reject invalid
forms of fcvt where source and destination precision is the same.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/m88k/fpu/m88110_fp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/m88k/fpu/m88110_fp.c b/sys/arch/m88k/fpu/m88110_fp.c index 0c3405637d6..9eb75c92a48 100644 --- a/sys/arch/m88k/fpu/m88110_fp.c +++ b/sys/arch/m88k/fpu/m88110_fp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110_fp.c,v 1.3 2007/12/25 13:36:07 miod Exp $ */ +/* $OpenBSD: m88110_fp.c,v 1.4 2007/12/25 15:45:04 miod Exp $ */ /* * Copyright (c) 2007, Miodrag Vallat. @@ -259,6 +259,7 @@ fpu_emulate(struct trapframe *frame, u_int32_t insn) if ((t1 != FTYPE_SNG && t1 != FTYPE_DBL) || (t2 != FTYPE_SNG && t2 != FTYPE_DBL) || (td != FTYPE_SNG && td != FTYPE_DBL)) + return (SIGILL); break; case 0x04: /* flt */ if (t1 != 0x00) /* flt on XRF */ @@ -282,6 +283,9 @@ fpu_emulate(struct trapframe *frame, u_int32_t insn) return (SIGILL); break; case 0x01: /* fcvt */ + if (t2 == td) + return (SIGILL); + /* FALLTHROUGH */ case 0x0f: /* fsqrt */ if ((t2 != FTYPE_SNG && t2 != FTYPE_DBL) || (td != FTYPE_SNG && td != FTYPE_DBL) || |