[M3commit] CVS Update: cm3

Jay jayk123 at hotmail.com
Tue Apr 15 10:53:12 CEST 2008


oops, this checkin comment has obvious errors regarding ge/le vs. gt/lt..hopefully the code does not :)
 
 - Jay



> Date: Tue, 15 Apr 2008 10:47:49 +0000> To: m3commit at elegosoft.com> From: jkrell at elego.de> Subject: [M3commit] CVS Update: cm3> > CVSROOT: /usr/cvs> Changes by: jkrell at birch. 08/04/15 10:47:49> > Modified files:> cm3/m3-sys/m3front/src/misc/: CG.m3 > > Log message:> Rewrite set_compare for sets that fit in an integer.> m3-sys/m3tests/src/p1/p155 passes.> More tests welcome.> The generated code is very large.> For example:> > 00401A87: 8B 1D 44 A0 45 00 mov ebx,dword ptr ds:[45A044h]> 00401A8D: 89 5D FC mov dword ptr [ebp-4],ebx> 00401A90: C7 45 F0 15 00 00 mov dword ptr [ebp-10h],15h> 00> 00401A97: 23 5D F0 and ebx,dword ptr [ebp-10h]> 00401A9A: 3B 5D FC cmp ebx,dword ptr [ebp-4]> 00401A9D: 0F 94 85 6C FF FF sete byte ptr [ebp-94h]> FF> 00401AA4: 33 DB xor ebx,ebx> 00401AA6: 8A 9D 6C FF FF FF mov bl,byte ptr [ebp-94h]> 00401AAC: 83 FB 00 cmp ebx,0> 00401AAF: 0F 94 85 68 FF FF sete byte ptr [ebp-98h]> FF> 00401AB6: 33 D2 xor edx,edx> 00401AB8: 8A 95 68 FF FF FF mov dl,byte ptr [ebp-98h]> > 00401ABE: 52 push edx> > for gt or lt, pushing the value at the end (specific to context, could> be a store)> > or for ge or le, one cmp instead of two:> > 0040195C: 89 5D F0 mov dword ptr [ebp-10h],ebx> 0040195F: C7 45 FC 15 00 00 mov dword ptr [ebp-4],15h> 00> 00401966: 23 5D FC and ebx,dword ptr [ebp-4]> 00401969: 3B 5D F0 cmp ebx,dword ptr [ebp-10h]> 0040196C: 0F 94 45 98 sete byte ptr [ebp-68h]> 00401970: 33 DB xor ebx,ebx> 00401972: 8A 5D 98 mov bl,byte ptr [ebp-68h]> 00401975: 83 FB 00 cmp ebx,0> 00401978: 0F 94 45 94 sete byte ptr [ebp-6Ch]> 0040197C: 33 D2 xor edx,edx> 0040197E: 8A 55 94 mov dl,byte ptr [ebp-6Ch]> 00401981: 52 push edx> > short circuiting to do one cmp sometimes for gt/lt would be typical,> but I didn't yet look into how to set that up.> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20080415/39df63f2/attachment-0002.html>


More information about the M3commit mailing list