[erlang-questions] Enabling HiPE for ARMv7 (armv7l) ?

Winston Smith smith.winston.101@REDACTED
Fri Dec 9 14:56:32 CET 2011

On Fri, Dec 9, 2011 at 4:11 AM, Mikael Pettersson <mikpe@REDACTED> wrote:
> HiPE's ARM support predates the existence of ARMv7 and even ARMv6 was not
> wide-spread at the time -- I've only recently been able to acquire post-v5
> hardware decent(*) enough to use as a development and build machine.
> The ARMv5 code we use in the runtime system or generate from the compiler
> should work as-is on v7, with the following caveats:
> - big-endian won't work and I have no plans of making it work, the fault
>  for that lies on ARM who changed their big-endian mode to be, well,
>  obscenely backwards (remember FPA and its endianess issues?)
> - only softfloat is supported, hard VFP or Neon instructions aren't generated
> - only ARM is supported, Thumb-1 or Thumb-2 instructions aren't generated
>  (given that HiPE is about performance, that's entirely reasonable IMO)
> - v6/v7 additions to the ARM ISA aren't utilized, I'm thinking in particular
>  about the "load large immediate" instructions that v6 added
> In theory I think that adding "armv7l" (or however the Linux kernel announces
> v7-a profile processors) to erts/configure{.in,} should just work.

I did add this and I was in fact able to build Erlang with HiPE
enabled for ARMv7.  I tried compiling a module as follows:

c(mytest, [native, {hipe, verbose}]).

It printed out the right stuff and I was able to run the code
(although I don't know if actually ran the native code, or just the
regular beam bytecode).

As an aside, I did have some problems with cross compiling this though
for a different, [smaller] A8 board.  It failed at the points where it
wants to generate the hipe_literals.h for plain/smp and the
hipe_literals.hrl; as you know, it creates versions of executable
hipe_mkliterals that it invokes to generate these files.  Of course in
a cross compilation environment, this doesn't work as it needs to run
hipe_mkliterals on the target (host), not the build system.
Fortunately, it was easy enough to copy hipe_mkliterals to the target
board, invoke it and copy back the resulting hipe_literals.{h|hrl}
files into place and restart the build each time it failed this way.
I don't know how you can automate this for a cross compile (perhaps
with scp/ssh).

Thanks for the info!


More information about the erlang-questions mailing list