Hello,

I am looking at the file:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/sparc_hwcap1/common/gen/memset.s

>From the "/common/" in the path and the presence of %ncc in the code (is it, 
>as I guessed, a way to refer to %icc or %xcc depending on whether you are 
>compiling for 32 or 64 bits?), it looks like the code is meant to be used both 
>in 32 bit and 64 bit codes. However, almost the first instruction is a brnz 
>applied to the second argument of the function, which looks like it is 
>[b]not[/b] ignoring the garbage in the high 32 bits of that register. Could 
>you tell me what part I misunderstood?

The reason I am looking at this is that the testsuite of the mpfr library fails 
on T2 systems (but not on other sparcs) in 32 bits with solaris 10U7 (I don't 
think it has the optimized sun4v version of memset backported, but I don't have 
access to a machine to check) with recent versions of gcc, and the most obvious 
difference in the generated code is that old versions of gcc called 
memset(x,y,0) and new versions call memset(x,y,1<<32) (which should be the same 
if garbage in the high 32 bits is properly ignored).
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40757
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to