New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arm CPU support #3746
Comments
Comment author: administrator
Apparently, your gcc toolchain is configured for "soft You could try to add -mhard-float to ASPPFLAGS in config/Makefile, If you really want to run ocamlopt on this platform, you should Regards,
|
Comment author: administrator wish: ARM port with soft floating-point |
Comment author: mindbender i can only second that wish. we at www.linkstationwiki.net tried to compile ocaml as we needed it to compile mldonkey for the LS Pro...and marvel-based board with arm9-CPU (like MANY nas devices the get released the last months!..currently i count 6 that are based on the same marvel board).... this board does not have support for hardware-floating-point... we need support for soft-floating-point on arm also..... |
Comment author: gerd I've also tried to build ocamlopt for my Nokia N800, and ran into the mentioned fp problem. As I see it the current arm status of ocaml is "out of date" (and useless):
So I think it is now time to switch to EABI. Here are a few links that might be helpful:
For my Nokia there is an SDK that can be installed on x86 Debian systems. It includes the toolchain, and transparent CPU emulation (using qemu). I could successfully compile ocaml on it (except fp for native code). It might be good enough as development platform for an up-to-date ARM port:
If you need to run code on a real arm device, please tell me - I've sshd on the N800, and can leave it on now and then. Btw. I saw that the "as" invocation is hardcoded in asmrun/proc.ml. By adding |
Comment author: @xavierleroy Thanks for the background information. After reviewing it, I think there are two possible approaches. One is to use VFD registers and instructions, which should fit very well the OCaml back-end architecture. For calling external C functions, softfp conventions would be used, for compatibility with EABI. This approach relies crucially on the existence of a good VFP emulation in the kernel, though. The other is to go all the way to softfp in OCaml-generated code. It violates a number of basic assumptions of the back-end, e.g. where the back-end expects one float pseudo-register, there must be two integer pseudo-registers instead. I'm not sure this can be made to work at all. |
Comment author: @glondu The latter seems more elegant. Would a patch be accepted? |
Comment author: @xavierleroy It took a long time, but I finally managed to update the ARM OCaml port to EABI and soft floating-point. Everything seems to work well under Debian Lenny ARM-EABI running under QEMU emulation. The new port is in the CVS trunk and will be released in 3.12, replacing the previous (old-ABI) ARM port. |
Original bug ID: 3746
Reporter: administrator
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2011-05-29T10:14:22Z)
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @glondu bacam karl n8gray gerd
Bug description
Full_Name: Robert Nagy
Version: 3.08.3
OS: OpenBSD
Submission from: amazonas-2734.adsl.datanet.hu (195.56.242.194)
I am trying to build ocaml on OpenBSD/Zaurus.
cpu0 at mainbus0: PXA27x rev 4 (XScale core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 32KB(32b/l,32way) I-cache, 32KB(32b/l,32way) wr-back-lock D-cache
hw.machine=zaurus
hw.model=PXA27x rev 4 (XScale core)
hw.ncpu=1
hw.byteorder=1234
hw.physmem=67108864
hw.usermem=66850816
hw.pagesize=4096
hw.disknames=wd0
hw.diskcount=1
But it seems that there are some problems in arm.S
gcc -c -DSYS_openbsd -pthread -o arm.o arm.S ||
{ echo "If your assembler produced syntax errors, it is probably unhappy with
the"; echo "preprocessor. Check your assembler, or try producing arm.o by
hand."; exit 2; }
arm.S: Assembler messages:
arm.S:21: Warning: ignoring redefinition of register alias 'sp'
arm.S:22: Warning: ignoring redefinition of register alias 'lr'
arm.S:23: Warning: ignoring redefinition of register alias 'pc'
arm.S:112: Error: selected processor does not support
stfd f0,[sp,#-8]!' arm.S:113: Error: selected processor does not support
stfd f1,[sp,#-8]!'arm.S:114: Error: selected processor does not support
stfd f2,[sp,#-8]!' arm.S:115: Error: selected processor does not support
stfd f3,[sp,#-8]!'arm.S:125: Error: selected processor does not support
ldfd f4,[sp],#8' arm.S:126: Error: selected processor does not support
ldfd f5,[sp],#8'arm.S:127: Error: selected processor does not support
ldfd f6,[sp],#8' arm.S:128: Error: selected processor does not support
ldfd f7,[sp],#8'arm.S:184: Error: selected processor does not support
stfd f7,[sp,#-8]!' arm.S:185: Error: selected processor does not support
stfd f6,[sp,#-8]!'arm.S:186: Error: selected processor does not support
stfd f5,[sp,#-8]!' arm.S:187: Error: selected processor does not support
stfd f4,[sp,#-8]!'arm.S:240: Error: selected processor does not support
ldfd f4,[sp],#8' arm.S:241: Error: selected processor does not support
ldfd f5,[sp],#8'arm.S:242: Error: selected processor does not support
ldfd f6,[sp],#8' arm.S:243: Error: selected processor does not support
ldfd f7,[sp],#8'If your assembler produced syntax errors, it is probably unhappy with the
preprocessor. Check your assembler, or try producing arm.o by hand.
gmake: *** [arm.o] Error 2
The text was updated successfully, but these errors were encountered: