mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
add support for FreeBSD on x86_64
This commit is contained in:
parent
c1aa0b46b5
commit
3a1343fb06
1
makefile
1
makefile
@ -6,6 +6,7 @@ version = 0.6
|
||||
build-arch := $(shell uname -m \
|
||||
| sed 's/^i.86$$/i386/' \
|
||||
| sed 's/^x86pc$$/i386/' \
|
||||
| sed 's/amd64/x86_64/' \
|
||||
| sed 's/^arm.*$$/arm/' \
|
||||
| sed 's/ppc/powerpc/')
|
||||
|
||||
|
@ -627,7 +627,7 @@ class MySystem: public System {
|
||||
}
|
||||
|
||||
virtual void* tryAllocateExecutable(unsigned sizeInBytes) {
|
||||
#if (! defined __APPLE__) && (defined __x86_64__)
|
||||
#ifdef MAP_32BIT
|
||||
// map to the lower 32 bits of memory when possible so as to avoid
|
||||
// expensive relative jumps
|
||||
const unsigned Extra = MAP_32BIT;
|
||||
|
@ -123,6 +123,12 @@ dynamicCall(void* function, uintptr_t* arguments, uint8_t*,
|
||||
# define FRAME_REGISTER(context) \
|
||||
THREAD_STATE_FRAME(context->uc_mcontext->FIELD(ss))
|
||||
|
||||
# elif (defined __FreeBSD__)
|
||||
# define IP_REGISTER(context) (context->uc_mcontext.mc_rip)
|
||||
# define STACK_REGISTER(context) (context->uc_mcontext.mc_rsp)
|
||||
# define THREAD_REGISTER(context) (context->uc_mcontext.mc_rbx)
|
||||
# define LINK_REGISTER(context) (context->uc_mcontext.mc_rcx)
|
||||
# define FRAME_REGISTER(context) (context->uc_mcontext.mc_rbp)
|
||||
# else
|
||||
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_RIP])
|
||||
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_RSP])
|
||||
|
Loading…
Reference in New Issue
Block a user