Commit 76fa43f
committed
use FPC LEtoN/BEtoN intrinsics for wire-to-native reads
Replace the hand-rolled {$IFDEF CRYPTOLIB_LITTLE_ENDIAN} branches in the six private read-side helpers with FPC's dedicated, self-endian-aware RTL intrinsics:
LeToNativeUInt16/32/64 -> LEtoN
BeToNativeUInt16/32/64 -> BEtoN
The intrinsic is used on FPC; Delphi keeps the existing fallback verbatim via {$ELSE}. Generated little-endian code is unchanged (LEtoN/BEtoN are the identity on LE hosts, a bswap on BE) -- this is an idiomatic/clarity change that drops these functions' reliance on the CRYPTOLIB_LITTLE_ENDIAN define and defers the endianness decision to the RTL. All Read* overloads route through these helpers, so the whole read path is covered transitively.1 parent 056e5da commit 76fa43f
1 file changed
Lines changed: 42 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
168 | | - | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | | - | |
174 | | - | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
176 | 183 | | |
177 | | - | |
| 184 | + | |
| 185 | + | |
178 | 186 | | |
179 | 187 | | |
180 | 188 | | |
181 | 189 | | |
182 | | - | |
183 | | - | |
| 190 | + | |
| 191 | + | |
184 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
185 | 196 | | |
186 | | - | |
| 197 | + | |
| 198 | + | |
187 | 199 | | |
188 | 200 | | |
189 | 201 | | |
190 | 202 | | |
191 | | - | |
192 | | - | |
| 203 | + | |
| 204 | + | |
193 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
194 | 209 | | |
195 | | - | |
| 210 | + | |
| 211 | + | |
196 | 212 | | |
197 | 213 | | |
198 | 214 | | |
199 | 215 | | |
200 | | - | |
201 | | - | |
| 216 | + | |
| 217 | + | |
202 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
203 | 222 | | |
204 | | - | |
| 223 | + | |
| 224 | + | |
205 | 225 | | |
206 | 226 | | |
207 | 227 | | |
208 | 228 | | |
209 | | - | |
210 | | - | |
| 229 | + | |
| 230 | + | |
211 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
212 | 235 | | |
213 | | - | |
| 236 | + | |
| 237 | + | |
214 | 238 | | |
215 | 239 | | |
216 | 240 | | |
| |||
0 commit comments