home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / m68k / 1332 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!corton!loria!loria.crin.fr!eker
  2. From: eker@loria.crin.fr (Steven Eker)
  3. Newsgroups: comp.sys.m68k
  4. Subject: Re: 68000, Fast 14 Bit Shift?
  5. Message-ID: <569@muller.loria.fr>
  6. Date: 6 Nov 92 11:10:27 GMT
  7. References: <memo.723415@cix.compulink.co.uk> <1992Nov4.175727.6305@jato.jpl.nasa.gov>
  8. Sender: news@news.loria.fr
  9. Organization: CRIN (CNRS) Nancy - INRIA Lorraine
  10. Lines: 25
  11.  
  12. In article <1992Nov4.175727.6305@jato.jpl.nasa.gov>, jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
  13. |> >    [a tad more source deleted]
  14. |> >
  15. |> >>   move.b  (a3)+,d0            ; encoded line length (first byte)
  16. |> 
  17. |>      EXT.W D0
  18. |> 
  19. |> >>   move.b  table(pc,d0.w),d0   ; decoded line length (can't be -ve!)
  20. |> >>   adda.w  d0,a2               ; number of bytes extracted (flags not changed)
  21. |> >
  22. |> >            Why do you do add.w ? Surely the file could be >65K. i know
  23. |> >            d0 is word size, but you still need all 32 bits ??. e.g if
  24. |> >            a2 has $0000EFFF and you add 2 bytes as a word you'll lose the
  25. |> >            carry.
  26. |> 
  27. |> Am I being presumptuous here or is it no big deal that D0 is not sign extended
  28. |> to a word?
  29.  
  30. Assuming that the table starts at 0 (and that was implicit in the
  31. original unoptimised code) we are dealing with unsigned chars and
  32. it is _wrong_ to sign extend because we would end up accessing elements such
  33. as table[-128] rather than table[128]. The top 3 bytes of d0 are zero'd
  34. once in the intialization code (deleted) and stay zero'd throughout the routine.
  35.  
  36. Steven
  37.