home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11684 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!pacbell.com!tandem!UB.com!quack!dfox
  3. From: dfox@quack.sac.ca.us (David Fox)
  4. Subject: Relatively long cycle time in 486 LOOP instruction
  5. Message-ID: <fWFHrqe@quack.sac.ca.us>
  6. Keywords: 486 LOOP instruction cycle
  7. Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'.
  8. Date: 16 Dec 1992 06:02:51 UTC
  9. Lines: 25
  10.  
  11. Hi.  This is my first posting to this newsgroup.
  12.  
  13. I and others on a different network have had an ongoing thread about
  14. 386/486 assembler programming in general.  One has posted recently
  15. that the 486's LOOP and JMP [E]CX instructions seem to take an
  16. inordinately long time, compared to other instructions that branch.
  17.  
  18. I don't have a 486 hardware manual, so I cannot be absolutely sure
  19. of the timings, but apparently the LOOP instruction seems to eat
  20. at least 3 cycles more than we think it should.
  21.  
  22. At most, the various parts of a LOOP instruction (decrementing the
  23. ECX register, testing against zero) should only take maybe two
  24. clocks.  However, the information I got on the clock timings for
  25. LOOP consumes about three cycles in addition to the time we think
  26. the decrement, test, and jump take.
  27.  
  28. Is the 486 doing anything special in a LOOP instruction to justify
  29. these three extra cycles?  Specifically, is it doing something extra
  30. with the flag register to ensure that the flags don't get modified
  31. in the process?
  32. --
  33. David Fox
  34. dfox@quack.sac.ca.us
  35.  
  36.