1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #define DECUSE64 1
23 #define DECSUBSET 1
24 #define DECBUFFER 32
25 #define DECNUMDIGITS 126
26
27 #include "decNumber.h"
28 #include "decNumberLocal.h"
29
30 #define PRINTDEC(msg, dn) \
31 { \
32 if_sim_debug (DBG_TRACEEXT, & cpu_dev) \
33 { \
34 char temp[256]; \
35 decNumberToString(dn, temp); \
36 sim_printf("%s:'%s'\n", msg, temp); \
37 } \
38 }
39
40 #define PRINTALL(msg, dn, set) \
41 { \
42 if_sim_debug (DBG_TRACEEXT, & cpu_dev) \
43 sim_printf("%s:'%s E%d'\n", msg, getBCDn(dn, set->digits), dn->exponent); \
44 }
45
46 decContext * decContextDefaultDPS8(decContext *context);
47 decContext * decContextDefaultDPS8Mul(decContext *context);
48 decNumber * decBCD9ToNumber(const word9 *bcd, Int length, const Int scale, decNumber *dn);
49 char *formatDecimal(uint8_t * out, decContext *set, decNumber *r, int nout, int s,
50 int sf, bool R, bool *OVR, bool *TRUNC);
51
52
53
54
55 int decCompareMAG(decNumber *lhs, decNumber *rhs, decContext *set);