Ignore:
Timestamp:
May 24, 2008, 3:44:03 AM (11 years ago)
Author:
rme
Message:

x862-i386-ff-call: when a foreign function returns a floating point result,
pop it from the x87 stack and put it into fp0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/compiler/X86/x862.lisp

    r9583 r9586  
    92409240    (when vreg
    92419241      (cond ((eq resultspec :void) (<- nil))
    9242             ;; the ffcall subprim copies st[0] into fp0 for us
    9243             ;; so that we don't have to worry about the x87 fpu stack
     9242            ;; Floating-point results are returned on the x87 stack.
    92449243            ((eq resultspec :double-float)
    9245              (<- ($ x8632::fp0 :class :fpr :mode :double-float)))
     9244             (let ((fpreg ($ x8632::fp0 :class :fpr :mode :double-float)))
     9245               (! fp-stack-to-double fpreg)
     9246               (<- fpreg)))
    92469247            ((eq resultspec :single-float)
    9247              (<- ($ x8632::fp0 :class :fpr :mode :single-float)))
     9248             (let ((fpreg ($ x8632::fp0 :class :fpr :mode :single-float)))
     9249               (! fp-stack-to-single fpreg)
     9250               (<- fpreg)))
    92489251            ((eq resultspec :unsigned-doubleword)
    92499252             (ensuring-node-target (target vreg)
Note: See TracChangeset for help on using the changeset viewer.