home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23664 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.7 KB  |  44 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
  3. From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
  4. Subject: Re: FP-emulator problem with smlnj-0.91
  5. Message-ID: <1993Jan11.211224.21192@klaava.Helsinki.FI>
  6. Organization: University of Helsinki
  7. References: <1993Jan11.191838.10819@odin.diku.dk>
  8. Date: Mon, 11 Jan 1993 21:12:24 GMT
  9. Lines: 33
  10.  
  11. In article <1993Jan11.191838.10819@odin.diku.dk> dingbat@diku.dk (Niels Skov Olsen) writes:
  12. >
  13. >  # smlnj
  14. >  Standard ML of New Jersey, Version 0.91, October 26, 1992
  15. >  This is an alpha version for Linux (built with Linux 0.98.1).
  16. >  val it = () : unit
  17. >  - 2.0; 
  18. >  Unimplemented FPU Opcode at eip=0003B144 : dc d4 (d0+4)
  19. >
  20. >  uncaught exception Div
  21.  
  22. Wow.  What are you (or rather smlnj) doing that results in that
  23. operation? The fp-operation DC D4 isn't a normal floating point
  24. instruction, although it does actually execute the "fcom st(4)"
  25. instruction on a real coprocessor.  The official code for "fcom st(4)"
  26. is D8 D4, and the DC D4 sequence shouldn't be used. 
  27.  
  28. It sounds like either:
  29.  - gas gives the wrong opcode for "fcom st(4)".  Not likely, as at
  30.    least the gas I use gives the correct D8 D4 sequence.
  31.  - the smlnj port doesn't know how to use assembler, and coded the
  32.    instructions directly in binary, and used the unofficial opcodes.
  33.    Does smlnj do this kind of thing?
  34.  - smlnj just contains some bug and happens to jump to an address that
  35.    countains garbage.  Unlikely, if this happened with different
  36.    versions. 
  37.  - smlnj does something else weird.
  38.  
  39. Anyway, it could be seen as a misfeature of the math emulator not to
  40. emulate the unofficial codes, so I'll look into it anyway.  But I'd
  41. suggest the smlnj people use the standard opcodes in any case. 
  42.  
  43.         Linus
  44.