[Bug target/8787] [Cygwin] GCC fails to emit .intel_syntax when invoked with the -masm=intel on DJGPP

killer.lightspeed@bigpond.com gcc-bugzilla@gcc.gnu.org
Mon Jun 9 19:34:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8787



------- Additional Comments From killer.lightspeed@bigpond.com  2003-06-09 19:34 -------
Subject: Re:  [Cygwin] GCC fails to emit .intel_syntax when
 invoked with the -masm=intel on DJGPP

pinskia@physics.uc.edu wrote:

>PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8787
>
>
>
>------- Additional Comments From pinskia@physics.uc.edu  2003-06-09 12:43 -------
>This is a real bug, looks like someone forgot to update config/i386/djgpp.h to print out 
>`.intel_syntax' when ix86_asm_dialect == ASM_INTEL is true like att.h, linux.h, and gas.h.
>This looks like it is easy to fix (I have not test this yet but can you?):
>
<snip>

It's 5 in the morning now. I've killed two birds with the one stone (so 
to say).
I tried it with GCC 3.2.2, with another small patch (for an ABI 
problem), and both problems were solved.
It now emits the .intel_syntax directive with -masm=intel, and it also 
correctly returns PCC structures, instead of REG structures by default.

Here's my diff (done under Linux). "djgpp.new" was created just for me 
to extract the old djgpp.h. Unfortunately, unzip did not set the 
modification time correctly, so I put it in by hand.

diff -u -d -b -w -u -p djgpp.old/gnu/gcc-3.22/gcc/config/i386/djgpp.h 
djgpp/gnu/gcc-3.22/gcc/config/i386/djgpp.h
--- djgpp.new/gnu/gcc-3.22/gcc/config/i386/djgpp.h    2003-03-04 21:10
+++ djgpp/gnu/gcc-3.22/gcc/config/i386/djgpp.h    2003-06-09 
23:10:36.000000000 +1000
@@ -137,6 +137,8 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_FILE_START
 #define ASM_FILE_START(FILE)                        \
   do {                                    \
+    if (ix86_asm_dialect == ASM_INTEL)                \
+      fputs ("\t.intel_syntax\n", FILE);                \
     output_file_directive (FILE, main_input_filename);        \
   } while (0)

@@ -258,6 +260,6 @@ do {                                \
 #undef DWARF_FRAME_REGNUM
 #define DWARF_FRAME_REGNUM(n) dbx_register_map[n]

-/* Don't default to pcc-struct-return, because gcc is the only compiler,
+/* Do default to pcc-struct-return, because gcc is the only compiler,
    and we want to retain compatibility with older gcc versions.  */
-#define DEFAULT_PCC_STRUCT_RETURN 0
+#define DEFAULT_PCC_STRUCT_RETURN 1



More information about the Gcc-bugs mailing list