add QNX ARM support

This is untested so far, since I haven't figured out how to install
the ARM port of QNX on QEMU.
This commit is contained in:
Joel Dice 2012-07-17 19:38:39 -06:00
parent cace9d4531
commit 4bafdf6286
2 changed files with 11 additions and 2 deletions

View File

@ -318,7 +318,11 @@ ifeq ($(platform),qnx)
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
build-lflags = $(common-lflags)
else
prefix = i486-pc-nto-qnx6.5.0-
ifeq ($(arch),i386)
prefix = i486-pc-nto-qnx6.5.0-
else
prefix = arm-unknown-nto-qnx6.5.0-
endif
endif
cxx = $(prefix)g++
cc = $(prefix)gcc

View File

@ -44,7 +44,12 @@
THREAD_STATE_THREAD(context->uc_mcontext->FIELD(ss))
# define LINK_REGISTER(context) \
THREAD_STATE_LINK(context->uc_mcontext->FIELD(ss))
#else // not __APPLE__
#elif (defined __QNX__)
# define IP_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_PC])
# define STACK_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_SP])
# define THREAD_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_IP])
# define LINK_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_LR])
#else
# define IP_REGISTER(context) (context->uc_mcontext.arm_pc)
# define STACK_REGISTER(context) (context->uc_mcontext.arm_sp)
# define THREAD_REGISTER(context) (context->uc_mcontext.arm_ip)