From: SeokYeon Hwang <syeon.hwang@samsung.com>
To: 'Peter Maydell' <peter.maydell@linaro.org>
Cc: 'QEMU Developers' <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in #ifdef
Date: Mon, 03 Nov 2014 17:18:35 +0900 [thread overview]
Message-ID: <00d701cff73e$c395a130$4ac0e390$@samsung.com> (raw)
In-Reply-To: <CAFEAcA8sn3oAKgamMrRipgVe06K2+UBWm2ekZk8Sr-1xaBZODg@mail.gmail.com>
I posted a new patch which your suggestion is applied.
Thanks.
> -----Original Message-----
> From: Peter Maydell [mailto:peter.maydell@linaro.org]
> Sent: Saturday, November 01, 2014 3:30 AM
> To: SeokYeon Hwang
> Cc: QEMU Developers
> Subject: Re: [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in
> #ifdef
>
> On 31 October 2014 04:59, SeokYeon Hwang <syeon.hwang@samsung.com> wrote:
> > Moved map_exec() and wrapped it in #ifdef to avoid "-Wunused-function"
> on clang 3.4 or later.
> >
> > Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
>
> I had this kind of on my todo list too, but I didn't much like the nested
> ifdefs which are really only because of what the different implementations
> of alloc_code_gen_buffer() happen to do. I think it would be more robust
> to just mark the functions with the 'unused' attribute instead of relying
> on 'inline' to implicitly do this for us:
>
> --- a/translate-all.c
> +++ b/translate-all.c
> @@ -270,14 +270,14 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t
> retaddr) }
>
> #ifdef _WIN32
> -static inline void map_exec(void *addr, long size)
> +static __attribute__((unused)) void map_exec(void *addr, long size)
> {
> DWORD old_protect;
> VirtualProtect(addr, size,
> PAGE_EXECUTE_READWRITE, &old_protect); } #else -static
> inline void map_exec(void *addr, long size)
> +static __attribute__((unused)) void map_exec(void *addr, long size)
> {
> unsigned long start, end, page_size;
>
> thanks
> -- PMM
next prev parent reply other threads:[~2014-11-03 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 4:59 [Qemu-devel] [PATCH] translate-all: wrapped map_exec() in #ifdef SeokYeon Hwang
2014-10-31 18:30 ` Peter Maydell
2014-11-03 8:18 ` SeokYeon Hwang [this message]
2014-11-03 9:16 ` Michael Tokarev
2014-11-03 12:25 ` Peter Maydell
2014-11-03 14:27 ` Michael Tokarev
2014-11-03 15:05 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00d701cff73e$c395a130$4ac0e390$@samsung.com' \
--to=syeon.hwang@samsung.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.