This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[VxWorks] Use elfos.h for i586-wrs-vxworks


VxWorks currently uses the definition of ASM_OUTPUT_ASCII in i386/att.h,
which outputs the strings using byte pseudo-ops instead of string
pseudo-ops.  A lot of string-matching tests fail because of this.
Rather than skip them all on VxWorks, or add complicated comment code
to i386/att.h, I thought it would be better to use string pseudo-ops
instead.

RTEMS already uses the sequence "i386/att.h elfos.h", so I tried using
it on VxWorks too.  The -dM output for i386.o showed that only three
macros changed:

  - ASM_OUTPUT_ASCII
      The object of the exercise.

  - ASM_OUTPUT_INTERNAL_LABEL
      The new definition is equivalent to the old one.

  - ASM_OUTPUT_SKIP
      att.h uses ".set .,.+foo" while elfos.h uses ".zero foo".

I wondered whether elfos.h had been deliberately avoided in an attempt
to be compatible with the Diab assembler.  However, neither version of
ASM_OUTPUT_SKIP works with Diab, and more basic things like the .section
pseudo-ops don't either.  There's no hope of assembling either the
before-patch or after-patch code with Diab.

Tested on i586-wrs-vxworks.  OK to install?

Richard


gcc/
	* config.gcc (i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add
	elfos.h to tm_file.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 122834)
+++ gcc/config.gcc	(working copy)
@@ -1317,7 +1317,7 @@ i[34567]86-*-sysv4*)		# Intel 80386's ru
 	use_fixproto=yes
 	;;
 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
-	tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/att.h vx-common.h"
+	tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/att.h elfos.h vx-common.h"
 	case ${target} in
 	  *-vxworksae*)
 	    tm_file="${tm_file} vxworksae.h i386/vxworksae.h"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]