mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
fix process=interpret build for 'arch=arm64 platform=ios'
This commit is contained in:
parent
0f426e01e5
commit
5e0f7590d9
6
makefile
6
makefile
@ -81,13 +81,13 @@ endif
|
|||||||
|
|
||||||
ifeq ($(platform),macosx)
|
ifeq ($(platform),macosx)
|
||||||
ifneq ($(filter arm arm64,$(arch)),)
|
ifneq ($(filter arm arm64,$(arch)),)
|
||||||
x := $(error "please use 'arch=arm' or 'arch=arm64' 'platform=ios' to build for ios-arm")
|
x := $(error "please use ('arch=arm' or 'arch=arm64') 'platform=ios' to build for ios-arm")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),ios)
|
ifeq ($(platform),ios)
|
||||||
ifeq ($(filter arm i386,$(arch)),)
|
ifeq ($(filter i386 arm arm64,$(arch)),)
|
||||||
x := $(error "please specify 'arch=i386' or 'arch=arm' with 'platform=ios'")
|
x := $(error "please specify 'arch=i386', 'arch=arm', or 'arch=arm64' with 'platform=ios'")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ GLOBAL(vmNativeCall):
|
|||||||
mov w23, w6
|
mov w23, w6
|
||||||
|
|
||||||
// setup stack arguments if necessary
|
// setup stack arguments if necessary
|
||||||
sub sp, sp, w20 // allocate stack
|
sub sp, sp, w20, uxtw // allocate stack
|
||||||
mov x9, sp
|
mov x9, sp
|
||||||
LOCAL(loop):
|
LOCAL(loop):
|
||||||
cmp w3, wzr
|
cmp w3, wzr
|
||||||
@ -79,16 +79,16 @@ LOCAL(populateVFPs):
|
|||||||
|
|
||||||
LOCAL(doCall):
|
LOCAL(doCall):
|
||||||
blr x19 // call function
|
blr x19 // call function
|
||||||
add sp, sp, w20 // deallocate stack
|
add sp, sp, w20, uxtw // deallocate stack
|
||||||
|
|
||||||
cmp w23,#FLOAT_TYPE
|
cmp w23,#FLOAT_TYPE
|
||||||
bne LOCAL(double)
|
b.ne LOCAL(double)
|
||||||
fmov w0,s0
|
fmov w0,s0
|
||||||
b LOCAL(exit)
|
b LOCAL(exit)
|
||||||
|
|
||||||
LOCAL(double):
|
LOCAL(double):
|
||||||
cmp w23,#DOUBLE_TYPE
|
cmp w23,#DOUBLE_TYPE
|
||||||
bne LOCAL(exit)
|
b.ne LOCAL(exit)
|
||||||
fmov x0,d0
|
fmov x0,d0
|
||||||
|
|
||||||
LOCAL(exit):
|
LOCAL(exit):
|
||||||
|
@ -34,7 +34,11 @@
|
|||||||
|
|
||||||
#define THREAD_STATE_IP(state) ((state).FIELD(pc))
|
#define THREAD_STATE_IP(state) ((state).FIELD(pc))
|
||||||
#define THREAD_STATE_STACK(state) ((state).FIELD(sp))
|
#define THREAD_STATE_STACK(state) ((state).FIELD(sp))
|
||||||
|
#if (defined __APPLE__) && (defined ARCH_arm64)
|
||||||
|
#define THREAD_STATE_THREAD(state) ((state).FIELD(x[8]))
|
||||||
|
#else
|
||||||
#define THREAD_STATE_THREAD(state) ((state).FIELD(r[8]))
|
#define THREAD_STATE_THREAD(state) ((state).FIELD(r[8]))
|
||||||
|
#endif
|
||||||
#define THREAD_STATE_LINK(state) ((state).FIELD(lr))
|
#define THREAD_STATE_LINK(state) ((state).FIELD(lr))
|
||||||
|
|
||||||
#define IP_REGISTER(context) THREAD_STATE_IP(context->uc_mcontext->FIELD(ss))
|
#define IP_REGISTER(context) THREAD_STATE_IP(context->uc_mcontext->FIELD(ss))
|
||||||
|
@ -33,10 +33,12 @@
|
|||||||
#define CPU_TYPE_I386 7
|
#define CPU_TYPE_I386 7
|
||||||
#define CPU_TYPE_X86_64 (CPU_TYPE_I386 | CPU_ARCH_ABI64)
|
#define CPU_TYPE_X86_64 (CPU_TYPE_I386 | CPU_ARCH_ABI64)
|
||||||
#define CPU_TYPE_ARM 12
|
#define CPU_TYPE_ARM 12
|
||||||
|
#define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64)
|
||||||
|
|
||||||
#define CPU_SUBTYPE_I386_ALL 3
|
#define CPU_SUBTYPE_I386_ALL 3
|
||||||
#define CPU_SUBTYPE_X86_64_ALL CPU_SUBTYPE_I386_ALL
|
#define CPU_SUBTYPE_X86_64_ALL CPU_SUBTYPE_I386_ALL
|
||||||
#define CPU_SUBTYPE_ARM_V7 9
|
#define CPU_SUBTYPE_ARM_V7 9
|
||||||
|
#define CPU_SUBTYPE_ARM_V8 13
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -157,6 +159,10 @@ class MachOPlatform : public Platform {
|
|||||||
cpuType = CPU_TYPE_ARM;
|
cpuType = CPU_TYPE_ARM;
|
||||||
cpuSubType = CPU_SUBTYPE_ARM_V7;
|
cpuSubType = CPU_SUBTYPE_ARM_V7;
|
||||||
break;
|
break;
|
||||||
|
case PlatformInfo::Arm64:
|
||||||
|
cpuType = CPU_TYPE_ARM64;
|
||||||
|
cpuSubType = CPU_SUBTYPE_ARM_V8;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// should never happen (see MachOPlatform declarations at bottom)
|
// should never happen (see MachOPlatform declarations at bottom)
|
||||||
fprintf(stderr, "unsupported architecture: %d\n", info.arch);
|
fprintf(stderr, "unsupported architecture: %d\n", info.arch);
|
||||||
@ -280,6 +286,7 @@ class MachOPlatform : public Platform {
|
|||||||
|
|
||||||
MachOPlatform<uint32_t> darwinx86Platform(PlatformInfo::x86);
|
MachOPlatform<uint32_t> darwinx86Platform(PlatformInfo::x86);
|
||||||
MachOPlatform<uint32_t> darwinArmPlatform(PlatformInfo::Arm);
|
MachOPlatform<uint32_t> darwinArmPlatform(PlatformInfo::Arm);
|
||||||
|
MachOPlatform<uint64_t> darwinArm64Platform(PlatformInfo::Arm64);
|
||||||
MachOPlatform<uint64_t> darwinx86_64Platform(PlatformInfo::x86_64);
|
MachOPlatform<uint64_t> darwinx86_64Platform(PlatformInfo::x86_64);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user