Compare exactly rdx bytes at rdi/rsi, including empty buffers. Return 1 or
0, preserve callee-saved registers, and never read beyond the admitted views.
This is integrity/header comparison, not a constant-time secret comparison.
235def nativeMemoryEqualAssembly : (family X86NativeAssembly) =
236 (nativePhysicalNativeEmit
237 (nativePhysicalNativeTest
238 (constructor X86NativeRegister64 X86NativeRDX)
239 (constructor X86NativeRegister64 X86NativeRDX))
240 (nativePhysicalNativeJumpCondition
241 (constructor X86NativeCondition X86NativeConditionZero)
242 b"memory-equal"
243 (nativePhysicalNativeLabel
244 b"memory-compare"
245 (nativePhysicalNativeEmit
246 (nativePhysicalNativeLoad8
247 (constructor X86NativeRegister64 X86NativeRAX)
248 (constructor X86NativeRegister64 X86NativeRDI)
249 nativePhysicalNativeD0)
250 (nativePhysicalNativeEmit
251 (nativePhysicalNativeLoad8
252 (constructor X86NativeRegister64 X86NativeRCX)
253 (constructor X86NativeRegister64 X86NativeRSI)
254 nativePhysicalNativeD0)
255 (nativePhysicalNativeEmit
256 (nativePhysicalNativeCompare
257 (constructor X86NativeRegister64 X86NativeRAX)
258 (constructor X86NativeRegister64 X86NativeRCX))
259 (nativePhysicalNativeJumpCondition
260 (constructor X86NativeCondition X86NativeConditionNotZero)
261 b"memory-different"
262 (nativePhysicalNativeEmit
263 (nativePhysicalNativeAddImmediate
264 (constructor X86NativeRegister64 X86NativeRDI)
265 (nativePhysicalNativeI32Byte (byte 1)))
266 (nativePhysicalNativeEmit
267 (nativePhysicalNativeAddImmediate
268 (constructor X86NativeRegister64 X86NativeRSI)
269 (nativePhysicalNativeI32Byte (byte 1)))
270 (nativePhysicalNativeEmit
271 (nativePhysicalNativeAddImmediate
272 (constructor X86NativeRegister64 X86NativeRDX)
273 nativePhysicalNativeI32NegativeOne)
274 (nativePhysicalNativeJumpCondition
275 (constructor X86NativeCondition X86NativeConditionNotZero)
276 b"memory-compare"
277 (nativePhysicalNativeLabel
278 b"memory-equal"
279 (nativePhysicalNativeEmit
280 (nativePhysicalNativeMoveImmediate32
281 (constructor X86NativeRegister64 X86NativeRAX)
282 (nativePhysicalNativeI32Byte (byte 1)))
283 (nativePhysicalNativeEmit
284 nativePhysicalNativeReturnInstruction
285 (nativePhysicalNativeLabel
286 b"memory-different"
287 (nativePhysicalNativeEmit
288 (constructor
289 X86NativeInstruction
290 X86NativeClear32
291 (constructor X86NativeRegister64 X86NativeRAX))
292 (nativePhysicalNativeEmit
293 nativePhysicalNativeReturnInstruction
294 (constructor X86NativeAssembly X86NativeAssemblyEnd))))))))))))))))))The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.