1 #define _GEN_DFP_LONG(name, op1, op2, mask) \
2 GEN_HANDLER_E(name, 0x3B, op1, op2, mask, PPC_NONE, PPC2_DFP)
4 #define _GEN_DFP_LONG_300(name, op1, op2, mask) \
5 GEN_HANDLER_E(name, 0x3B, op1, op2, mask, PPC_NONE, PPC2_ISA300)
7 #define _GEN_DFP_LONGx2(name, op1, op2, mask) \
8 GEN_HANDLER_E(name, 0x3B, op1, 0x00 | op2, mask, PPC_NONE, PPC2_DFP), \
9 GEN_HANDLER_E(name, 0x3B, op1, 0x10 | op2, mask, PPC_NONE, PPC2_DFP)
11 #define _GEN_DFP_LONGx4(name, op1, op2, mask) \
12 GEN_HANDLER_E(name, 0x3B, op1, 0x00 | op2, mask, PPC_NONE, PPC2_DFP), \
13 GEN_HANDLER_E(name, 0x3B, op1, 0x08 | op2, mask, PPC_NONE, PPC2_DFP), \
14 GEN_HANDLER_E(name, 0x3B, op1, 0x10 | op2, mask, PPC_NONE, PPC2_DFP), \
15 GEN_HANDLER_E(name, 0x3B, op1, 0x18 | op2, mask, PPC_NONE, PPC2_DFP)
17 #define _GEN_DFP_QUAD(name, op1, op2, mask) \
18 GEN_HANDLER_E(name, 0x3F, op1, op2, mask, PPC_NONE, PPC2_DFP)
20 #define _GEN_DFP_QUAD_300(name, op1, op2, mask) \
21 GEN_HANDLER_E(name, 0x3F, op1, op2, mask, PPC_NONE, PPC2_ISA300)
23 #define _GEN_DFP_QUADx2(name, op1, op2, mask) \
24 GEN_HANDLER_E(name, 0x3F, op1, 0x00 | op2, mask, PPC_NONE, PPC2_DFP), \
25 GEN_HANDLER_E(name, 0x3F, op1, 0x10 | op2, mask, PPC_NONE, PPC2_DFP)
27 #define _GEN_DFP_QUADx4(name, op1, op2, mask) \
28 GEN_HANDLER_E(name, 0x3F, op1, 0x00 | op2, mask, PPC_NONE, PPC2_DFP), \
29 GEN_HANDLER_E(name, 0x3F, op1, 0x08 | op2, mask, PPC_NONE, PPC2_DFP), \
30 GEN_HANDLER_E(name, 0x3F, op1, 0x10 | op2, mask, PPC_NONE, PPC2_DFP), \
31 GEN_HANDLER_E(name, 0x3F, op1, 0x18 | op2, mask, PPC_NONE, PPC2_DFP)
33 #define GEN_DFP_T_A_B_Rc(name, op1, op2) \
34 _GEN_DFP_LONG(name, op1, op2, 0x00000000)
36 #define GEN_DFP_Tp_Ap_Bp_Rc(name, op1, op2) \
37 _GEN_DFP_QUAD(name, op1, op2, 0x00210800)
39 #define GEN_DFP_Tp_A_Bp_Rc(name, op1, op2) \
40 _GEN_DFP_QUAD(name, op1, op2, 0x00200800)
42 #define GEN_DFP_T_B_Rc(name, op1, op2) \
43 _GEN_DFP_LONG(name, op1, op2, 0x001F0000)
45 #define GEN_DFP_Tp_Bp_Rc(name, op1, op2) \
46 _GEN_DFP_QUAD(name, op1, op2, 0x003F0800)
48 #define GEN_DFP_Tp_B_Rc(name, op1, op2) \
49 _GEN_DFP_QUAD(name, op1, op2, 0x003F0000)
51 #define GEN_DFP_T_Bp_Rc(name, op1, op2) \
52 _GEN_DFP_QUAD(name, op1, op2, 0x001F0800)
54 #define GEN_DFP_BF_A_B(name, op1, op2) \
55 _GEN_DFP_LONG(name, op1, op2, 0x00000001)
57 #define GEN_DFP_BF_A_B_300(name, op1, op2) \
58 _GEN_DFP_LONG_300(name, op1, op2, 0x00400001)
60 #define GEN_DFP_BF_Ap_Bp(name, op1, op2) \
61 _GEN_DFP_QUAD(name, op1, op2, 0x00610801)
63 #define GEN_DFP_BF_A_Bp(name, op1, op2) \
64 _GEN_DFP_QUAD(name, op1, op2, 0x00600801)
66 #define GEN_DFP_BF_A_Bp_300(name, op1, op2) \
67 _GEN_DFP_QUAD_300(name, op1, op2, 0x00400001)
69 #define GEN_DFP_BF_A_DCM(name, op1, op2) \
70 _GEN_DFP_LONGx2(name, op1, op2, 0x00600001)
72 #define GEN_DFP_BF_Ap_DCM(name, op1, op2) \
73 _GEN_DFP_QUADx2(name, op1, op2, 0x00610001)
75 #define GEN_DFP_T_A_B_RMC_Rc(name, op1, op2) \
76 _GEN_DFP_LONGx4(name, op1, op2, 0x00000000)
78 #define GEN_DFP_Tp_Ap_Bp_RMC_Rc(name, op1, op2) \
79 _GEN_DFP_QUADx4(name, op1, op2, 0x02010800)
81 #define GEN_DFP_Tp_A_Bp_RMC_Rc(name, op1, op2) \
82 _GEN_DFP_QUADx4(name, op1, op2, 0x02000800)
84 #define GEN_DFP_TE_T_B_RMC_Rc(name, op1, op2) \
85 _GEN_DFP_LONGx4(name, op1, op2, 0x00000000)
87 #define GEN_DFP_TE_Tp_Bp_RMC_Rc(name, op1, op2) \
88 _GEN_DFP_QUADx4(name, op1, op2, 0x00200800)
90 #define GEN_DFP_R_T_B_RMC_Rc(name, op1, op2) \
91 _GEN_DFP_LONGx4(name, op1, op2, 0x001E0000)
93 #define GEN_DFP_R_Tp_Bp_RMC_Rc(name, op1, op2) \
94 _GEN_DFP_QUADx4(name, op1, op2, 0x003E0800)
96 #define GEN_DFP_SP_T_B_Rc(name, op1, op2) \
97 _GEN_DFP_LONG(name, op1, op2, 0x00070000)
99 #define GEN_DFP_SP_Tp_Bp_Rc(name, op1, op2) \
100 _GEN_DFP_QUAD(name, op1, op2, 0x00270800)
102 #define GEN_DFP_S_T_B_Rc(name, op1, op2) \
103 _GEN_DFP_LONG(name, op1, op2, 0x000F0000)
105 #define GEN_DFP_S_Tp_Bp_Rc(name, op1, op2) \
106 _GEN_DFP_QUAD(name, op1, op2, 0x002F0800)
108 #define GEN_DFP_T_A_SH_Rc(name, op1, op2) \
109 _GEN_DFP_LONGx2(name, op1, op2, 0x00000000)
111 #define GEN_DFP_Tp_Ap_SH_Rc(name, op1, op2) \
112 _GEN_DFP_QUADx2(name, op1, op2, 0x00210000)
114 GEN_DFP_T_A_B_Rc(dadd
, 0x02, 0x00),
115 GEN_DFP_Tp_Ap_Bp_Rc(daddq
, 0x02, 0x00),
116 GEN_DFP_T_A_B_Rc(dsub
, 0x02, 0x10),
117 GEN_DFP_Tp_Ap_Bp_Rc(dsubq
, 0x02, 0x10),
118 GEN_DFP_T_A_B_Rc(dmul
, 0x02, 0x01),
119 GEN_DFP_Tp_Ap_Bp_Rc(dmulq
, 0x02, 0x01),
120 GEN_DFP_T_A_B_Rc(ddiv
, 0x02, 0x11),
121 GEN_DFP_Tp_Ap_Bp_Rc(ddivq
, 0x02, 0x11),
122 GEN_DFP_BF_A_B(dcmpu
, 0x02, 0x14),
123 GEN_DFP_BF_Ap_Bp(dcmpuq
, 0x02, 0x14),
124 GEN_DFP_BF_A_B(dcmpo
, 0x02, 0x04),
125 GEN_DFP_BF_Ap_Bp(dcmpoq
, 0x02, 0x04),
126 GEN_DFP_BF_A_DCM(dtstdc
, 0x02, 0x06),
127 GEN_DFP_BF_Ap_DCM(dtstdcq
, 0x02, 0x06),
128 GEN_DFP_BF_A_DCM(dtstdg
, 0x02, 0x07),
129 GEN_DFP_BF_Ap_DCM(dtstdgq
, 0x02, 0x07),
130 GEN_DFP_BF_A_B(dtstex
, 0x02, 0x05),
131 GEN_DFP_BF_Ap_Bp(dtstexq
, 0x02, 0x05),
132 GEN_DFP_BF_A_B(dtstsf
, 0x02, 0x15),
133 GEN_DFP_BF_A_Bp(dtstsfq
, 0x02, 0x15),
134 GEN_DFP_BF_A_B_300(dtstsfi
, 0x03, 0x15),
135 GEN_DFP_BF_A_Bp_300(dtstsfiq
, 0x03, 0x15),
136 GEN_DFP_TE_T_B_RMC_Rc(dquai
, 0x03, 0x02),
137 GEN_DFP_TE_Tp_Bp_RMC_Rc(dquaiq
, 0x03, 0x02),
138 GEN_DFP_T_A_B_RMC_Rc(dqua
, 0x03, 0x00),
139 GEN_DFP_Tp_Ap_Bp_RMC_Rc(dquaq
, 0x03, 0x00),
140 GEN_DFP_T_A_B_RMC_Rc(drrnd
, 0x03, 0x01),
141 GEN_DFP_Tp_A_Bp_RMC_Rc(drrndq
, 0x03, 0x01),
142 GEN_DFP_R_T_B_RMC_Rc(drintx
, 0x03, 0x03),
143 GEN_DFP_R_Tp_Bp_RMC_Rc(drintxq
, 0x03, 0x03),
144 GEN_DFP_R_T_B_RMC_Rc(drintn
, 0x03, 0x07),
145 GEN_DFP_R_Tp_Bp_RMC_Rc(drintnq
, 0x03, 0x07),
146 GEN_DFP_T_B_Rc(dctdp
, 0x02, 0x08),
147 GEN_DFP_Tp_B_Rc(dctqpq
, 0x02, 0x08),
148 GEN_DFP_T_B_Rc(drsp
, 0x02, 0x18),
149 GEN_DFP_Tp_Bp_Rc(drdpq
, 0x02, 0x18),
150 GEN_DFP_T_B_Rc(dcffix
, 0x02, 0x19),
151 GEN_DFP_Tp_B_Rc(dcffixq
, 0x02, 0x19),
152 GEN_DFP_T_B_Rc(dctfix
, 0x02, 0x09),
153 GEN_DFP_T_Bp_Rc(dctfixq
, 0x02, 0x09),
154 GEN_DFP_SP_T_B_Rc(ddedpd
, 0x02, 0x0a),
155 GEN_DFP_SP_Tp_Bp_Rc(ddedpdq
, 0x02, 0x0a),
156 GEN_DFP_S_T_B_Rc(denbcd
, 0x02, 0x1a),
157 GEN_DFP_S_Tp_Bp_Rc(denbcdq
, 0x02, 0x1a),
158 GEN_DFP_T_B_Rc(dxex
, 0x02, 0x0b),
159 GEN_DFP_T_Bp_Rc(dxexq
, 0x02, 0x0b),
160 GEN_DFP_T_A_B_Rc(diex
, 0x02, 0x1b),
161 GEN_DFP_Tp_A_Bp_Rc(diexq
, 0x02, 0x1b),
162 GEN_DFP_T_A_SH_Rc(dscli
, 0x02, 0x02),
163 GEN_DFP_Tp_Ap_SH_Rc(dscliq
, 0x02, 0x02),
164 GEN_DFP_T_A_SH_Rc(dscri
, 0x02, 0x03),
165 GEN_DFP_Tp_Ap_SH_Rc(dscriq
, 0x02, 0x03),