<html><head><base href="x-msg://196/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'">You can't call the support function Long__Extract because we already have a Long__Extract in m3core/src/word. It is the library representative of the front-end compiler-generated (inlined) Long.Extract.</font></span></div></span></span></span></span></span></span></span></span></div></span></span>
</div>
<br><div><div>On 8 Mar 2010, at 07:30, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">diff attached<br> <br> <br>If folks really want to use tables or function calls here, let me know.<br> <br> <br>The data was historically problematic, though we worked out the problems.<br> - It was initialized at runtime which has a race condition, fixed years ago.<br> - It can't be "exported" on NT386 (which is the only platform that uses it) and must be statically linked.<br> <br>The data is still used by Word.Insert and Long.Insert is still a function, but those<br>are my next targets.<br> <br> <br>This is a case where the user does write a function call. Word.Extract or Long.Extract.<br>(So the function should have been called Long__Extract.)<br> <br> <br> - Jay<br> <br>> Date: Mon, 8 Mar 2010 13:26:36 +0000<br>> To:<span class="Apple-converted-space"> </span><a href="mailto:m3commit@elegosoft.com">m3commit@elegosoft.com</a><br>> From:<span class="Apple-converted-space"> </span><a href="mailto:jkrell@elego.de">jkrell@elego.de</a><br>> Subject: [M3commit] CVS Update: cm3<br>><span class="Apple-converted-space"> </span><br>> CVSROOT: /usr/cvs<br>> Changes by: jkrell@birch. 10/03/08 13:26:36<br>><span class="Apple-converted-space"> </span><br>> Modified files:<br>> cm3/m3-sys/m3back/src/: M3x86.m3 Stackx86.i3 Stackx86.m3<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Log message:<br>> "rewrite" extract to not use tables and always be inlined for 64bit<br>><span class="Apple-converted-space"> </span><br>> equivalent C code:<br>><span class="Apple-converted-space"> </span><br>> UT __stdcall extract(UT x, uint32 offset, uint32 count)<br>> {<br>> x >>= offset;<br>> x &= ~((~(UT)0) << count);<br>> return x;<br>> }<br>><span class="Apple-converted-space"> </span><br>> extract32<br>> 00000729: 8B4DEC MOV ECX tv.126[_m]<br>> 0000072C: 8B5DF4 MOV EBX tv.124[_a32]<br>> 0000072F: D3EB SHR EBX<br>> 00000731: 8BD1 MOV EDX ECX This is pointless and I'll try to remove.<br>> 00000733: 8B4DE4 MOV ECX tv.128[_n]<br>> 00000736: BEFFFFFFFF MOV ESI $4294967295 I'll look for smaller form of this. or esi -1?<br>> 0000073B: D3E6 SHL ESI<br>> 0000073D: F7D6 NOT ESI<br>> 0000073F: 23DE AND EBX ESI<br>><span class="Apple-converted-space"> </span><br>> extract64<br>> 000008E4: 8B4DD8 MOV ECX tv.134[_m]<br>> 000008E7: 8B5DE8 MOV EBX tv.131[_a64]<br>> 000008EA: 8B55EC MOV EDX tv.131[_a64]+4<br>> 000008ED: 0FADD3 SHRD EBX EDX ECX<br>> 000008F0: D3EA SHR EDX<br>> 000008F2: F6C120 TEST ECX $32<br>> 000008F5: 7400 JE rel8 L.107<br>> 000008F7: 8BDA MOV EBX EDX<br>> 000008F9: 33D2 XOR EDX EDX<br>> set_label L.107<br>> 000008FB: 8BF1 MOV ESI ECX This is pointless and I'll try to remove.<br>> 000008FD: 8B4DD0 MOV ECX tv.136[_n]<br>> 00000900: BFFFFFFFFF MOV EDI $4294967295 I'll look for smaller form of this. or edi -1?<br>> 00000905: B8FFFFFFFF MOV EAX $4294967295 I'll look for smaller form of this. (heck, at least mov edi, eax)<br>> 0000090A: 0FA5F8 SHLD EAX EDI ECX<br>> 0000090D: D3E7 SHL EDI<br>> 0000090F: F6C120 TEST ECX $32<br>> 00000912: 7400 JE rel8 L.108<br>> 00000914: 8BC7 MOV EAX EDI<br>> 00000916: 33FF XOR EDI EDI<br>> set_label L.108<br>> 00000918: F7D7 NOT EDI<br>> 0000091A: F7D0 NOT EAX<br>> 0000091C: 23DF AND EBX EDI<br>> 0000091E: 23D0 AND EDX EAX<br>><span class="Apple-converted-space"> </span><br>> having n or m and n (or just m? I think so.) be constant leads to better code<br>><span class="Apple-converted-space"> </span><br>> some other small cleanup, like avoiding calling find twice,<br>> I don't see why it was that way<br>><span class="Apple-converted-space"> </span><br><span><1.txt></span></div></span></blockquote></div><br></body></html>