[PATCH v4][C][ADA] use function descriptors instead of trampolines in C

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Dec 20 13:29:00 GMT 2018

Hi Martin,

> There is a similar mechanism for pointer-to-member-functions
> used by C++. Is this correct on aarch64?

/* By default, the C++ compiler will use the lowest bit of the pointer
   to function to indicate a pointer-to-member-function points to a
   virtual member function.  However, if FUNCTION_BOUNDARY indicates
   function addresses aren't always even, the lowest bit of the delta
   field will be used.  */
   ? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)

AArch64 overrides this like Arm to ptrmemfunc_vbit_in_delta.

But yes that's yet another example of GCC using the wrong default.
The assumption that FUNCTION_BOUNDARY implies no use of low
bits is simply false - a generic default should be safe for all targets
(and if that's not possible, there should not be a default).


More information about the Gcc-patches mailing list