<html><head><base href="x-msg://446/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>That's a very good question. I suspect allocating register pairs as needed would make for a fairly difficult implementation. I would err on the side of simplicity for LONGINT code generation rather than complexity. You might easily just push/pop operands and return values on the stack, on the grounds that modern x86 hardware will do a good job renaming stack locations to registers. i.e., worry about correctness first and performance later.</div><div><br></div><div><div>On 22 Jan 2010, at 07:39, 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; ">Anyone have any thoughts on how to implement LONGINT on NT386?<br> <br><br>The code is setup to do pretty good constant folding and enregistration.<br> <br><br>I did the work so that constant folding should work for LONGINT.<br> <br><br>However I think doing good enregistration is maybe still<br>too much work. In particular, I think every LONGINT<br>operation will do a load, operation, store.<br>Typical of unoptimized code, but not typical<br>of the Modula-3/NT386 quality.</div></span></blockquote><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; "><br> <br>In particular, there is still this notion of an "operand"<br>that might be held in one register.<br><br> <br>I'd have to make it a register pair, or array of registers,<br>or invent "psuedo registers" that are register pairs.<br>An array of registers is the obvious best choice, but<br>none of these are a small change.<br> <br><br>96 occurences of "reg" in Stackx86.m3, 58 in M3x86.m3,<br>would probably all have to change.<br>63 in Codex86.m3 unsure.<br> It is the lowest level and might need to only deal with single<br> registers.<br><br> <br>Returning LONGINT from a function also needs separate attention.<br>Maybe I really should go ahead and use an array of registers?<br> <br><br> - Jay<br><br></div></span></blockquote></div><br></body></html>