swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compaq(DEC) Tru64 UNIX - passed the tests!


From: Marcus G. Daniels
Subject: Re: Compaq(DEC) Tru64 UNIX - passed the tests!
Date: 29 Jan 2001 22:46:58 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "WN" == W Northcott <address@hidden> writes:

WN> We did much so and resorted to a line of assembler

Great!

WN> which I am happy to say is not empirically determined. 

And you're using simulation?  ;-)

WN> There is one aspect of the code I don't like.  It relies on res to
WN> point somewhere sensible. 

More worrisome is that it writes to that location...

Anyway, this should do it:

Index: sendmsg.c
===================================================================
RCS file: /cvs/hive/Swarm/swarm/libobjc/sendmsg.c,v
retrieving revision 1.9
diff -c -r1.9 sendmsg.c
*** sendmsg.c   2001/01/23 00:41:34     1.9
--- sendmsg.c   2001/01/30 06:41:26
***************
*** 514,534 ****
  __objc_double_forward (id rcv, SEL op, ...)
  {
    void *args, *res;
  
    args = __builtin_apply_args ();
    res = __objc_forward (rcv, op, args);
  #ifndef __alpha__
    __builtin_return (res);
  #else
!   /* Emprically determined -- very fragile! -mgd */
!   {
!     const char *type = sel_get_type (op);
! 
!     if (*type == _C_FLT)
!       return ((float *) res)[38];
!     else
!       return ((double *) res)[19];
!   }
  #endif
  }
  
--- 514,531 ----
  __objc_double_forward (id rcv, SEL op, ...)
  {
    void *args, *res;
+ #ifdef __alpha__
+   double ret;
+   double *retPtr = &ret;
+ #endif
  
    args = __builtin_apply_args ();
    res = __objc_forward (rcv, op, args);
  #ifndef __alpha__
    __builtin_return (res);
  #else
!   asm ("stt $f0 ,%0" : "=g" (*retPtr));
!   return ret;
  #endif
  }
  


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]