First Commit of my working state
[simh.git] / HP2100 / hp2100_fp1.h
CommitLineData
196ba1fc
PH
1/* hp2100_fp1.h: HP 2100/1000 multiple-precision floating point definitions\r
2\r
3 Copyright (c) 2005-2006, J. David Bryan\r
4\r
5 Permission is hereby granted, free of charge, to any person obtaining a\r
6 copy of this software and associated documentation files (the "Software"),\r
7 to deal in the Software without restriction, including without limitation\r
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
9 and/or sell copies of the Software, and to permit persons to whom the\r
10 Software is furnished to do so, subject to the following conditions:\r
11\r
12 The above copyright notice and this permission notice shall be included in\r
13 all copies or substantial portions of the Software.\r
14\r
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r
18 THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21\r
22 Except as contained in this notice, the name of the author shall not be used\r
23 in advertising or otherwise to promote the sale, use or other dealings in\r
24 this Software without prior written authorization from the author.\r
25\r
26 16-Oct-06 JDB Generalized FP calling sequences for F-Series\r
27 12-Oct-06 JDB Altered x_trun for F-Series FFP compatibility\r
28*/\r
29\r
30#ifndef _HP2100_FP1_H_\r
31#define _HP2100_FP1_H_ 0\r
32\r
33\r
34/* Special operands. */\r
35\r
36#define ACCUM NULL /* result not returned */\r
37static const OP NOP = { { 0, 0, 0, 0, 0 } }; /* unneeded operand */\r
38\r
39\r
40/* Generalized floating-point handlers. */\r
41\r
42void fp_prec (uint16 opcode, OPSIZE *operand_l, OPSIZE *operand_r, OPSIZE *result);\r
43uint32 fp_exec (uint16 opcode, OP *result, OP operand_l, OP operand_r);\r
44OP fp_accum (const OP *operand, OPSIZE precision);\r
45uint32 fp_pack (OP *result, OP mantissa, int32 exponent, OPSIZE precision);\r
46uint32 fp_nrpack (OP *result, OP mantissa, int32 exponent, OPSIZE precision);\r
47uint32 fp_unpack (OP *mantissa, int32 *exponent, OP packed, OPSIZE precision);\r
48uint32 fp_ucom (OP *mantissa, OPSIZE precision);\r
49uint32 fp_pcom (OP *packed, OPSIZE precision);\r
50uint32 fp_trun (OP *result, OP source, OPSIZE precision);\r
51uint32 fp_cvt (OP *result, OPSIZE source_precision, OPSIZE dest_precision);\r
52\r
53#endif\r