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

Thomas Gooding tgooding at us.ibm.com
Fri Mar 15 14:22:18 CDT 2013


Ah, found it - - that seems to do it.  Thanks!

Tom Gooding
Senior Engineer / Blue Gene Kernels
507-253-0747  (internal:  553-0747)



|------------>
| From:      |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
  |Hal Finkel <hfinkel at anl.gov>                                                                                                                   |
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
  |Thomas Gooding/Rochester/IBM at IBMUS,                                                                                                            |
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
  |llvm-bgq-discuss at lists.alcf.anl.gov                                                                                                            |
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
  |03/15/2013 02:17 PM                                                                                                                            |
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [Llvm-bgq-discuss] llvm-bgq and inlined assembly                                                                                           |
  >-----------------------------------------------------------------------------------------------------------------------------------------------|





Tom,

Yes, but as you point out, you need to use the patched assembler. For our
installation here, I have a bgclang wrapper script which sets all of the
necessary options. Did Michael put a version of that script on your system
as well?

 -Hal

----- Original Message -----
> From: "Thomas Gooding" <tgooding at us.ibm.com>
> To: llvm-bgq-discuss at lists.alcf.anl.gov
> Sent: Friday, March 15, 2013 2:12:04 PM
> Subject: [Llvm-bgq-discuss] llvm-bgq and inlined assembly
>
>
>
>
> 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)
>
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20130315/f2845c15/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20130315/f2845c15/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20130315/f2845c15/attachment-0003.gif>


More information about the llvm-bgq-discuss mailing list