# common.i86.in - general include file for target assembler # # Copyright (C) 2002-2003 Gero Kuhlmann # # This program 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 2 of the License, or # any later version. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # $Id: common.i86,v 1.1 2003/03/09 00:43:08 gkminix Exp $ # #==================================================================== # # We use 16-bit 386 code # #ifdef i386 #undef i386 #endif .intel_syntax noprefix .arch i386 .code16 # #==================================================================== # # Include version and configuration header file # #ifndef __ASSEMBLY__ #define __ASSEMBLY__ #endif #include #ifdef HAVE_CONFIG_H #include #endif # #==================================================================== # # Some older versions of GAS dont produce correct opcodes for the # variants of movzx and movsx, where a 16-bit value gets expanded # into a 32-bit value. Those GAS versions have to use the data32 # prefix, and are identified by configure with NEED_DATA32. We define # macros here to allow for easy usage of these instructions. # # movzx32 macro # #ifdef NEED_DATA32 #define movzx32 data32 movzx #else #define movzx32 movzx #endif # # movsx32 macro # #ifdef NEED_DATA32 #define movsx32 data32 movsx #else #define movsx32 movsx #endif # # movsd32 macro # #ifdef NEED_DATA32 #define movsd32 data32 movsw #else #define movsd32 movsd #endif # #==================================================================== # # Define some external linker symbols. # .extern __text_end # end of text section .extern __data_start # start of data section .extern __data_end # end of data section .extern __bss_start # start of BSS section .extern __bss_end # end of BSS section # #==================================================================== #