From: Sam S. <sd...@gn...> - 2009-07-02 17:08:02
|
Raymond Toy wrote: >> nothing has been done, sorry. > Ok. I'll see what I can do. thanks. >> maybe a simple patch to arisparc64 would do? >> e.g., something like >> >> --- arisparc64.d.~1.6.~ 2007-12-05 11:06:32.000000000 -0500 >> +++ arisparc64.d 2009-07-02 12:15:12.000657000 -0400 >> @@ -77,7 +77,7 @@ C(mulu16_:) # Input in %o0,%o1, Output i >> # 2^32*hi+lo := arg1*arg2. >> C(mulu32_:) # Input in %o0,%o1, Output in %o0,%g1 >> umul %o0,%o1,%o2 >> - rd %y,%g1 >> + rd %y,%o1 >> retl >> _ srl %o2,0,%o0 >> >> > Hmm. Wouldn't you have to change all callers too, so it knows the > second result is no longer in g1, but in o1, as normally expected? yes. so you also need --- arisparc.d.~1.8.~ 2007-12-05 11:06:32.000000000 -0500 +++ arisparc.d 2009-07-02 13:04:52.000523000 -0400 @@ -104,7 +104,7 @@ C(mulu32_:) # Input in %o0,%o1, Output i #ifdef sparcv8 umul %o0,%o1,%o0 retl - _ rd %y,%g1 + _ rd %y,%o1 #else mov %o1,%y sra %o0,31,%o3 # Wartetakt, nötig z.B. für SUN SPARCstation IPC @@ -143,7 +143,7 @@ C(mulu32_:) # Input in %o0,%o1, Output i mulscc %o2,%o0,%o2 mulscc %o2,%g0,%o2 and %o3,%o1,%o3 # %o3 = (0 falls %o0>=0, %o1 falls %o0<0) - add %o2,%o3,%g1 # hi + add %o2,%o3,%o1 # hi retl _ rd %y,%o0 # lo #endif and --- arilev0.d.~1.24.~ 2007-12-13 17:27:48.000000000 -0500 +++ arilev0.d 2009-07-02 13:06:01.000730000 -0400 @@ -357,7 +357,7 @@ #if defined(MC680X0) || defined(SPARC) || defined(SPARC64) || defined(ARM) || (defined(I80386) && !defined(BORLAND)) || defined(MIPS) || defined(HPPA) || defined(VAX) # mulu32_ extern in Assembler #if defined(SPARC) || defined(SPARC64) - #define mulu32_high (uint32)(_get_g1()) # Rückgabe im Register %g1 + #define mulu32_high (uint32)(_get_o1()) # Rückgabe im Register %g1 #elif defined(LISPARIT) && !defined(HPPA) # In arihppa.d ist mulu32_high bereits definiert. global uint32 mulu32_high; #endif and also you need to define _get_o1 similar to _get_g1. or maybe replace the latter with the former. or maybe ... |