[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1b9db13b-ebe9-70f7-bc79-b608d8906a4b@cn.fujitsu.com>
Date: Fri, 11 Jan 2019 11:40:53 +0800
From: Cao jin <caoj.fnst@...fujitsu.com>
To: <x86@...nel.org>, <linux-kernel@...r.kernel.org>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<hpa@...or.com>
Subject: Re: [PATCH] x86/boot: drop memset from copy.S
On 1/8/19 4:46 PM, Cao jin wrote:
> One more question: in compressed/, for mem*(), it seems we both use the
> macros of boot/string.h, and the functions of compressed/string.c. Is
> that what we want?
>
> compressed/ is compiled with -O2, so it cannot be told by objdump -d,
> but still can be confirmed by nm <*.o>, for example:
>
> $nm arch/x86/boot/compressed/eboot.o
> U memcpy
> U memset
>
> $nm arch/x86/boot/compressed/pgtable_64.o
> # No entry of mem*()
>
> both of eboot.c and pgtable_64.c #include "../string.h", and use some of
> mem*(), it is counter-intuitive to me. Very appreciate it someone can
> leave a hint.
>
Well, I think HPA's previous answer is also suitable for this question,
with -O2, sometimes __builtin_mem*() is optimized as inline code, while
sometimes just emit a call to corresponding self-defined mem*() functions.
--
Sincerely,
Cao jin
Powered by blists - more mailing lists