[PATCH v2 5/8] mips: Add C implementation of memcpy/memset

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Jul 2 15:20:48 GMT 2025



On 02/07/25 10:49, Jovan Dmitrovic wrote:
> On 18. 6. 25. 23:00, Adhemerval Zanella Netto wrote:
>> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>
>>
>> On 18/06/25 11:33, Jovan Dmitrovic wrote:
>>> Add improved C implementation of memcpy/memset and remove corresponding
>>> .S files.
>>>
>>> Cherry-picked 6b74133706246af94b71e4154e4ca09482828c9f
>>> from https://github.com/MIPS/glibc
>>>
>>> Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com>
>>> Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
>>> Signed-off-by: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
>>
>> This build fails with:
>>
>> [...]/build/mipsel-linux-gnu/string/memcpy.o
>> ../sysdeps/mips/memcpy.c:78:6: error: "__mips_isa_rev" is not defined, evaluates to 0 [-Werror=undef]
>>     78 | #if (__mips_isa_rev < 6 && !defined(__mips1)) || defined(__nanomips__)
>>        |      ^~~~~~~~~~~~~~
>> ../sysdeps/mips/memcpy.c:86:6: error: "__mips_isa_rev" is not defined, evaluates to 0 [-Werror=undef]
>>     86 |  #if __mips_isa_rev >= 6 && !defined(__nanomips__)
>>        |      ^~~~~~~~~~~~~~
>> cc1: all warnings being treated as errors
>>
>> You need to include <sysdep.h>.
> 
> Hello Adhemerval,
> unfortunately, I haven't been able to reproduce this error, may I know 
> how you are building
> glibc?

With a toolchain built from build-many-glibc.py.  It defaults to a quite
old mips release:

$ mips64el-glibc-linux-gnu-gcc -E -dD - < /dev/null  | grep _mips
#define __mips__ 1
#define _mips 1
#define __mips64 1
#define __mips_fpr 64
#define __mips 3
#define __mips_hard_float 1
#define __mips_abicalls 1
#define __mips_no_lxc1_sxc1 1
#define __mips_no_madd4 1
#define __mips_compact_branches_never 1
#define __mips_strict_alignment 1


More information about the Libc-alpha mailing list