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