NetBSD-Bugs archive

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

port-powerpc/43009: lib/libc/arch/powerpc64/gen/__sigsetjmp14.S uses lmd/stmd macros

>Number:         43009
>Category:       port-powerpc
>Synopsis:       lib/libc/arch/powerpc64/gen/__sigsetjmp14.S uses lmd/stmd 
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-powerpc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 19 11:30:00 +0000 2010
>Originator:     Dennis Ferguson
>Release:        very recent 5.99.24
NetBSD 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Sun Mar 
14 17:25:30 HKT 2010
I've been working through problems building with the
current powerpc64 support by doing macppc64 builds and
attempting to repair what I find.  When it attempts to
assemble lib/libc/arch/powerpc64/gen/__sigsetjmp14.S it
gets this:

#   compile  libc/__sigsetjmp14.o
-I/usr/src/lib/libc/arch/powerpc64 -nostdinc -idirafter 
/usr/src/obj/destdir.macppc/usr/include  -fstack-protector -Wstack-protector 
--param ssp-buffer-size=1  -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT 
-DHESIOD -DINET6 -DNLS -DYP -I/usr/src/lib/libc/include -I/usr/src/lib/libc 
-I/usr/src/sys -I/usr/src/lib/libc/compat/stdlib 
-D__DBINTERFACE_PRIVATE -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn 
-I/usr/src/lib/libc/gdtoa -DNO_FENV_H -I/usr/src/lib/libc/arch/powerpc64/gdtoa 
-isystem /usr/src/obj/destdir.macppc/usr/include -c -traditional-cpp    
 ib/libc/arch/powerpc64/gen/__sigsetjmp14.S -o __sigsetjmp14.o
/usr/src/lib/libc/arch/powerpc64/gen/__sigsetjmp14.S: Assembler messages:
/usr/src/lib/libc/arch/powerpc64/gen/__sigsetjmp14.S:25: Error: Unrecognized 
opcode: `stmd'
/usr/src/lib/libc/arch/powerpc64/gen/__sigsetjmp14.S:30: Error: Unrecognized 
opcode: `lmd'

*** Failed target:  __sigsetjmp14.o

stmd and lmd are macros which are defined in the kernel environment
(i.e. #ifdef _KERNEL) only.
Do a:

    MACHINE=macppc64 ./ distribution
Replace them with equivalent code.  Both __setjmp14.S and
_setjmp.S had the same problem at some point, and were fixed
by different people at different times in different ways.  This
patch attempts to fix __sigsetjmp14.S in a manner equivalent
to _setjmp.S:

Index: __sigsetjmp14.S
RCS file: /cvsroot/src/lib/libc/arch/powerpc64/gen/__sigsetjmp14.S,v
retrieving revision 1.1
diff -u -r1.1 __sigsetjmp14.S
--- __sigsetjmp14.S     7 Jul 2006 21:07:35 -0000       1.1
+++ __sigsetjmp14.S     19 Mar 2010 09:10:01 -0000
@@ -22,12 +22,20 @@
        mfcr    %r12
        mr      %r10,%r1
        mr      %r9,%r2
-       stmd    7, 0(%r6)               # save r7-r31
+       i = 0
+       .rept   32-7
+       std     7+i,i*8(%r6)            # save r7-r31
+       i = i + 1
+       .endr
        li      %r3,0
-       lmd     7,0(%r3)                # load r7-r31
+       i = 0
+       .rept   32-7
+       ld      7+i,i*8(%r3)            # load r7-r31
+       i = i + 1
+       .endr
        mr      %r6,%r4
        mtlr    %r11
        mtcr    %r12

Home | Main Index | Thread Index | Old Index