Hi Oliver,
Thanks for looking at this so quickly. The develop branch does not build
because when I build <abi> is set to 'sysv' not 'aapcs'. I have patched it
as in the patch below by just changing <abi>aapcs to <abi>sysv in
build/Jamfile.v2. I have not changed the name of the .S files so they are
now somewhat inappropriately named *_aapcs_*.
There was also a problem with jump_fcontext in that it was restoring the FP
context from x0, not from SP. Interestingly I based my patch on the
existing iOS code which also has this bug. I have not fixed it in the iOS
code as I have no way of testing anything on iOS.
Built and testing on arm64, ubuntu 14.04, gcc 4.9.1.
Thanks for your help with this,
Ed.
--- CUT HERE ---
commit d19baee73f90de01375af69a9f8621799c649964
Author: Edward Nevill
Date: Mon Feb 23 17:32:49 2015 +0000
Fix build for aarch64.
Restore FP registers from sp, not x0
diff --git a/build/Jamfile.v2 b/build/Jamfile.v2
index 4bf3fce..00ee44d 100644
--- a/build/Jamfile.v2
+++ b/build/Jamfile.v2
@@ -227,7 +227,7 @@ alias asm_context_sources
alias asm_context_sources
: [ make asm/make_arm64_aapcs_elf_gas.o :
asm/make_arm64_aapcs_elf_gas.S : @gas64 ]
[ make asm/jump_arm64_aapcs_elf_gas.o :
asm/jump_arm64_aapcs_elf_gas.S : @gas64 ]
- : <abi>aapcs
+ : <abi>sysv
<address-model>64
<architecture>arm
<binary-format>elf
@@ -236,7 +236,7 @@ alias asm_context_sources
alias asm_context_sources
: asm/make_arm64_aapcs_elf_gas.S
asm/jump_arm64_aapcs_elf_gas.S
- : <abi>aapcs
+ : <abi>sysv
<address-model>64
<architecture>arm
<binary-format>elf
@@ -246,7 +246,7 @@ alias asm_context_sources
alias asm_context_sources
: asm/make_arm64_aapcs_elf_gas.S
asm/jump_arm64_aapcs_elf_gas.S
- : <abi>aapcs
+ : <abi>sysv
<address-model>64
<architecture>arm
<binary-format>elf
diff --git a/src/asm/jump_arm64_aapcs_elf_gas.S
b/src/asm/jump_arm64_aapcs_elf_gas.S
index 46e029d..645d84d 100644
--- a/src/asm/jump_arm64_aapcs_elf_gas.S
+++ b/src/asm/jump_arm64_aapcs_elf_gas.S
@@ -101,10 +101,10 @@ jump_fcontext:
# b.eq 2f
# load d8 - d15
- ldp d8, d9, [x0, #0x00]
- ldp d10, d11, [x0, #0x10]
- ldp d12, d13, [x0, #0x20]
- ldp d14, d15, [x0, #0x30]
+ ldp d8, d9, [sp, #0x00]
+ ldp d10, d11, [sp, #0x10]
+ ldp d12, d13, [sp, #0x20]
+ ldp d14, d15, [sp, #0x30]
2:
# load x19-x30
--- CUT HERE ---
On 23 February 2015 at 15:25, Oliver Kowalke
wrote:
thx for the patches - I've updated branch develop. Could you verify that
the code is running
on your arm64 system (if it is working I'll merge to master).
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost