Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 27 Oct 2012 15:01:40 -0500 From: Chris Hinsley Newsgroups: comp.lang.forth Date: Sat, 27 Oct 2012 21:01:40 +0100 Message-ID: <2012102721014029342-chrishinsley@gmailcom> References: <2012102715594849117-chrishinsley@gmailcom> <201210271603106615-chrishinsley@gmailcom> <1315f2d4-5da9-42dc-af23-d7d7a9f9018b@l12g2000vbj.googlegroups.com> <9335db0c-143e-48cb-b306-1e8dc4c9851a@i8g2000vbq.googlegroups.com> <2012102720334580907-chrishinsley@gmailcom> <1f2aecc9-e7d4-4d05-922b-35210414fb4c@w2g2000vbc.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: well formed flag ? User-Agent: Unison/2.1.9 Lines: 32 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-iSBUA4NV2NBqGABZ8HgQs7ybSfs0mxdJrjZFNhZVWow0c/CILMyOkNPjABAxTVFVn80FA2hgQ0zgRKM!P3msaS0z3lRO+kuqpwrLT1zMhgxNCYNnMdT8N2ByRWwhGpK4OAv1SfqxmQI7H/xxoTYcWvQ= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2551 Xref: csiph.com comp.lang.forth:16788 On 2012-10-27 19:52:02 +0000, Alex McDonald said: > On Oct 27, 8:33 pm, Chris Hinsley wrote: >>> : < ( 2 -- 1 ) >>> \ ' nseopt compiles; code=$4014DF len=9 type=1 >>> \ defined in src\kernel\gkernel32.f at line 574 >>> ( $0 )    sub     dword { $0 ebp } eax              \ 294500 >>> ( $3 )    cdq                                       \ 99 >>> ( $4 )    mov     eax edx                           \ 8BC2 >>> ( $6 )    add     ebp $4                            \ 83C504 >>> ( $9 )    ret                                       \ C3 ( end ) ok >> >> Here your wringting back the result of the subtract to [ebp], which is >> not required, wasting memory bandwidth. Why not change it to a 'cmp >> [ebp], eax' ? > > That doesn't set EAX, just the flags, so CDQ generates the wrong sign > in EDX. SUB is required. > >> >> I like the trick with cdq ! Neat ! >> >> Chris > > Ignore it anyway. It fails the Hsyes core tests due to overflow & an > incorrect sign on maximum sized 32bit integers. Phew ! I was getting jelous and starting to wonder why I picked ebx as top of stack rather than eax ! ;) Chris