mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-15 16:07:09 +00:00
x86 builds and basically works on Android x86 devices
This commit is contained in:
parent
3bdbe50f0f
commit
e4c669f016
@ -1,4 +1,4 @@
|
||||
APP_ABI := armeabi armeabi-v7a ## TODO : x86
|
||||
APP_ABI := armeabi armeabi-v7a x86
|
||||
|
||||
# Do not change APP_PLATFORM if we care about Gingerbread (2.3.3) devices! We must compile against android-10,
|
||||
# otherwise we may encounter runtime load-library errors from symbols that should have been inlined against older
|
||||
|
@ -30,6 +30,7 @@ LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
LOCAL_SRC_FILES += $(APPLE2_X86_SRC)
|
||||
LOCAL_CFLAGS += -DNO_UNDERSCORES=1
|
||||
else
|
||||
LOCAL_SRC_FILES += $(APPLE2_ARM_SRC)
|
||||
endif
|
||||
|
@ -122,7 +122,7 @@ fi
|
||||
# Symbolicate and move symbols file into location to be deployed on device
|
||||
|
||||
SYMFILE=libapple2ix.so.sym
|
||||
ARCHES_TO_SYMBOLICATE='armeabi armeabi-v7a'
|
||||
ARCHES_TO_SYMBOLICATE='armeabi armeabi-v7a x86'
|
||||
|
||||
for arch in $ARCHES_TO_SYMBOLICATE ; do
|
||||
SYMDIR=../assets/symbols/$arch/libapple2ix.so
|
||||
|
@ -47,6 +47,8 @@
|
||||
// x86_64 registers
|
||||
# define _XBP %rbp /* x86_64 base pointer */
|
||||
# define _XSP %rsp /* x86_64 stack pointer */
|
||||
# define _XDI %rdi
|
||||
# define _XSI %rsi
|
||||
# define _XAX %rax /* scratch */
|
||||
# define _XBX %rbx /* scratch2 */
|
||||
# define _X8 %r8
|
||||
@ -83,6 +85,8 @@
|
||||
// x86 registers
|
||||
# define _XBP %ebp /* x86 base pointer */
|
||||
# define _XSP %esp /* x86 stack pointer */
|
||||
# define _XDI %edi
|
||||
# define _XSI %esi
|
||||
# define _XAX %eax /* scratch */
|
||||
# define _XBX %ebx /* scratch2 */
|
||||
// full-length Apple ][ registers
|
||||
|
@ -2216,12 +2216,15 @@ ex_irq: testb $I_Flag, F_Reg // Already interrupt
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
ENTRY(cpu65_run)
|
||||
#ifdef __LP64__
|
||||
pushq %rbx
|
||||
// NOTE: should we be also preserving r12-r15?
|
||||
#endif
|
||||
pushLQ _XBP
|
||||
movLQ _XSP, _XBP
|
||||
pushLQ _XDI
|
||||
pushLQ _XSI
|
||||
pushLQ _XBX
|
||||
#ifdef __LP64__
|
||||
// NOTE: should we be also preserving r12-r15?
|
||||
#endif
|
||||
|
||||
|
||||
// Restore CPU state when being called from C.
|
||||
movzwLQ SYM(cpu65_ea), EffectiveAddr_X
|
||||
@ -2256,18 +2259,18 @@ exit_cpu65_run:
|
||||
// Save CPU state when returning from being called from C
|
||||
movw PC_Reg, SYM(cpu65_pc)
|
||||
CommonSaveCPUState
|
||||
popLQ _XBX
|
||||
popLQ _XSI
|
||||
popLQ _XDI
|
||||
popLQ _XBP
|
||||
#ifdef __LP64__
|
||||
popq %rbx
|
||||
#endif
|
||||
ret
|
||||
|
||||
exit_reinit: movb $0, SYM(cpu65__signal)
|
||||
movb $1, SYM(emul_reinitialize)
|
||||
popLQ _XBX
|
||||
popLQ _XSI
|
||||
popLQ _XDI
|
||||
popLQ _XBP
|
||||
#ifdef __LP64__
|
||||
popq %rbx
|
||||
#endif
|
||||
ret
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user