# HG changeset patch # User Kelly Wilson # Date 1238458950 21600 # Node ID 5e8f7ad442ba6b28822e7196fb581edcbfa14341 # Parent 204197eb9eb5f91db4dd7fc9d8d31e2cfb416872 Fix one more naked asm output problem for mingw32 and remove some duplicate code diff -r 204197eb9eb5 -r 5e8f7ad442ba gen/naked.cpp --- a/gen/naked.cpp Mon Mar 30 18:18:23 2009 -0600 +++ b/gen/naked.cpp Mon Mar 30 18:22:30 2009 -0600 @@ -167,30 +167,13 @@ asmstr << mangle << ":" << std::endl; } - /* - else - { - const char* linkage = "globl"; - std::string section = "text"; - if (DtoIsTemplateInstance(fd)) - { - linkage = "weak"; - tmpstr << "section\t.gnu.linkonce.t." << mangle << ",\"ax\",@progbits"; - section = tmpstr.str(); - } - asmstr << "\t." << section << std::endl; - asmstr << "\t.align\t16" << std::endl; - asmstr << "\t." << linkage << "\t" << mangle << std::endl; - asmstr << "\t.type\t" << mangle << ",@function" << std::endl; - asmstr << mangle << ":" << std::endl; - }*/ // emit body fd->fbody->toNakedIR(gIR); // emit size after body - // llvm does this on linux, but not on osx - if (global.params.os != OSMacOSX) + // llvm does this on linux, but not on osx or Win + if (global.params.os != OSMacOSX && global.params.os != OSWindows) { asmstr << "\t.size\t" << mangle << ", .-" << mangle << std::endl << std::endl; }