New Video Tutorial: Assembly Language Output from gcc/g++

Released Today! Our newest video tutorial, Inspecting the Assembly Language Output from gcc/g++, is now available for your viewing pleasure at the following link:

Link:  Inspecting the Assembly Language Output from gcc/g++

You can look at the assembly language output from the gcc/g++ compiler to see what kind of code the compiler generates for your C++ source without linking or running your code.

For an example to show how the assembler listing can be used, we’ll look at the assembly language generated when compiling the following C++ snippet and try to answer the question, “Does the gcc/g++ compiler apply the Return Value Optimization (RVO) when compiling with optimization level zero (gcc -O0)?”

    class BigClass
    {
    public:
        char a[1000000];
    };

    BigClass getData(int a, int b)
    {
        return BigClass();  // opportunity for RVO
    }

    void testFunction(void)
    {
        BigClass myData = getData(1, 2);
    }

In this 20-minute video tutorial, we’ll discuss:

  • How the Return Value Optimization works
  • How to get an assembly language listing from the compiler
  • How to make sense of mangled names
  • Find where the stack frames are created and local stack space allocated
  • Addressing local data on the stack
  • Function call convention

 


Comments

One response to “New Video Tutorial: Assembly Language Output from gcc/g++”

  1. B Rehart Avatar
    B Rehart

    Nice tutorials. You have a real knack for teaching.