Merge "Remove _memset16 and _memset32 from mips/mips64 bionic."
This commit is contained in:
		@@ -67,86 +67,6 @@
 | 
				
			|||||||
#define DBG
 | 
					#define DBG
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * void _memset16(uint16_t* dst, uint16_t value, size_t size);
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LEAF(_memset16,0)
 | 
					 | 
				
			||||||
	.set noreorder
 | 
					 | 
				
			||||||
DBG	/* Check parameters */
 | 
					 | 
				
			||||||
DBG	andi	t0,a0,1			# a0 must be halfword aligned
 | 
					 | 
				
			||||||
DBG	tne	t0,zero
 | 
					 | 
				
			||||||
DBG	andi	t2,a2,1			# a2 must be even
 | 
					 | 
				
			||||||
DBG	tne	t2,zero
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef FIXARGS
 | 
					 | 
				
			||||||
	# ensure count is even
 | 
					 | 
				
			||||||
#if (__mips==32) && (__mips_isa_rev>=2)
 | 
					 | 
				
			||||||
	ins	a2,zero,0,1
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	ori	a2,1
 | 
					 | 
				
			||||||
	xori	a2,1
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if (__mips==32) && (__mips_isa_rev>=2)
 | 
					 | 
				
			||||||
	ins	a1,a1,16,16
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	andi	a1,0xffff
 | 
					 | 
				
			||||||
	sll	t3,a1,16
 | 
					 | 
				
			||||||
	or	a1,t3
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	beqz	a2,.Ldone
 | 
					 | 
				
			||||||
	 andi	t1,a0,2
 | 
					 | 
				
			||||||
	beqz	t1,.Lalignok
 | 
					 | 
				
			||||||
	 addu	t0,a0,a2		# t0 is the "past the end" address
 | 
					 | 
				
			||||||
	sh	a1,0(a0)		# store one halfword to get aligned
 | 
					 | 
				
			||||||
	addu	a0,2
 | 
					 | 
				
			||||||
	subu	a2,2
 | 
					 | 
				
			||||||
.Lalignok:
 | 
					 | 
				
			||||||
	slti	t1,a2,4			# .Laligned for 4 or more bytes
 | 
					 | 
				
			||||||
	beqz	t1,.Laligned
 | 
					 | 
				
			||||||
	 sne	t1,a2,2			# one more halfword?
 | 
					 | 
				
			||||||
	bnez	t1,.Ldone
 | 
					 | 
				
			||||||
	 nop
 | 
					 | 
				
			||||||
	sh	a1,0(a0)
 | 
					 | 
				
			||||||
.Ldone:
 | 
					 | 
				
			||||||
	j	ra
 | 
					 | 
				
			||||||
	 nop
 | 
					 | 
				
			||||||
	.set reorder
 | 
					 | 
				
			||||||
END(_memset16)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * void _memset32(uint32_t* dst, uint32_t value, size_t size);
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LEAF(_memset32,0)
 | 
					 | 
				
			||||||
	.set noreorder
 | 
					 | 
				
			||||||
DBG	/* Check parameters */
 | 
					 | 
				
			||||||
DBG	andi	t0,a0,3			# a0 must be word aligned
 | 
					 | 
				
			||||||
DBG	tne	t0,zero
 | 
					 | 
				
			||||||
DBG	andi	t2,a2,3			# a2 must be a multiple of 4 bytes
 | 
					 | 
				
			||||||
DBG	tne	t2,zero
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef FIXARGS
 | 
					 | 
				
			||||||
	# ensure count is a multiple of 4
 | 
					 | 
				
			||||||
#if (__mips==32) && (__mips_isa_rev>=2)
 | 
					 | 
				
			||||||
	ins	$a2,$0,0,2
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	ori	a2,3
 | 
					 | 
				
			||||||
	xori	a2,3
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	bnez	a2,.Laligned		# any work to do?
 | 
					 | 
				
			||||||
	 addu	t0,a0,a2		# t0 is the "past the end" address
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	j	ra
 | 
					 | 
				
			||||||
	 nop
 | 
					 | 
				
			||||||
	.set reorder
 | 
					 | 
				
			||||||
END(_memset32)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LEAF(memset,0)
 | 
					LEAF(memset,0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	.set	noreorder
 | 
						.set	noreorder
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,86 +67,6 @@
 | 
				
			|||||||
#define DBG
 | 
					#define DBG
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * void _memset16(uint16_t* dst, uint16_t value, size_t size);
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LEAF(_memset16,0)
 | 
					 | 
				
			||||||
	.set noreorder
 | 
					 | 
				
			||||||
DBG	/* Check parameters */
 | 
					 | 
				
			||||||
DBG	andi	t0,a0,1			# a0 must be halfword aligned
 | 
					 | 
				
			||||||
DBG	tne	t0,zero
 | 
					 | 
				
			||||||
DBG	andi	t2,a2,1			# a2 must be even
 | 
					 | 
				
			||||||
DBG	tne	t2,zero
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef FIXARGS
 | 
					 | 
				
			||||||
	# ensure count is even
 | 
					 | 
				
			||||||
#if (__mips==32) && (__mips_isa_rev>=2)
 | 
					 | 
				
			||||||
	ins	a2,zero,0,1
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	ori	a2,1
 | 
					 | 
				
			||||||
	xori	a2,1
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if (__mips==32) && (__mips_isa_rev>=2)
 | 
					 | 
				
			||||||
	ins	a1,a1,16,16
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	andi	a1,0xffff
 | 
					 | 
				
			||||||
	sll	t3,a1,16
 | 
					 | 
				
			||||||
	or	a1,t3
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	beqz	a2,.Ldone
 | 
					 | 
				
			||||||
	 andi	t1,a0,2
 | 
					 | 
				
			||||||
	beqz	t1,.Lalignok
 | 
					 | 
				
			||||||
	 addu	t0,a0,a2		# t0 is the "past the end" address
 | 
					 | 
				
			||||||
	sh	a1,0(a0)		# store one halfword to get aligned
 | 
					 | 
				
			||||||
	addu	a0,2
 | 
					 | 
				
			||||||
	subu	a2,2
 | 
					 | 
				
			||||||
.Lalignok:
 | 
					 | 
				
			||||||
	slti	t1,a2,4			# .Laligned for 4 or more bytes
 | 
					 | 
				
			||||||
	beqz	t1,.Laligned
 | 
					 | 
				
			||||||
	 sne	t1,a2,2			# one more halfword?
 | 
					 | 
				
			||||||
	bnez	t1,.Ldone
 | 
					 | 
				
			||||||
	 nop
 | 
					 | 
				
			||||||
	sh	a1,0(a0)
 | 
					 | 
				
			||||||
.Ldone:
 | 
					 | 
				
			||||||
	j	ra
 | 
					 | 
				
			||||||
	 nop
 | 
					 | 
				
			||||||
	.set reorder
 | 
					 | 
				
			||||||
END(_memset16)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * void _memset32(uint32_t* dst, uint32_t value, size_t size);
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LEAF(_memset32,0)
 | 
					 | 
				
			||||||
	.set noreorder
 | 
					 | 
				
			||||||
DBG	/* Check parameters */
 | 
					 | 
				
			||||||
DBG	andi	t0,a0,3			# a0 must be word aligned
 | 
					 | 
				
			||||||
DBG	tne	t0,zero
 | 
					 | 
				
			||||||
DBG	andi	t2,a2,3			# a2 must be a multiple of 4 bytes
 | 
					 | 
				
			||||||
DBG	tne	t2,zero
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef FIXARGS
 | 
					 | 
				
			||||||
	# ensure count is a multiple of 4
 | 
					 | 
				
			||||||
#if (__mips==32) && (__mips_isa_rev>=2)
 | 
					 | 
				
			||||||
	ins	$a2,$0,0,2
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	ori	a2,3
 | 
					 | 
				
			||||||
	xori	a2,3
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	bnez	a2,.Laligned		# any work to do?
 | 
					 | 
				
			||||||
	 addu	t0,a0,a2		# t0 is the "past the end" address
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	j	ra
 | 
					 | 
				
			||||||
	 nop
 | 
					 | 
				
			||||||
	.set reorder
 | 
					 | 
				
			||||||
END(_memset32)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
LEAF(memset,0)
 | 
					LEAF(memset,0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	.set	noreorder
 | 
						.set	noreorder
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user