mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
Remove duplicate copy of int_lib.h, and update test script to find copy inside lib/.
Also, fix some brokenness in the test script w.r.t REMOTE. llvm-svn: 85260
This commit is contained in:
parent
10bf19ec7a
commit
247687360f
@ -1,4 +1,4 @@
|
||||
/* ===-- endianness.h - configuration header for libgcc replacement --------===
|
||||
/* ===-- endianness.h - configuration header for compiler-rt ---------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
*
|
||||
@ -7,7 +7,7 @@
|
||||
*
|
||||
* ===----------------------------------------------------------------------===
|
||||
*
|
||||
* This file is a configuration header for libgcc replacement.
|
||||
* This file is a configuration header for compiler-rt.
|
||||
* This file is not part of the interface of this library.
|
||||
*
|
||||
* ===----------------------------------------------------------------------===
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* ===-- int_lib.h - configuration header for libgcc replacement -----------===
|
||||
/* ===-- int_lib.h - configuration header for compiler-rt -----------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
*
|
||||
@ -7,7 +7,7 @@
|
||||
*
|
||||
* ===----------------------------------------------------------------------===
|
||||
*
|
||||
* This file is a configuration header for libgcc replacement.
|
||||
* This file is a configuration header for compiler-rt.
|
||||
* This file is not part of the interface of this library.
|
||||
*
|
||||
* ===----------------------------------------------------------------------===
|
||||
@ -98,6 +98,20 @@ typedef union
|
||||
}s;
|
||||
} utwords;
|
||||
|
||||
static inline ti_int make_ti(di_int h, di_int l) {
|
||||
twords r;
|
||||
r.s.high = h;
|
||||
r.s.low = l;
|
||||
return r.all;
|
||||
}
|
||||
|
||||
static inline tu_int make_tu(du_int h, du_int l) {
|
||||
utwords r;
|
||||
r.s.high = h;
|
||||
r.s.low = l;
|
||||
return r.all;
|
||||
}
|
||||
|
||||
#endif /* __x86_64 */
|
||||
|
||||
typedef union
|
||||
|
@ -1,159 +0,0 @@
|
||||
/* ===-- int_lib.h - configuration header for libgcc replacement -----------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
*
|
||||
* This file is distributed under the University of Illinois Open Source
|
||||
* License. See LICENSE.TXT for details.
|
||||
*
|
||||
* ===----------------------------------------------------------------------===
|
||||
*
|
||||
* This file is a configuration header for libgcc replacement.
|
||||
* This file is not part of the interface of this library.
|
||||
*
|
||||
* ===----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef INT_LIB_H
|
||||
#define INT_LIB_H
|
||||
|
||||
/* Assumption: signed integral is 2's complement */
|
||||
/* Assumption: right shift of signed negative is arithmetic shift */
|
||||
|
||||
#include <limits.h>
|
||||
#include "endianness.h"
|
||||
#include <math.h>
|
||||
|
||||
#if !defined(INFINITY) && defined(HUGE_VAL)
|
||||
#define INFINITY HUGE_VAL
|
||||
#endif /* INFINITY */
|
||||
|
||||
typedef int si_int;
|
||||
typedef unsigned su_int;
|
||||
|
||||
typedef long long di_int;
|
||||
typedef unsigned long long du_int;
|
||||
|
||||
typedef union
|
||||
{
|
||||
di_int all;
|
||||
struct
|
||||
{
|
||||
#if _YUGA_LITTLE_ENDIAN
|
||||
su_int low;
|
||||
si_int high;
|
||||
#else
|
||||
si_int high;
|
||||
su_int low;
|
||||
#endif /* _YUGA_LITTLE_ENDIAN */
|
||||
}s;
|
||||
} dwords;
|
||||
|
||||
typedef union
|
||||
{
|
||||
du_int all;
|
||||
struct
|
||||
{
|
||||
#if _YUGA_LITTLE_ENDIAN
|
||||
su_int low;
|
||||
su_int high;
|
||||
#else
|
||||
su_int high;
|
||||
su_int low;
|
||||
#endif /* _YUGA_LITTLE_ENDIAN */
|
||||
}s;
|
||||
} udwords;
|
||||
|
||||
#if __x86_64
|
||||
|
||||
typedef int ti_int __attribute__ ((mode (TI)));
|
||||
typedef unsigned tu_int __attribute__ ((mode (TI)));
|
||||
|
||||
typedef union
|
||||
{
|
||||
ti_int all;
|
||||
struct
|
||||
{
|
||||
#if _YUGA_LITTLE_ENDIAN
|
||||
du_int low;
|
||||
di_int high;
|
||||
#else
|
||||
di_int high;
|
||||
du_int low;
|
||||
#endif /* _YUGA_LITTLE_ENDIAN */
|
||||
}s;
|
||||
} twords;
|
||||
|
||||
typedef union
|
||||
{
|
||||
tu_int all;
|
||||
struct
|
||||
{
|
||||
#if _YUGA_LITTLE_ENDIAN
|
||||
du_int low;
|
||||
du_int high;
|
||||
#else
|
||||
du_int high;
|
||||
du_int low;
|
||||
#endif /* _YUGA_LITTLE_ENDIAN */
|
||||
}s;
|
||||
} utwords;
|
||||
|
||||
inline
|
||||
ti_int
|
||||
make_ti(di_int h, di_int l)
|
||||
{
|
||||
twords r;
|
||||
r.high = h;
|
||||
r.low = l;
|
||||
return r.all;
|
||||
}
|
||||
|
||||
inline
|
||||
tu_int
|
||||
make_tu(du_int h, du_int l)
|
||||
{
|
||||
utwords r;
|
||||
r.high = h;
|
||||
r.low = l;
|
||||
return r.all;
|
||||
}
|
||||
|
||||
#endif /* __x86_64 */
|
||||
|
||||
typedef union
|
||||
{
|
||||
su_int u;
|
||||
float f;
|
||||
} float_bits;
|
||||
|
||||
typedef union
|
||||
{
|
||||
udwords u;
|
||||
double f;
|
||||
} double_bits;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#if _YUGA_LITTLE_ENDIAN
|
||||
udwords low;
|
||||
udwords high;
|
||||
#else
|
||||
udwords high;
|
||||
udwords low;
|
||||
#endif /* _YUGA_LITTLE_ENDIAN */
|
||||
} uqwords;
|
||||
|
||||
typedef union
|
||||
{
|
||||
uqwords u;
|
||||
long double f;
|
||||
} long_double_bits;
|
||||
|
||||
|
||||
/* for test cases that are only applicable to */
|
||||
/* architectures with 80-bit long doubles */
|
||||
#if __i386__ || __x86_64__
|
||||
#define HAS_80_BIT_LONG_DOUBLE 1
|
||||
#endif
|
||||
|
||||
#endif /* INT_LIB_H */
|
@ -5,9 +5,9 @@ REMOTE=0
|
||||
if test `uname` = "Darwin"; then
|
||||
if test "$1" = "armv6"; then
|
||||
ARCHS="armv6"
|
||||
LIBS="-lSystem"
|
||||
REMOTE=1
|
||||
mkdir -p remote
|
||||
LIBS="-lSystem"
|
||||
REMOTE=1
|
||||
mkdir -p remote
|
||||
else
|
||||
ARCHS="i386 x86_64 ppc"
|
||||
LIBS="-lSystem"
|
||||
@ -17,7 +17,7 @@ else
|
||||
fi
|
||||
|
||||
for ARCH in $ARCHS; do
|
||||
CFLAGS="-Os -nodefaultlibs"
|
||||
CFLAGS="-Os -nodefaultlibs -I../../lib"
|
||||
if test "$ARCH" != '<host>'; then
|
||||
CFLAGS="-arch $ARCH $CFLAGS"
|
||||
fi
|
||||
@ -38,15 +38,15 @@ for ARCH in $ARCHS; do
|
||||
# this test requires an extra compiler option
|
||||
EXTRA="-fnested-functions"
|
||||
fi
|
||||
if test $REMOTE
|
||||
then
|
||||
if test "$REMOTE" = "1"
|
||||
then
|
||||
if gcc $CFLAGS $FILE ../../Release/libcompiler_rt.Optimized.a $LIBS $EXTRA -o ./remote/$FILE.exe
|
||||
then
|
||||
echo "Built $FILE.exe for $ARCH"
|
||||
else
|
||||
else
|
||||
echo "$FILE failed to compile"
|
||||
fi
|
||||
else
|
||||
fi
|
||||
else
|
||||
if gcc $CFLAGS $FILE ../../Release/libcompiler_rt.Optimized.a $LIBS $EXTRA
|
||||
then
|
||||
echo "Testing $FILE for $ARCH"
|
||||
@ -61,7 +61,7 @@ for ARCH in $ARCHS; do
|
||||
echo "$FILE failed to compile"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
echo "pass"
|
||||
|
Loading…
Reference in New Issue
Block a user