fis-gtm/sr_arm/compswap.s

40 lines
974 B
ArmAsm

#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
.arch armv6
.fpu vfp
.text
.align 2
.global compswap
.type compswap, %function
compswap:
@ args = 4, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #28
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
str r3, [fp, #-28]
ldr r3, [fp, #-20]
str r3, [fp, #-8]
ldr r3, [fp, #-8]
add r3, r3, #17
str r3, [fp, #-8]
ldr r3, [fp, #-8]
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.size compswap, .-compswap