29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Using</strong> <strong>the</strong> Inline and Embedded Assemblers of <strong>the</strong> <strong>ARM</strong> <strong>Compiler</strong><br />

7.43 __mcall_offsetof_vbase(D, f)<br />

Where D is a class type and f is a nonstatic member function defined in a virtual base class of D,<br />

in o<strong>the</strong>r words __mcall_is_in_vbase(D,f) returns {TRUE}.<br />

__mcall_offsetof_vbase() returns <strong>the</strong> negative offset from <strong>the</strong> value of <strong>the</strong> vtable pointer of <strong>the</strong><br />

vtable slot that holds <strong>the</strong> base offset (from <strong>the</strong> beginning of a D object to <strong>the</strong> start of <strong>the</strong> base that<br />

f is defined in).<br />

The base offset is <strong>the</strong> this adjustment necessary when making a call to f with a pointer to a D.<br />

Note<br />

The offset returns a positive number that <strong>the</strong>n has to be subtracted from <strong>the</strong> value of <strong>the</strong> vtable<br />

pointer.<br />

7.43.1 See also<br />

Tasks<br />

• Calling a nonvirtual member function on page 7-54<br />

• Calling a virtual member function on page 7-55.<br />

Concepts<br />

• <strong>Compiler</strong>-supported keywords <strong>for</strong> calling class member functions in embedded assembler<br />

on page 7-47.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 7-50<br />

ID061811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!