> On 05.05.2014 12:16, Ole Streicher wrote: >> since a while, I am working to bring the IRAF package [1] into Debian >> [2]. I'd like to make the package working on as many Debian platforms >> as possible. >> >> The major problem here is that IRAF needs a small piece of assembler >> code that provides a (sort of) setjmp() to their Fortran variant.
Attached you'll find a patch against your zsvjmp.tar.gz test-case that adds mipsel support. This seems to work on my debian squeeze mipsel system, i.e. running 'make test' outputs: ./zzdebug Status = 0, step = 0 Calling zdojmp Status = 1, step = 1 All OK ./jmptest Status = 0 step = 0 Calling zdojmp Status = 1 step = 1 All OK STOP 0 cheers, David PS: forget my last comment WRT loading $t9 when jumping to PIC code: the mipsel linker (or assembler?) automatically adds such stub code for calls into PIC routines when ".abicalls" was enabled in the assembler source. -- GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk2.gpg Fingerprint: B63B 6AF2 4EEB F033 46F7 7F1D 935E 6F08 E457 205F
Index: zsvjmp/zsvjmp-mipsel.s =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ zsvjmp/zsvjmp-mipsel.s 2014-05-08 00:18:31.433683675 +0200 @@ -0,0 +1,19 @@ + .file "zsvjmp.s" + +# Copyright (c) 2014 David Kuehling <dvdkhlng AT posteo TOD de> +# Distributable under the same license as IRAF +# This file contains the Linux mipsel version of ZSVJMP for Debian. + + .set mips1 + .abicalls + .text + .global zsvjmp_ + .type zsvjmp_, %function + +zsvjmp_: + sw $a1, 0($a0) # buf[0]=status + sw $zero, 0($a1) # *status=0 + addiu $a0, $a0, 4 # &buf[1] --> 1st arg for sigsetjmp + move $a1, $zero # 2nd arg is zero; this opcode fills delay slot + j __sigsetjmp # jump to sigsetjmp + ## note: no delay slot, filled by GAS reordering instructions above
pgp2nf_W6sHxY.pgp
Description: PGP signature