|
60 | 60 | _SF = (_RES < 0); \ |
61 | 61 | _CF = (TO_UNSIGNED(_T1) < TO_UNSIGNED(_T2)); \ |
62 | 62 | _OF = ((_T1 < 0 && _T2 > 0 && _RES > 0) || (_T1 > 0 && _T2 < 0 && _RES < 0)); \ |
63 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 63 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
64 | 64 | _AF = (((_T1 ^ _T2 ^ _RES) & 0x10) != 0); \ |
65 | 65 | } while (0) |
66 | 66 |
|
67 | 67 | // MUL instruction |
68 | 68 | #define MUL(destination, source) do { \ |
69 | | - _Static_assert(__builtin_types_compatible_p(__typeof__(destination), __typeof__(source)) || \ |
| 69 | + _Static_assert( \ |
70 | 70 | __builtin_types_compatible_p(__typeof__(destination), __typeof__(source)) || \ |
71 | 71 | IS_INTEGER_LITERAL(source), \ |
72 | 72 | "destination and source must be the same type or source must be an integer literal"); \ |
|
79 | 79 | _SF = (_RES < 0); \ |
80 | 80 | _CF = (_T1 != 0 && _RES / _T1 != _T2); \ |
81 | 81 | _OF = (_T1 != 0 && _RES / _T1 != _T2); \ |
82 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 82 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
83 | 83 | _AF = (((_T1 ^ _T2 ^ _RES) & 0x10) != 0); \ |
84 | 84 | } while (0) |
85 | 85 |
|
86 | 86 | // DIV instruction |
87 | 87 | #define DIV(destination, source) do { \ |
88 | | - _Static_assert(__builtin_types_compatible_p(__typeof__(destination), __typeof__(source)) || \ |
| 88 | + _Static_assert( \ |
89 | 89 | __builtin_types_compatible_p(__typeof__(destination), __typeof__(source)) || \ |
90 | 90 | IS_INTEGER_LITERAL(source), \ |
91 | 91 | "destination and source must be the same type or source must be an integer literal"); \ |
|
98 | 98 | _SF = (_RES < 0); \ |
99 | 99 | _CF = 0; \ |
100 | 100 | _OF = 0; \ |
101 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 101 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
102 | 102 | _AF = 0; \ |
103 | 103 | } while (0) |
104 | 104 |
|
105 | 105 | // MOD instruction |
106 | 106 | #define MOD(destination, source) do { \ |
107 | | - _Static_assert(__builtin_types_compatible_p(__typeof__(destination), __typeof__(source)) || \ |
| 107 | + _Static_assert( \ |
108 | 108 | __builtin_types_compatible_p(__typeof__(destination), __typeof__(source)) || \ |
109 | 109 | IS_INTEGER_LITERAL(source), \ |
110 | 110 | "destination and source must be the same type or source must be an integer literal"); \ |
|
117 | 117 | _SF = (_RES < 0); \ |
118 | 118 | _CF = 0; \ |
119 | 119 | _OF = 0; \ |
120 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 120 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
121 | 121 | _AF = 0; \ |
122 | 122 | } while(0) |
123 | 123 |
|
|
131 | 131 | _SF = (_RES < 0); \ |
132 | 132 | _CF = (_T != 0); \ |
133 | 133 | _OF = (_T == ((__typeof__(_T))1 << (sizeof(_T)*8 - 1))); \ |
134 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 134 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
135 | 135 | _AF = ((_T ^ _RES) & 0x10) != 0; \ |
136 | 136 | } while (0) |
137 | 137 |
|
|
145 | 145 | _SF = (_RES < 0); \ |
146 | 146 | _CF = (_T < 0); \ |
147 | 147 | _OF = (_T == ((__typeof__(_T))1 << (sizeof(_T)*8 - 1))); \ |
148 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 148 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
149 | 149 | _AF = ((_T ^ _RES) & 0x10) != 0; \ |
150 | 150 | } while (0) |
151 | 151 |
|
|
158 | 158 | _ZF = (_RES == 0); \ |
159 | 159 | _SF = (_RES < 0); \ |
160 | 160 | _OF = (_T == ((__typeof__(_T))1 << (sizeof(_T)*8 - 1))); \ |
161 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 161 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
162 | 162 | _AF = (((_T ^ 1 ^ _RES) & 0x10) != 0); \ |
163 | 163 | } while (0) |
164 | 164 |
|
|
171 | 171 | _ZF = (_RES == 0); \ |
172 | 172 | _SF = (_RES < 0); \ |
173 | 173 | _OF = (_T == ((__typeof__(_T))1 << (sizeof(_T)*8 - 1))); \ |
174 | | - _PF = (__builtin_parity((unsigned)_RES) == 0); \ |
| 174 | + _PF = (__builtin_parity((unsigned char)_RES) == 0); \ |
175 | 175 | _AF = (((_T ^ 1 ^ _RES) & 0x10) != 0); \ |
176 | 176 | } while (0) |
177 | 177 |
|
|
0 commit comments