public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* arm assembly syntax incompatible
@ 2001-07-18 19:34 Alu Minium
  2001-07-19  1:42 ` Richard Earnshaw
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alu Minium @ 2001-07-18 19:34 UTC (permalink / raw)
  To: binutils

I am trying to cross-assemble (host=solaris,
target=arm-elf) some assembly lang files which
came from ARM.  When I do, I get lots of errors. 
arm-elf-as does not like the syntax of the
files.  For example the file contains ";" as a
comment marker, but arm-elf-as attempts to
process the line as an instruction.  The file has
"include" statements that look like this:

    INCLUDE arm.equ

arm-elf-as says "INCLUDE" is a "bad instruction".

Since the files came from ARM they must (?) be
using ARM-native syntax.  

What's up?  How do I get the GNU assembler to
correctly read this syntax?

________________________________________
Get your email at 
http://www.prontomail.com 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arm assembly syntax incompatible
  2001-07-18 19:34 arm assembly syntax incompatible Alu Minium
@ 2001-07-19  1:42 ` Richard Earnshaw
  2001-07-19  2:44 ` Philip Blundell
  2001-07-19  5:45 ` Lewin A.R.W. Edwards
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Earnshaw @ 2001-07-19  1:42 UTC (permalink / raw)
  To: Alu Minium; +Cc: binutils, Richard.Earnshaw

> I am trying to cross-assemble (host=solaris,
> target=arm-elf) some assembly lang files which
> came from ARM.  When I do, I get lots of errors. 
> arm-elf-as does not like the syntax of the
> files.  For example the file contains ";" as a
> comment marker, but arm-elf-as attempts to
> process the line as an instruction.  The file has
> "include" statements that look like this:
> 
>     INCLUDE arm.equ
> 
> arm-elf-as says "INCLUDE" is a "bad instruction".
> 
> Since the files came from ARM they must (?) be
> using ARM-native syntax.  
> 
> What's up?  How do I get the GNU assembler to
> correctly read this syntax?

You can't -- you will have to translate it by hand.  GAS uses a 
'traditional UNIX' syntax.  Though I say it myself, for historical reasons 
the ARM assembler uses a very strange and non-standard syntax.

I don't ever expect the two to be compatible.

Richard.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arm assembly syntax incompatible
  2001-07-18 19:34 arm assembly syntax incompatible Alu Minium
  2001-07-19  1:42 ` Richard Earnshaw
@ 2001-07-19  2:44 ` Philip Blundell
  2001-07-19  5:45 ` Lewin A.R.W. Edwards
  2 siblings, 0 replies; 4+ messages in thread
From: Philip Blundell @ 2001-07-19  2:44 UTC (permalink / raw)
  To: Alu Minium; +Cc: binutils

>Since the files came from ARM they must (?) be
>using ARM-native syntax.  
>
>What's up?  How do I get the GNU assembler to
>correctly read this syntax?

You can't.  GNU as doesn't understand the ADS syntax.

p.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: arm assembly syntax incompatible
  2001-07-18 19:34 arm assembly syntax incompatible Alu Minium
  2001-07-19  1:42 ` Richard Earnshaw
  2001-07-19  2:44 ` Philip Blundell
@ 2001-07-19  5:45 ` Lewin A.R.W. Edwards
  2 siblings, 0 replies; 4+ messages in thread
From: Lewin A.R.W. Edwards @ 2001-07-19  5:45 UTC (permalink / raw)
  To: Alu Minium, binutils

>I am trying to cross-assemble (host=solaris,
>target=arm-elf) some assembly lang files which
>came from ARM.  When I do, I get lots of errors.
>arm-elf-as does not like the syntax of the
>
>arm-elf-as says "INCLUDE" is a "bad instruction".
>
>Since the files came from ARM they must (?) be
>using ARM-native syntax.

ARM standardizes the mnemonics and sets conventions about numeric base 
prefixes and so forth. Even if individual assembler vendors follow ARM's 
conventions on such things as address representation, those individual 
vendors are free to implement pseudo-ops and assembler directives however 
they see fit.

Translating from ARM's syntax to gas's isn't terribly difficult (even if 
you don't know ARM's syntax rules); it just takes time.


-- Lewin A.R.W. Edwards
Embedded Engineer, Digi-Frame Inc.
Work: http://www.digi-frame.com/
Tel (914) 937-4090 9am-6:30pm M-F ET
Personal: http://www.larwe.com/ http://www.zws.com/

"Far better it is to dare mighty things, to win glorious triumphs, even 
though checkered by failure, than to rank with those poor spirits who 
neither enjoy much nor suffer much, because they live in the gray twilight 
that knows not victory nor defeat."
(Theodore Roosevelt)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-07-19  5:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-18 19:34 arm assembly syntax incompatible Alu Minium
2001-07-19  1:42 ` Richard Earnshaw
2001-07-19  2:44 ` Philip Blundell
2001-07-19  5:45 ` Lewin A.R.W. Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).