Core: ARM optimizations

git-svn-id: svn://ultimatepp.org/upp/trunk@9422 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-01-18 19:05:32 +00:00
parent 3ff7ebecf1
commit d50f3cc6a6
4 changed files with 31 additions and 3 deletions

View file

@ -5,9 +5,16 @@ using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
#ifdef CPU_64
RLOG("CPU_64");
#endif
#ifdef CPU_UNALIGNED
RLOG("CPU_UNALIGNED");
#endif
#ifdef CPU_LE
RLOG("CPU_LE");
#endif
#ifdef CPP_11
RLOG("CPP_11");
#endif

View file

@ -415,6 +415,7 @@ void WriteMemoryBarrier() {
#else
#ifndef COMPILER_GCC
void ReadMemoryBarrier()
{
static Atomic x;
@ -424,6 +425,7 @@ void ReadMemoryBarrier()
void WriteMemoryBarrier() {
ReadMemoryBarrier();
}
#endif
#endif

View file

@ -148,6 +148,16 @@ inline void WriteMemoryBarrier() {
#endif
#endif
}
#elif defined(COMPILER_GCC)
inline void ReadMemoryBarrier()
{
__sync_synchronize();
}
inline void WriteMemoryBarrier()
{
__sync_synchronize();
}
#endif
#ifdef CPU_BLACKFIN

View file

@ -81,9 +81,18 @@
#elif __arm__
#define CPU_32 1
#define CPU_ARM 1
#define CPU_LE 1
#define CPU_LITTLE_ENDIAN 1
#define CPU_ALIGNED 1
#ifdef __ARM_BIG_ENDIAN
#define CPU_BE 1
#define CPU_BIG_ENDIAN 1
#else
#define CPU_LE 1
#define CPU_LITTLE_ENDIAN 1
#endif
#ifdef __ARM_FEATURE_UNALIGNED
#define CPU_UNALIGNED 1
#else
#define CPU_ALIGNED 1
#endif
#elif __bfin
#define CPU_32 1
#define CPU_BLACKFIN