diff options
Diffstat (limited to 'libc/arch-mips64/string/memset.S')
-rw-r--r-- | libc/arch-mips64/string/memset.S | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/libc/arch-mips64/string/memset.S b/libc/arch-mips64/string/memset.S index 3e630ca..09b756b 100644 --- a/libc/arch-mips64/string/memset.S +++ b/libc/arch-mips64/string/memset.S @@ -67,86 +67,6 @@ #define DBG #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) .set noreorder |