Syntax of '.set' assembler directive in GNU assembler

View: New views
3 Messages — Rating Filter:   Alert me  

Syntax of '.set' assembler directive in GNU assembler

by Jeffi Edward.J :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I have a doubt in using GNU assembler.
I have powerpc-eabi cross toolchain with me.
I have to use powerpc-eabi-as assembler on a assembly file which is written to be compatible with Diab (powerpc cross) assembler.
My GNU assembler issues few errors in assembler directives, since the syntax differs between Diab and GNU assembly language.

For e.g, the .set directive has following syntax in GNU assembly language:
.set    SYMBOL,    value

whereas, in Diab assembly language, .set directive has 2 different syntax:
.set    SYMBOL,    value # -> the symbol may not be redefined later
SYMBOL:   .set     value # -> if redefinition is required

I could see in GNU assembler manual that for HPPA target, the syntax of .set directive is
SYMBOL:   .set     value # (same as Diab assembly syntax)

Is there any option to make GNU assembler to understand the above syntax for powerpc target?

Thanks,
Jeffi

Re: Syntax of '.set' assembler directive in GNU assembler

by Alan Modra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 27, 2009 at 10:59:33PM -0700, Jeffi Edward.J wrote:
> I could see in GNU assembler manual that for HPPA target, the syntax of .set
> directive is
> SYMBOL:   .set     value # (same as Diab assembly syntax)

I think the manual is lying.  HPPA supports a different .equ syntax
"symbol .equ value" but not a different .set syntax.

> Is there any option to make GNU assembler to understand the above syntax for
> powerpc target?

No.

--
Alan Modra
Australia Development Lab, IBM


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

Re: Syntax of '.set' assembler directive in GNU assembler

by Jeffi Edward.J :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thank you Alan.

Alan Modra wrote:
On Tue, Oct 27, 2009 at 10:59:33PM -0700, Jeffi Edward.J wrote:
> I could see in GNU assembler manual that for HPPA target, the syntax of .set
> directive is
> SYMBOL:   .set     value # (same as Diab assembly syntax)

I think the manual is lying.  HPPA supports a different .equ syntax
"symbol .equ value" but not a different .set syntax.

> Is there any option to make GNU assembler to understand the above syntax for
> powerpc target?

No.

--
Alan Modra
Australia Development Lab, IBM


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils