Analog Devices EE-128 DSP in C++ Calling Assembly Class Member Functions Application Note

introduces how to call assembly class member functions in C++


Analog Devices EE-128 DSP in C++ Calling Assembly Class Member Functions Application Note - cover page
Brand
Analog Devices
Category
Other Electronics
Document type
Application Note
Language
English
Pages
5
File format
PDF
File size
173 KB
Published
03 August, 2012
Updated
01 October, 2023
MD5 checksum
AE2DD5A3544DE2E87BB63781538F65A1

About this manual

This application note addresses the challenges of writing C++ callable assembly code, specifically focusing on name mangling and accessing class instance information. It provides a scheme to preserve the simplicity of standard C calls within a C++ environment. The document details how the C++ compiler modifies function names to differentiate parameters and explains the mechanism of passing the 'this' pointer in assembly routines.

What's inside

  • Name mangling
  • Parameter passing
  • Class instance access
  • Assembly code implementation
  • Memory layout
  • Inheritance

Frequently asked questions

What is the primary reason for name mangling in C++?

The primary reason is so the compiler can differentiate between different member functions with the same name based on their parameters.

How is the 'this' pointer passed in a C++ member function?

The 'this' pointer is passed in the R4 register, while other parameters start in the R8 register.

Where is the return argument of a function placed?

The return argument of a function is always placed in the R0 register.

Download PDF (173 KB)

More Analog Devices Manuals


View all Analog Devices manuals →