* config/te-nacl.h: New file.
* config/tc-i386.h [TE_NACL] (ELF_TARGET_FORMAT): Define for this case.
* config/tc-i386.c [TE_NACL] (i386_comment_chars, PREFIX_SEPARATOR):
Use TE_GNU et al case for TE_NACL too.
+2012-01-23 Roland McGrath <mcgrathr@google.com>
+
+ * configure.tgt (i386-*-nacl*): Match it.
+ * config/te-nacl.h: New file.
+ * config/tc-i386.h [TE_NACL] (ELF_TARGET_FORMAT): Define for this case.
+ * config/tc-i386.c [TE_NACL] (i386_comment_chars, PREFIX_SEPARATOR):
+ Use TE_GNU et al case for TE_NACL too.
+
2012-01-20 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (_i386_insn): Replace disp32_encoding with
|| ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
&& !defined (TE_GNU) \
&& !defined (TE_LINUX) \
- && !defined (TE_NETWARE) \
+ && !defined (TE_NACL) \
+ && !defined (TE_NETWARE) \
&& !defined (TE_FreeBSD) \
&& !defined (TE_DragonFly) \
&& !defined (TE_NetBSD)))
encoding. */
if (mnem_p - 2 == dot_p && dot_p[1] == 's')
i.swap_operand = 1;
- else if (mnem_p - 3 == dot_p
+ else if (mnem_p - 3 == dot_p
&& dot_p[1] == 'd'
&& dot_p[2] == '8')
i.disp_encoding = disp_encoding_8bit;
- else if (mnem_p - 4 == dot_p
+ else if (mnem_p - 4 == dot_p
&& dot_p[1] == 'd'
&& dot_p[2] == '3'
&& dot_p[3] == '2')
vex_reg = op + 1;
}
else
- {
+ {
/* There are only 2 operands. */
gas_assert (op < 2 && i.operands == 2);
vex_reg = 1;
fprintf (stream, "%s\n", message);
p = start;
left = size - (start - message) - len - 2;
-
+
gas_assert (left >= 0);
p = mempcpy (p, name, len);
/* tc-i386.h -- Header file for tc-i386.c
Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define ELF_TARGET_FORMAT64 "elf64-x86-64-freebsd"
#elif defined (TE_VXWORKS)
#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
+#elif defined (TE_NACL)
+#define ELF_TARGET_FORMAT "elf32-i386-nacl"
#endif
#ifdef TE_SOLARIS
/* This expression evaluates to true if the relocation is for a local
object for which we still want to do the relocation at runtime.
False if we are willing to perform this relocation while building
- the .o file. GOTOFF and GOT32 do not need to be checked here because
+ the .o file. GOTOFF and GOT32 do not need to be checked here because
they are not pcrel. .*/
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
--- /dev/null
+/* Copyright 2012 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3,
+ or (at your option) any later version.
+
+ GAS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#define TE_NACL
+#define LOCAL_LABELS_FB 1
+
+#include "obj-format.h"
# em emulation; identifies the config/te-* files
# Optional output shell variables; these are not always set:
-# arch the default architecture; sets DEFAULT_ARCH on some systems
+# arch the default architecture; sets DEFAULT_ARCH on some systems
# endian "big" or "little"; used on bi-endian systems
cpu_type=
hppa*) cpu_type=hppa ;;
i[3-7]86) cpu_type=i386 arch=i386;;
ia64) cpu_type=ia64 ;;
- ip2k) cpu_type=ip2k endian=big ;;
- iq2000) cpu_type=iq2000 endian=big ;;
+ ip2k) cpu_type=ip2k endian=big ;;
+ iq2000) cpu_type=iq2000 endian=big ;;
lm32) cpu_type=lm32 ;;
m32c) cpu_type=m32c endian=little ;;
m32r) cpu_type=m32r endian=big ;;
i386-*-elf) fmt=elf ;;
i386-*-kaos*) fmt=elf ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
+ i386-*-nacl*) fmt=elf em=nacl ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsdpe*) fmt=coff em=pe ;;
i386-*-netbsd*-gnu* | \