[Llvm-bgq-discuss] Interpreting CLANG assembly

Hal Finkel hfinkel at anl.gov
Mon Apr 22 11:56:27 CDT 2013


----- Original Message -----
> From: "Thomas Gooding" <tgooding at us.ibm.com>
> To: llvm-bgq-discuss at lists.alcf.anl.gov
> Sent: Monday, April 22, 2013 11:16:53 AM
> Subject: Re: [Llvm-bgq-discuss] Interpreting CLANG assembly
> 
> 
> 
> 
> Hal Finkel <hfinkel at anl.gov> wrote on 04/18/2013 03:45:45 PM:
> > > After increasing the verbosity (bgclang -v), the assembler call
> > > looks
> > > incorrect:
> > > "/bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.
> > 4.6/../../../../powerpc64-bgq-linux/bin/as"
> > > -a64 -mppc64 -many -o start.o /tmp/start-9mU46t.s
> > > 
> > > Whereas I think it should be:
> > > "/bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.
> > 4.6/../../../../powerpc64-bgq-linux/bin/as"
> > > -a64 -ma2q -many -o start.o /tmp/start-9mU46t.s
> > > 
> > > Maybe there's a way to configure this somewhere?
> > 
> > I'll need to update it in the driver; thanks for investigating
> > this!
> > The problem is that Clang tries to cheat, in a sense, and instead
> > of
> > trying to figure out exactly which architecture to use for
> > different
> > ppc64 cores, it just passes -many (which should enable all
> > extensions). However, this may fall down where embedded extensions
> > are involved. If you take the assembly file and compile it with the
> > default as command line, but add -mbooke, does that make it work?
> > 
> > -Hal
> 
> Unfortunately, adding -mbooke does not help. I get same error
> messages:
> 
> /bgsys/drivers/ppcfloor/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/../../../../powerpc64-bgq-linux/bin/as
> -a64 -mppc64 -many -o start.o a.s -mbooke
> start.S: Assembler messages:
> start.S:278: Error: junk at end of line: `1,0'
> start.S:938: Error: junk at end of line: `1,0'
> start.S:1189: Error: junk at end of line: `1,0'
> start.S:1428: Error: junk at end of line: `1,0'
> start.S:1630: Error: junk at end of line: `1,0'

Okay; looking at the binutils source, it seems that form of the mtfsf instruction is indeed tied to specific processors (POWER6|PPCA2|PPC476 specifically), and not enabled by 'any'. Clang will need to stop cheating, I'll fix this.

Thanks again,
Hal

> 
> 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
> 


More information about the llvm-bgq-discuss mailing list