Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.arch    |    Apparently more than just beeps & boops    |    131,241 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 129,607 of 131,241    |
|    EricP to Terje Mathisen    |
|    Re: Concedtina III May Be Returning    |
|    06 Sep 25 13:46:09    |
      From: ThatWouldBeTelling@thevillage.com              Terje Mathisen wrote:       > EricP wrote:       >>       >> The only instruction usage stats I have are from those VAX papers:       >> A Case Study of VAX-11 Instruction Set Usage For Compiler Execution, 1982       >>       >> That shows about 12% instructions are conditional branch and 9% CMP.       >> That says to me that almost all Bcc are paired with a CMP,       >> and very few use the flags set as a side effect of ALU ops.       >>       >> I would expect those two numbers to be closer as even today compilers       >> don't       >> know about those side effect flags and will always emit a CMP or TST       >> first.       >       > I know I have seen lots of examples of x86 compilers which used side       > effect flags, they are pretty much the standard idiom for decrementing       > loops or incrementing from negative start. The latter case is a common       > optimization which allows you to use the same register as the source       > index/indices and the destination index, along with the loop counter       > itself.       >       > Terje              My mistake. I haven't seen the MS C compiler do this and erroneously       assumed without checking that no one does it, perhaps due to portability       issues particularly for x86 with its asymmetric flags updates.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca