home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / m68k / 1386 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  2.3 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!emory!tridom!mwr
  2. From: mwr@eng.tridom.com (Mark Reardon)
  3. Newsgroups: comp.sys.m68k
  4. Subject: Re: 68020 MOVEA vs LEA
  5. Message-ID: <By104L.K3v@tridom.com>
  6. Date: 20 Nov 92 17:48:21 GMT
  7. References: <1992Nov17.190823.1347@brtph560.bnr.ca>
  8. Sender: news@tridom.com
  9. Reply-To: mwr@eng.tridom.com (Mark Reardon)
  10. Distribution: na
  11. Organization: AT&T Tridom; Marietta, Georgia
  12. Lines: 40
  13. Nntp-Posting-Host: tridom.eng.tridom.com
  14.  
  15. In article <1992Nov17.190823.1347@brtph560.bnr.ca>, scottb@brtph690.bnr.ca (Scott Brasington P870) writes:
  16. |> The instruction timing section of the motorola 68020
  17. |> user's manual seems to indicate that a MOVEA immediate
  18. |> is faster than an LEA, and that in one case the LEA.W is
  19. |> slower than an LEA.L.  Can anybody verify this?
  20. |>                                 -best-    -cache-    -worst-
  21. |> MOVEA.W       #<data>.w,An     0(0/0/0)   4(0/0/0)   3(0/1/0)
  22. |> LEA           #<data>.w,An     4(0/0/0)   4(0/0/0)   6(0/2/0)
  23. |> 
  24. |> MOVEA.L       #<data>.l,An     0(0/0/0)   6(0/0/0)   5(0/1/0)
  25. |> LEA           #<data>.l,An     3(0/0/0)   6(0/0/0)   7(0/2/0)
  26. |> 
  27. Note that the # signs on the LEA instructions are in error.
  28.  
  29. Verify, no.  Accept, yes.  LEA instructions are able to do address
  30. computation.  Even if that is not required is not unacceptable 
  31. that it would possibly take longer to perform than a MOVEA.
  32. I have noticed that the compiler writers have noticed this and
  33. use the MOVEA instruction whenever possible.
  34.  
  35. As for the difference between the best LEA.W and LEA.L.  This
  36. is probably because the LEA.W instruction requires an extend of
  37. the word to be done.  After all, address registers can't load
  38. just a word.  This means that the LEA.L in the best case has
  39. the data ready to go and just slaps it into the register.
  40. The LEA,W on the other hand must sign extend it first, ALWAYS.
  41.  
  42. |> Scott Brasington          scottb@bnr.ca
  43. |> BNR INC                   Phone: 919-991-8217
  44. |> RTP, NC 27709             Fax:   919-991-8369
  45.  
  46. -- 
  47. Mark
  48.  
  49. ---------------------------------------------------------------------
  50. | Mark Reardon           |  AT&T Tridom                             |
  51. | mwr@eng.tridom.com     |  840 Franklin Court                      |
  52. |                        |  Marietta, GA 30067                      |
  53. ---------------------------------------------------------------------
  54.  
  55.