[Llvm-bgq-discuss] llvm-bgq and inlined assembly

Thomas Gooding tgooding at us.ibm.com
Fri Mar 15 14:12:04 CDT 2013



Hi,

Is QPX inlined assembly supported on bgq's clang?  I tried a simple test
and it seems that it calls the host machine's assembler (/usr/bin/as)
instead of /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-as.
I'm new to clang, so its possible I missed a compiler config option but
didn't see one that did the trick.

Thanks!
Tom

test.c:
      char buffer[32];

      int main(int argc, char** argv)
      {
          asm volatile("qvlfsx  0, 0, %0;" : : "r" (buffer));
      }

% /bghome/blocksom/development/llvm/install/bin/clang test.c -mcpu=a2q -v
      clang version 3.3 (trunk 170456)
      Target: powerpc64-unknown-linux-gnu
      Thread model: posix
       "/bghome/blocksom/development/llvm/install/bin/clang" -cc1 -triple
      powerpc64-unknown-linux-gnu -S -disable-free -main-file-name test.c
      -mrelocation-model static -mdisable-fp-elim -fmath-errno
      -mconstructor-aliases -target-cpu a2q -target-linker-version
      2.20.51.0.2 -momit-leaf-frame-pointer -v
      -resource-dir /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3
 -fmodule-cache-path /var/tmp/clang-module-cache
      -internal-isystem /usr/local/include
      -internal-isystem /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
 -internal-externc-isystem /include -internal-externc-isystem /usr/include
      -fno-dwarf-directory-asm -fdebug-compilation-dir /bghome/tgooding
      -ferror-limit 19 -fmessage-length 131 -mstackrealign -fno-signed-char
      -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics
      -o /tmp/test-SrL995.s -x c test.c
      clang -cc1 version 3.3 based upon LLVM 3.3svn default target
      powerpc64-unknown-linux-gnu
      ignoring nonexistent directory "/include"
      #include "..." search starts here:
      #include <...> search starts here:
       /usr/local/include

      /bghome/blocksom/development/llvm/install/bin/../lib/clang/3.3/include
       /usr/include
      End of search list.
       "/usr/bin/as" -a64 -mppc64 -many
      -o /tmp/test-E8Sanv.o /tmp/test-SrL995.s
      /tmp/test-SrL995.s: Assembler messages:
      /tmp/test-SrL995.s:21: Error: Unrecognized opcode: `qvlfsx'
      clang: error: assembler command failed with exit code 1 (use -v to
      see invocation)

Tom Gooding
Senior Engineer / Blue Gene Kernels
507-253-0747  (internal:  553-0747)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20130315/aadd347c/attachment.html>


More information about the llvm-bgq-discuss mailing list