ack/mach/arm/libem/mli.s

30 lines
369 B
ArmAsm
Raw Normal View History

1988-02-18 10:08:42 +00:00
.define .mli
.sect .text
.mli: LDMFD R12<,{R1,R2}
1990-11-12 17:09:15 +00:00
STMFD R12<,{R4}
1988-02-18 10:08:42 +00:00
MOV R3,#0
MOV R0,#0
CMP R1,#0
ADD.MI R3,R3,#1
RSB.MI R1,R1,#0
CMP R2,#0
ADD.MI R3,R3,#1
RSB.MI R2,R2,#0
CMP R1,R2
BLT 1F
MOV R4,R1
MOV R1,R2
MOV R2,R4
1:
TST R1,#1
ADD.NE R0,R0,R2
MOV R2,R2,LSL #1
MOV.S R1,R1,LSR #1
BNE 1B
TST R3,#1
RSB.NE R0,R0,#0
1990-11-12 17:09:15 +00:00
LDMFD R12<,{R4}
1988-02-18 10:08:42 +00:00
MOV R15,R14