home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / lisp / lispnews / text0247.txt < prev    next >
Encoding:
Text File  |  1985-11-10  |  854 b   |  28 lines

  1.  
  2. If (vseti vector index expression) gets open coded by the compiler,
  3. the resulting value is the value of index, not the value of expression.
  4. This also holds for vseti-byte and vseti-word.
  5.  
  6. The problem is in d_vset in vector.l.  The code which builds the return
  7. value for immediate vectors assumes that the value of expression is in
  8. index-reg, but it never gets put there.
  9.  
  10. One solution would be to change the lines
  11.  
  12.          (if g-loc
  13.              then  (if (eq type 'byte)
  14.  
  15. (occuring about 3/4 of the way through d_vset) to
  16.          (if g-loc
  17.              then (setq temp (cadr (assq type '((byte cvtbl)
  18.                                                 (word cvtwl)
  19.                                                 (long movl)))))
  20.                   (e-write3 temp vect-val index-reg)
  21.  
  22.                   (if (eq type 'byte)
  23.  
  24. Mark Bromley
  25. bromley@cornell
  26.  
  27.  
  28.