File: anulbug.s

package info (click to toggle)
tkisem 4.5.12-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 964 kB
  • ctags: 1,372
  • sloc: cpp: 4,844; tcl: 3,047; asm: 1,991; makefile: 335; ansic: 269; sh: 155
file content (34 lines) | stat: -rw-r--r-- 709 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

        .data
a:      .word   0xA000
f:      .word   0x1

        .text
        set     a, %r1          ! Variablen laden
        ld      [%r1], %r1
        set     f, %r3
        ld      [%r3], %r2

        mov     %r0, %y         ! y-Register auf null setzen
	nop
	nop
	nop
        inc     %r1

        ba      test
loop:   deccc   %r1

test:   bg    loop            ! ????
        umul    %r1, %r2, %r2   ! ????

check:  mov     %y, %r4         ! gab es ein overflow? 
                                !(ist y-Register immer noch null?)
        cmp     %r4, 0
        be      store
        nop     

        sub     %r0, 1, %r2
        
store:  st      %r2, [%r3]
        ta      0