Bugzilla – Bug 315462
[PATCH] use cmp DWORD PTR [eax], eax for null check
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by bmaurer@users.sf.net 2004-07-12 13:45:35 MST ---- Today we use the instruction: cmp DWORD PTR [eax], 0 to do a null check. This instuction is minimally encoded in three bytes. However, the instruction: cmp DWORD PTR [eax], eax Can be encoded in 2 bytes. I ran some benchmarks on my Pentium M and the two instructions had the same performance. Microsoft's jit emits the cmp DWORD PTR [eax], eax instruction. This patch lets us use the shorter form. ---- Additional Comments From bmaurer@users.sf.net 2004-07-12 13:46:02 MST ---- Created an attachment (id=166444) mini-cmp-dword-ptr-eax-eax.patch ---- Additional Comments From bmaurer@users.sf.net 2004-07-12 13:56:32 MST ---- its in Imported an attachment (id=166444) Unknown operating system unknown. Setting to default OS "Other".