3 # Some misc routines for Allegrex MIPS
4 # (c) Copyright 2007, Grazvydas "notaz" Ignotas
13 .globl memset32 # int *dest, int c, int count
18 beqz $t0, ms32_bloop_prep
28 srl $t0, $a2, 4 # we will do 64 bytes per iteration (cache line)
29 beqz $t0, ms32_bloop_end
33 cache 0x18, ($a0) # create dirty exclusive
68 .globl memset32_uncached # int *dest, int c, int count
71 srl $t0, $a2, 3 # we will do 32 bytes per iteration
72 beqz $t0, ms32u_bloop_end
89 beqz $a2, ms32u_return
102 .globl memcpy32 # int *dest, int *src, int count
107 beqz $t0, mc32_bloop_prep
112 beqz $a2, mc32_return
118 srl $t0, $a2, 4 # we will do 64 bytes per iteration (cache line)
119 beqz $t0, mc32_bloop_end
123 cache 0x18, ($a0) # create dirty exclusive
162 beqz $a2, mc32_return