MIPS: Unify memcpy.S and memcpy-inatomic.S
We can save the 451 lines of code that comprise memcpy-inatomic.S at the expense of a single instruction in the memcpy prolog. We also use an additional register (t6), so this may cause increased register pressure in some places as well. But I think the reduced maintenance burden, of not having two nearly identical implementations, makes it worth it. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
914f848077
commit
bb0757ebb9
@@ -687,7 +687,7 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
|
||||
__MODULE_JAL(__copy_user) \
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
|
||||
: \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
|
||||
DADDI_SCRATCH, "memory"); \
|
||||
__cu_len_r; \
|
||||
})
|
||||
@@ -797,7 +797,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
|
||||
".set\treorder" \
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
|
||||
: \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
|
||||
DADDI_SCRATCH, "memory"); \
|
||||
__cu_len_r; \
|
||||
})
|
||||
@@ -820,7 +820,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
|
||||
".set\treorder" \
|
||||
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
|
||||
: \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
|
||||
: "$8", "$9", "$10", "$11", "$12", "$14", "$15", "$24", "$31", \
|
||||
DADDI_SCRATCH, "memory"); \
|
||||
__cu_len_r; \
|
||||
})
|
||||
|
Reference in New Issue
Block a user