|
1 |
| -# Externe Routinen zu ARILEV1.D |
2 |
| -# Prozessor: MIPS |
3 |
| -# Endianness: irrelevant |
4 |
| -# Compiler: GNU-C oder ... |
5 |
| -# Parameter passing conventions: |
6 |
| -# Arguments: |
7 |
| -# o32: in registers $4,$5,$6,$7, and on the stack 16($sp),... |
8 |
| -# n32: in registers $4,$5,$6,$7,$8,$9,$10,$11, and on the stack 4($sp),... |
9 |
| -# Return value register: |
10 |
| -# o32: $2 for a single word, $2,$3 for a 'long long'. |
11 |
| -# n32: $2 |
12 |
| -# Call-used registers (do not have to be preserved across function calls): |
13 |
| -# $2..$15, $24 |
14 |
| -# Settings: intCsize=32, intDsize=32. |
15 |
| -# Particularities: |
16 |
| -# After every load instruction a wait cycle is necessary, before the |
17 |
| -# fetched values may be used. |
18 |
| -# After branches and jumps, there is a delay slot. The assembler fills |
19 |
| -# it by pulling some instruction from before the jump (unless we use |
20 |
| -# the pseudo-op '.set noreorder' to disable this instruction reordering). |
| 1 | +/* -*- asm -*- |
| 2 | + * External routines for arilev1.d |
| 3 | + * Prozessor: MIPS |
| 4 | + * Endianness: irrelevant |
| 5 | + * Compiler: GNU-C compat |
| 6 | + * Parameter passing conventions: |
| 7 | + * Arguments: |
| 8 | + * o32: in registers $4,$5,$6,$7, and on the stack 16($sp),... |
| 9 | + * n32: in registers $4,$5,$6,$7,$8,$9,$10,$11, and on the stack 4($sp),... |
| 10 | + * Return value register: |
| 11 | + * o32: $2 for a single word, $2,$3 for a 'long long'. |
| 12 | + * n32: $2 |
| 13 | + * Call-used registers (do not have to be preserved across function calls): |
| 14 | + * $2..$15, $24 |
| 15 | + * Settings: intCsize=32, intDsize=32. |
| 16 | + * Particularities: |
| 17 | + * After every load instruction a wait cycle is necessary, before the |
| 18 | + * fetched values may be used. |
| 19 | + * After branches and jumps, there is a delay slot. The assembler fills |
| 20 | + * it by pulling some instruction from before the jump (unless we use |
| 21 | + * the pseudo-op '.set noreorder' to disable this instruction reordering). |
| 22 | + */ |
21 | 23 |
|
22 | 24 | #ifdef INCLUDED_FROM_C
|
23 | 25 |
|
@@ -621,11 +623,11 @@ asm_neg_loop_down:
|
621 | 623 | bnez $5,$Lnld1 # until (count==0)
|
622 | 624 | move $2,$0 # 0
|
623 | 625 | j $31 # return
|
624 |
| -$Lnld3: # erstes Digit /=0 gefunden, ab jetzt gibt's Carrys |
625 |
| - # 1 Digit negieren: |
| 626 | +$Lnld3: # found 1st digit /=0, now there are carrys |
| 627 | + # negate 1 digit: |
626 | 628 | subu $12,$0,$12 # x = -x
|
627 | 629 | sw $12,($4) # *ptr = x
|
628 |
| - # alle anderen Digits invertieren: |
| 630 | + # invert all other digits: |
629 | 631 | b $Lnld5
|
630 | 632 | $Lnld4: subu $4,4 # xptr--
|
631 | 633 | lw $12,($4) # x = *xptr
|
|
0 commit comments