public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sstsoft at wp dot pl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/65898] New: GCC puts auto generated code between two asm volatile(".intel_syntax"); and asm volatile(".att_syntax"); globally syntaxed rather than not put or change it's syntax Date: Sun, 26 Apr 2015 22:50:00 -0000 [thread overview] Message-ID: <bug-65898-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65898 Bug ID: 65898 Summary: GCC puts auto generated code between two asm volatile(".intel_syntax"); and asm volatile(".att_syntax"); globally syntaxed rather than not put or change it's syntax Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: sstsoft at wp dot pl Target Milestone: --- GCC put's code between asm volatile statements ended by new line asm(".intel_syntax noprefix\n"); asm("mov eax,eax\n"); asm(".att_syntax\n"); so it's "auto generated" code is not well recognized by linker(?) /APP # 515 "../../../some.cpp" 1 .intel_syntax noprefix # 0 "" 2 .loc 2 519 0 /NO_APP leal -44(%ebp), %eax #, tmp80 /APP # 519 "../../../some.cpp" 1 mov eax,%eax; # tmp80 # 0 "" 2 # 519 "../../../some.cpp" 1 .att_syntax /NO_APP When i write code without "\n" it's the same. I need to write in one asm(); 1. GCC/GAS is not intuitive as could it be. Think it's little bug but then it's some kind of blocker! 2. When im forced to add .intel_syntax + code + .att_syntax at end there is a problem with global flag -masm=intel and mixed syntaxes. When .att code is mixed with intel asembly code global compiler flag could be easy detected by #ifdef __INTEL_ASM and preprocessor so make decision of #ifdef my .intel_syntaxed code with or without pre .intel statements. But if code is mixed and pre stetemented i can't undef (change back to default syntax) because rest of the auto generated GCC code would be ruined and not recognized. If those statements are in one line asm() i must undef whole code either, and this is specially when asm is in #define macro() because i can't put # in macro body. When i wrote asm volatile("att_syntax"); GCC sometimes put's some code before it formated with global syntax flag and... you know what next: "no such instruction: "
next reply other threads:[~2015-04-26 22:50 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-26 22:50 sstsoft at wp dot pl [this message] 2015-04-26 22:56 ` [Bug inline-asm/65898] " sstsoft at wp dot pl 2015-04-26 23:16 ` pinskia at gcc dot gnu.org 2015-04-30 21:53 ` sstsoft at wp dot pl 2015-05-01 7:08 ` schwab@linux-m68k.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65898-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).