Annotation of OpenXM_contrib2/asir2018/asm/sparc.c-cc, Revision 1.1
1.1 ! noro 1: /* OpenXM */
! 2: addpadic(mod,n,n1,n2)
! 3: register int mod;
! 4: int n;
! 5: register int *n1,*n2;
! 6: {
! 7: register int i,carry,tmp;
! 8:
! 9: for ( i = 0, carry = 0; i < n; i++,n1++,n2++ ) {
! 10: asm(" ld [%i2],%o0 ");
! 11: asm(" ld [%i3],%l7 ");
! 12: asm(" add %o0,%l7,%l7 ");
! 13: asm(" add %l7,%i4,%l7 ");
! 14: asm(" mov %i0,%o1 ");
! 15: asm(" call .udr,2 ");
! 16: asm(" mov %l7,%o0 ");
! 17:
! 18: asm(" mov %o1,%i4 ");
! 19: asm(" st %o0,[%i3] ");
! 20: /*
! 21: tmp = *n1 + *n2 + carry;
! 22: carry = tmp / mod;
! 23: *n2 = tmp - ( carry * mod );
! 24: */
! 25: }
! 26: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>