Eliminated gratuitous file duplication between FreeBSD and Linux

This commit is contained in:
fur%netscape.com 1999-02-28 00:28:26 +00:00
Родитель 1e864b32fa
Коммит 35449fdac8
4 изменённых файлов: 50 добавлений и 4 удалений

Просмотреть файл

@ -19,10 +19,8 @@
#ifndef _MD_X86_ASM_H_
#define _MD_X86_ASM_H_
#if defined(LINUX)
#include "x86LinuxAsm.h"
#elif defined(FREEBSD)
#include "x86FreeBSDAsm.h"
#ifndef WIN32
#include "x86Asm_gas.h"
#endif
#endif /* _MD_X86_ASM_H_ */

Просмотреть файл

@ -0,0 +1,48 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef _MD_X86ASM_GAS_H_
#define _MD_X86ASM_GAS_H_
#define SYMBOL_NAME_STR(name) #name
#define SYMBOL_NAME(name) name
#define SYMBOL_NAME_LABEL(name) CAT(name,:)
#if !defined(__i486__) && !defined(__i586__)
#define ALIGN .align 4,0x90
#define ALIGN_STR ".align 4,0x90"
#else /* __i486__/__i586__ */
#define ALIGN .align 16,0x90
#define ALIGN_STR ".align 16,0x90"
#endif /* __i486__/__i586__ */
#define STATIC_ENTRY(name) \
ALIGN; \
SYMBOL_NAME_LABEL(name)
#define GLOBAL_ENTRY(name) \
.globl SYMBOL_NAME(name); \
STATIC_ENTRY(name)
#define END_ENTRY(name) \
SYMBOL_NAME_LABEL(CAT(.L,name)); \
.size SYMBOL_NAME(name),SYMBOL_NAME(CAT(.L,name))-SYMBOL_NAME(name)
#define TEXT_SEGMENT .text
#define DATA_SEGMENT .data
#endif /* _MD_X86ASM_GAS_H_ */

Просмотреть файл

Просмотреть файл