qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_E


From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register
Date: Thu, 18 Aug 2016 07:46:43 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 08/18/2016 07:14 AM, Peter Maydell wrote:
On 18 August 2016 at 15:04, Richard Henderson <address@hidden> wrote:
or (2) ifunc

While we're on the subject, can somebody explain to me why we
use ifuncs at all? I couldn't work out why it would be better than
just using a straightforward function pointer -- when I tried single
stepping through things the ifunc approach still seemed to indirect
through some table or other so it wasn't actually resolving to
a direct function call anyway.

No reason, I suppose.

It's particularly helpful for libraries, where we don't really want the overhead of the initialization when it's not used.

But (1) we don't have many of these and (2) we really don't care *that* much about startup time.

So a simple function pointer initialized by a constructor has the same effect.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]