	.section	.text
	.global	mmap
	.syntax	divided
mmap:
	.ifdef	NetBSD
	mov	ip, #0
	str	ip, [sp, #4]
	swi	#10485957	@ 10485760 + mmap system call number
	.else
	stmdb	sp!, {r4, r5, r7, lr}
	ldr	r4, [sp]
	ldr	r5, [sp, #4]
	mov	r5, r5, lsr #12	@ R5 = R% / 4096
	mov	r7, #192	@ mmap system call number
	swi	#0
	ldm	sp!, {r4, r5, r7, pc}
	.endif
