[erlang-bugs] Broken Hipe in R14B02
Mikael Pettersson
mikpe@REDACTED
Thu Mar 17 11:43:36 CET 2011
On Wed, 16 Mar 2011 16:31:06 +0100, Sverker Eriksson wrote:
> Hipe and halfword emulator do not play nice together yet.
>
> Any problems without --enable-halfword-emulator?
>
> /Sverker, Erlang/OTP
>
>
> H=E5kan Mattsson wrote:
> > I forgot to use --disable-hipe and got the following compilation error.=
>
> >
> > Time to disable hipe by default?
> >
> > /H=E5kan
> >
> > $ uname -a
> > Linux tellus 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:46 UTC
> > 2011 x86_64 GNU/Linux
> > $ ./configure --prefix=3D/usr/local/pgm/otp_R14B02
> > --enable-halfword-emulator && make
> > ...
> > ...
> > ...
> > gcc -g -O3 -I/usr/local/src/otp_src_R14B02/erts/x86_64-unknown-linux-g=
> nu
> > -fno-tree-copyrename -D_GNU_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall
> > -Wstrict-prototypes -Wmissing-prototypes -Wdeclarati
> > on-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT
> > -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS
> > -Ix86_64-unknown-linux-gnu/opt/smp -Ibeam -Isys/unix -Isys/common
> > -Ix86_64-unknown-linux
> > -gnu -Izlib -Ipcre -Ihipe -I../include
> > -I../include/x86_64-unknown-linux-gnu -I../include/internal
> > -I../include/internal/x86_64-unknown-linux-gnu -c hipe/hipe_amd64.c -o
> > obj/x86_64-unknown-linux-gnu/opt/smp/hipe_amd64.o
> > hipe/hipe_amd64.c:40: warning: large integer implicitly truncated to
> > unsigned type
> > hipe/hipe_amd64.c:42: error: conflicting types for =91hipe_patch_load_f=
> e=92
> > hipe/hipe_arch.h:28: note: previous declaration of =91hipe_patch_load_f=
> e=92 was here
> > hipe/hipe_amd64.c:49: error: conflicting types for =91hipe_patch_insn=92=
>
> > hipe/hipe_arch.h:29: note: previous declaration of =91hipe_patch_insn=92=
> was here
> > hipe/hipe_amd64.c: In function =91hipe_patch_call=92:
> > hipe/hipe_amd64.c:77: warning: cast from pointer to integer of differen=
> t size
> > hipe/hipe_amd64.c:77: warning: cast from pointer to integer of differen=
> t size
> > hipe/hipe_amd64.c: In function =91hipe_bifs_write_u64_2=92:
> > hipe/hipe_amd64.c:371: warning: passing argument 2 of =91term_to_Uint=92=
>
> > from incompatible pointer type
> > beam/big.h:152: note: expected =91Uint *=92 but argument is of type =91=
> Uint64 *=92
> > make[3]: *** [obj/x86_64-unknown-linux-gnu/opt/smp/hipe_amd64.o] Error =
> 1
> > make[3]: Leaving directory `/usr/local/src/otp_src_R14B02/erts/emulator=
> '
> > make[2]: *** [opt] Error 2
> > make[2]: Leaving directory `/usr/local/src/otp_src_R14B02/erts/emulator=
> '
> > :
The halfword emulator is a new beast with an execution mode that
differs significantly from existing 32- and 64-bit modes. The build
error in the runtime code you got is just the tip of the iceberg,
non-trivial changes to the compiler would be required to support the
halfword emulator.
For now the best solution is to auto-disable HiPE if halfword emulator
is enabled, and error out if both are explicitly enabled.
(If someone wants to fund the development of HiPE support for
halfword emulator on Linux/AMD64, contact me offline.)
/Mikael
More information about the erlang-bugs
mailing list