Add assembly.h for use in .S files.

llvm-svn: 85263
This commit is contained in:
Daniel Dunbar 2009-10-27 17:49:50 +00:00
parent 805c49408f
commit 7d50478889
61 changed files with 120 additions and 4 deletions

View File

@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
Dependencies := $(wildcard $(Dir)/*.h)
Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// double __adddf3vfp(double a, double b) { return a + b; }

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __addsf3vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern uint64_t __bswapdi2(uint64_t);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern uint32_t __bswapsi2(uint32_t);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __divdf3vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __divsf3vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __eqdf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __eqsf2vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __extendsfdf2vfp(float a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __fixdfsivfp(double a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __fixsfsivfp(float a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern unsigned int __fixunsdfsivfp(double a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern unsigned int __fixunssfsivfp(float a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __floatsidfvfp(int a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __floatsisfvfp(int a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __floatunssidfvfp(unsigned int a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __floatunssisfvfp(unsigned int a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __gedf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __gesf2vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __gtdf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __gtsf2vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __ledf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __lesf2vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __ltdf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __ltsf2vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __muldf3vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __mulsf3vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __nedf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __negdf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __negsf2vfp(float a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __nesf2vfp(float a, float b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern double __subdf3vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __subsf3vfp(float a, float b);

View File

@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// When compiling switch statements in thumb mode, the compiler
// can use these __switch* helper functions The compiler emits a blx to

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern float __truncdfsf2vfp(double a);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __unorddf2vfp(double a, double b);

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __unordsf2vfp(float a, float b);

View File

@ -0,0 +1,42 @@
/* ===-- assembly.h - compiler-rt assembler support macros -----------------===
*
* The LLVM Compiler Infrastructure
*
* This file is distributed under the University of Illinois Open Source
* License. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
* This file defines macros for use in compiler-rt assembler source.
* This file is not part of the interface of this library.
*
* ===----------------------------------------------------------------------===
*/
#ifndef COMPILERRT_ASSEMBLY_H
#define COMPILERRT_ASSEMBLY_H
// Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use
// USER_LABEL_PREFIX directly because of cpp brokenness.
#if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__)
#define SYMBOL_NAME(name) name
#define SEPARATOR @
#else
#define SYMBOL_NAME(name) _##name
#define SEPARATOR ;
#endif
#define DEFINE_COMPILERRT_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
.private_extern SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#endif /* COMPILERRT_ASSEMBLY_H */

View File

@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
Dependencies := $(wildcard $(Dir)/*.h)
Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// di_int __ashldi3(di_int input, int count);
// This routine has some extra memory traffic, loading the 64-bit input via two

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// di_int __ashrdi3(di_int input, int count);
#ifdef __i386__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// di_int __divdi3(di_int a, di_int b);
// result = a / b.

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// double __floatundidf(du_int a);
#ifdef __i386__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// float __floatdisf(di_int a);
// This routine has some extra memory traffic, loading the 64-bit input via two

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// float __floatdixf(di_int a);
#ifdef __i386__

View File

@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
// double __floatundidf(du_int a);
#ifdef __i386__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// float __floatundisf(du_int a);
// Note that there is a hardware instruction, fildll, that does most of what

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// long double __floatundixf(du_int a);16
#ifdef __i386__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// di_int __lshrdi3(di_int input, int count);
// This routine has some extra memory traffic, loading the 64-bit input via two

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// di_int __moddi3(di_int a, di_int b);
// result = remainder of a / b.

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// di_int __muldi3(di_int a, di_int b);
#ifdef __i386__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// du_int __udivdi3(du_int a, du_int b);
// result = a / b.

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// du_int __umoddi3(du_int a, du_int b);
// result = remainder of a / b.

View File

@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
Dependencies := $(wildcard $(Dir)/*.h)
Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// Helper function used by compiler to restore ppc floating point registers at

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// Helper function used by compiler to save ppc floating point registers in

View File

@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
Dependencies := $(wildcard $(Dir)/*.h)
Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk

View File

@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
// double __floatundidf(du_int a);
#ifdef __x86_64__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// float __floatundisf(du_int a);
#ifdef __x86_64__

View File

@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
#include "../assembly.h"
// long double __floatundixf(du_int a);
#ifdef __x86_64__