[PATCH v5 0/6] Add support for LoongArch32

mengqinggang mengqinggang@loongson.cn
Tue Mar 3 11:28:29 GMT 2026


在 2026/3/3 18:11, Xi Ruoyao 写道:
> On Tue, 2026-03-03 at 17:54 +0800, mengqinggang wrote:
>> LoongArch64 gcc generates call memset to fully zero-filling the struct.
>> But LoongArch32 gcc not generate call memset.
>> Maybe we can fix LoongArch32 gcc to resolve this problem.
> This is not a compiler bug so there's nothing to be fixed in the
> compiler.  In C using = {...} to initialize a struct with automatic
> storage duration will leave the padding bits unspecified, unless the
> initializer is empty.
>
> See https://gcc.gnu.org/PR104607 which has been resolved as invalid
> years ago.

According to what you said, loongarch64 gcc should not generate call 
memset assembly code?



More information about the Libc-alpha mailing list