mirror of
https://github.com/corda/corda.git
synced 2025-02-12 05:35:50 +00:00
fixed ARM interpreted-mode regression
This commit is contained in:
parent
1ea2a3a6dc
commit
3aac50555b
13
makefile
13
makefile
@ -3,7 +3,7 @@ MAKEFLAGS = -s
|
|||||||
name = avian
|
name = avian
|
||||||
version = 0.3
|
version = 0.3
|
||||||
|
|
||||||
build-arch := $(shell uname -m | sed 's/^i.86$$/i386/')
|
build-arch := $(shell uname -m | sed 's/^i.86$$/i386/' | sed 's/^arm.*$$/arm/')
|
||||||
ifeq (Power,$(filter Power,$(build-arch)))
|
ifeq (Power,$(filter Power,$(build-arch)))
|
||||||
build-arch = powerpc
|
build-arch = powerpc
|
||||||
endif
|
endif
|
||||||
@ -145,19 +145,8 @@ ifeq ($(arch),powerpc)
|
|||||||
pointer-size = 4
|
pointer-size = 4
|
||||||
endif
|
endif
|
||||||
ifeq ($(arch),arm)
|
ifeq ($(arch),arm)
|
||||||
lflags := -L/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/lib -L$(root)/arm/lib $(lflags)
|
|
||||||
cflags := -I/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include -I$(root)/arm/include $(cflags)
|
|
||||||
|
|
||||||
asm = arm
|
asm = arm
|
||||||
object-arch = arm
|
|
||||||
object-format = elf32-littlearm
|
|
||||||
pointer-size = 4
|
pointer-size = 4
|
||||||
cxx = arm-unknown-linux-gnu-g++
|
|
||||||
cc = arm-unknown-linux-gnu-gcc
|
|
||||||
ar = arm-unknown-linux-gnu-ar
|
|
||||||
ranlib = arm-unknown-linux-gnu-ranlib
|
|
||||||
objcopy = arm-unknown-linux-gnu-objcopy
|
|
||||||
strip = arm-unknown-linux-gnu-strip
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),darwin)
|
ifeq ($(platform),darwin)
|
||||||
|
24
src/arm.h
24
src/arm.h
@ -14,9 +14,9 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#define IP_REGISTER(context) (context->uc_mcontext.gregs[15])
|
#define IP_REGISTER(context) (context->uc_mcontext.arm_pc)
|
||||||
#define STACK_REGISTER(context) (context->uc_mcontext.gregs[13])
|
#define STACK_REGISTER(context) (context->uc_mcontext.arm_sp)
|
||||||
#define THREAD_REGISTER(context) (context->uc_mcontext.gregs[12])
|
#define THREAD_REGISTER(context) (context->uc_mcontext.arm_ip)
|
||||||
|
|
||||||
extern "C" uint64_t
|
extern "C" uint64_t
|
||||||
vmNativeCall(void* function, unsigned stackTotal, void* memoryTable,
|
vmNativeCall(void* function, unsigned stackTotal, void* memoryTable,
|
||||||
@ -60,9 +60,25 @@ syncInstructionCache(const void* start UNUSED, unsigned size UNUSED)
|
|||||||
asm("nop");
|
asm("nop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);
|
||||||
|
#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0)
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
atomicCompareAndSwap32(uint32_t* p, uint32_t old, uint32_t new_)
|
||||||
|
{
|
||||||
|
int r = __kernel_cmpxchg(static_cast<int>(old), static_cast<int>(new_), reinterpret_cast<int*>(p));
|
||||||
|
return (!r ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
atomicCompareAndSwap(uintptr_t* p, uintptr_t old, uintptr_t new_)
|
||||||
|
{
|
||||||
|
return atomicCompareAndSwap32(reinterpret_cast<uint32_t*>(p), old, new_);
|
||||||
|
}
|
||||||
|
|
||||||
inline uint64_t
|
inline uint64_t
|
||||||
dynamicCall(void* function, uintptr_t* arguments, uint8_t* argumentTypes,
|
dynamicCall(void* function, uintptr_t* arguments, uint8_t* argumentTypes,
|
||||||
unsigned argumentCount, unsigned argumentsSize,
|
unsigned argumentCount, unsigned argumentsSize UNUSED,
|
||||||
unsigned returnType UNUSED)
|
unsigned returnType UNUSED)
|
||||||
{
|
{
|
||||||
const unsigned GprCount = 4;
|
const unsigned GprCount = 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user