ack/mach/arm/libem/csab.s

58 lines
671 B
ArmAsm
Raw Normal View History

1990-11-12 17:09:15 +00:00
.define _Csa, _Csb
.sect.text
_Csa:
LDMFD R12<, {R0}
LDMFD R12<, {R1}
STMFD R12<, {R4}
LDR R2, [R0, #4]
MOV R4,R2
LDR R3, [R0, #8]
CMP R1,R2
BLT 1F
ADD R2,R2,R3
CMP R1,R2
BGT 1F
ADD R2, R0, #12
SUB R1,R1,R4
ADD R2, R2, R1, LSL #2
LDR R2, [R2]
CMP R2, #0
BAL 2F
1:
LDR R2, [R0]
CMP R2, #0
2:
BNE 3F
BAL.L _CasErr
3:
LDMFD R12<,{R4}
MOV R15,R14
_Csb:
LDMFD R12<, {R0}
LDMFD R12<, {R1}
STMFD R12<,{R4}
LDR R2, [R0, #4]
LDR R3, [R0]
ADD R0, R0, #8
1:
CMP R2, #0
BEQ 3F
LDR R4, [R0]
CMP R4, R1
BNE 2F
LDR R3, [R0, #4]
BAL 3F
2:
ADD R0, R0, #8
SUB R2,R2,#1
BAL 1B
3:
CMP R3, #0
BNE 4F
BAL.L _CasErr
4:
LDMFD R12<,{R4}
MOV R15, R14