On Thu, Dec 22, 2005 at 02:28:08PM +0100, Piotr Wyderski wrote:
> HOST: AIX, 8 * IBM POWER2 CPU
> COMPILER: GCC 4.0.1, GCC 3.4.4
> 
> I am trying to compile my low-level library, which contains
> several inline assembly functions. It doesn't work, because
> the compiler (4.0.1) does not replace local labels from the
> assembly code (i.e. "0:", "1:", etc.) with their machine-specific
> replacements ("LCFI..4:" and so on). It generates the labels
> literally, i.e. the template
> 
>     __asm__ __volatile__("0: bne 0b")
> 
> is translated into
> 
>     [...]
> 
> 0: bne 0b
> 
> instead of, for example,
> 
> L0: bne L0
> 
> and then the assembler fails.

I don't know what you expect GCC to do here.  The contents of inline
asm are passed through without modification, except for substituting
% references.  Note, the digit labels are a standard feature of the GNU
assembler - which you are not using.

> which is exactly where the labels were emitted. GCC 3.4.4 has an
> additional bug/misfeature related with some missing instruction patterns:
> 
> Assembler:
> /tmp//ccgioejq.s: line 538: 1252-149 Instruction lwarx is not implemented in
> the current assembly mode COM.

Again, this error is coming from the AIX assembler, not from GCC.  You
ned to pass the correct options (I don't know what they are) to that
assembler to make it accept these instructions.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

Reply via email to