{"id":65,"date":"2011-03-30T22:04:12","date_gmt":"2011-03-30T22:04:12","guid":{"rendered":"http:\/\/www.millermattson.com\/dave\/?p=65"},"modified":"2020-01-13T20:33:55","modified_gmt":"2020-01-13T20:33:55","slug":"new-video-tutorial-assembly-language-output-from-gccg","status":"publish","type":"post","link":"https:\/\/millermattson.com\/dave\/?p=65","title":{"rendered":"New Video Tutorial: Assembly Language Output from gcc\/g++"},"content":{"rendered":"<p>Released Today! Our newest video tutorial, <em>Inspecting the Assembly Language Output from gcc\/g++<\/em>, is now available for your viewing pleasure at the following link:<\/p>\n<p>Link:&nbsp; <a href=\"http:\/\/vimeo.com\/21720824\" target=\"_blank\" rel=\"noopener noreferrer\">Inspecting the Assembly Language Output from gcc\/g++<\/a><\/p>\n<p>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.<\/p>\n<p>For an example to show how the assembler listing can be used, we&#8217;ll look at the assembly language generated when compiling the following C++ snippet and try to answer the question, &#8220;Does the gcc\/g++ compiler apply the Return Value Optimization (RVO) when compiling with optimization level zero (gcc -O0)?&#8221;<\/p>\n<pre>    class BigClass\n    {\n    public:\n        char a[1000000];\n    };\n\n    BigClass getData(int a, int b)\n    {\n        return BigClass();  \/\/ opportunity for RVO\n    }\n\n    void testFunction(void)\n    {\n        BigClass myData = getData(1, 2);\n    }<\/pre>\n<p>In this 20-minute video tutorial, we&#8217;ll discuss:<\/p>\n<ul>\n<li>How the Return Value Optimization works<\/li>\n<li>How to get an assembly language listing from the compiler<\/li>\n<li>How to make sense of mangled names<\/li>\n<li>Find where the stack frames are created and local stack space allocated<\/li>\n<li>Addressing local data on the stack<\/li>\n<li>Function call convention<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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:&nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,12],"tags":[14,7,17,16,6,18,19,9,15],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-cpp","category-tutorials","tag-assembly-language","tag-c","tag-g","tag-gcc","tag-programming","tag-return-value-optimization","tag-rvo","tag-tutorial","tag-x86"],"_links":{"self":[{"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":16,"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":386,"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/386"}],"wp:attachment":[{"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/millermattson.com\/dave\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}