2012年10月29日 星期一

Work log - ARM NEON Guest Support


  • [TODO] ARM NEON Guest Support
  • [TODO] Refine system mode experiment slide
  • [TODO] Re-implment LnQ
  • [TODO] Journal paper start
  • [Q] Blog ?
  • [Q] Plot tutorial
  • [Q]  x86_64 on ARM64, run user-mode in system mode, ARM64 emulation?
ARM NEON Guest Support:
  • recompile SPEC with flags: -static -O3 -marm -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -ffast-math -ftree-vectorize -funroll-all-loops -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
  • GCC configure : 
    • ../gcc-linaro-4.7-2012.05/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabi --prefix=/home/tk/local/arm-toolchain --enable-languages=c,c++,fortran --with-arch=armv7-a --with-tune=cortex-a8 --with-fpu=neon --with-float=softfp --with-sysroot=/home/tk/local/arm-toolchain/.build/arm-linux-gnueabi/libc --with-pkgversion='crosstool-NG linaro-1.13.1-2012.05-20120523 - Linaro GCC 2012.05' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/home/tk/local/arm-toolchain/.build --with-mpfr=/home/tk/local/arm-toolchain/.build --with-mpc=/home/tk/local/arm-toolchain/.build --with-ppl=/home/tk/local/arm-toolchain/.build --with-cloog=/home/tk/local/arm-toolchain/.build --enable-cloog-backend=isl --with-libelf=/home/tk/local/arm-toolchain/.build --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-gold --with-local-prefix=/home/tk/local/arm-toolchain/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-mode=arm
  • 'ptrdiff_t' does not name a type: after GCC 4.6, we need to include  manually in source files.
    • don't want to modify source files, add ``#include '' in c++config.h
    • boring...
  • when compiling 464.h264, there are error messages: ']' expect: vld4.i32 {d16, d18, d20, d22}, [sp:64] by assembler.
    • as from binutils 2.19 and 2.21 does not understand this because it use double-space register, which types are double floating point
    • solution: use 2.23. however,  it is now the loader ld has assertion error (WTF!).
    • don't know how to get rid of this assertion error, I comments out the assertion in bfd/elf32-arm.c:11757
    • the compiled executable can run successfully on pandaboard
  • Run native with test inputs
    • CINT: h264ref verification error
    • 434.zeusmp,  447.dealII, 450.soplex, 459.GemsFDTD, 482.sphinx3 runtime error.
      • 434.zeusmp: over 1G bss (0x45df2c7c bytes), fixed after add 4G swap
      • 447.dealII: segfault; fixed after changing binutils from 2.19 to 2.23
      • 482.sphinx3: program error, program misbehaved.
    • Summary: all good except 482.sphinx3
















1 則留言:

  1. From http://mirror.yongbok.net/pub/linux/android/repository/ndk/docs/CHANGES.html

    " The root cause is that ARM's binutils-2.21/ld.bfd performs sanity check and asserts
    when "tag_FP_arch==0 && tag_ABI_HardFP_use !=0". This can happen in object using FP
    linked by older binutils when tag_FP_arch isn't produced at all (thus gets the default
    "zero" in new linker)."

    Use GNU gold to get tid of the assertion by:

    apt-get install binutils-gold

    It seems GNU gold doesn't perform the same sanity checks as binutils/ld on FP arch tag on object file generated by older GNU toolchain.

    回覆刪除