public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Re: #define in assembler file
@ 2000-10-23 21:59 Home Email
  0 siblings, 0 replies; 4+ messages in thread
From: Home Email @ 2000-10-23 21:59 UTC (permalink / raw)
  To: Art Berggreen; +Cc: crossgcc

--- Art Berggreen <art@acc.com> wrote:
> Robert Floyd wrote:
> > 
> > I am attempting to create an object file from my
> sh-hms-gcc
> > crosscompiler with an example *.s file that I
> have. But I noticed the
> > following when I type the line below:
> > 
> > ./sh-hms-gcc -o initsh.o initsh.s
> > 
> > /var/tmp/ccaJD08h.o(.text+0x20):InitSh.S:
> undefined reference to 'WCR1'
> > 
> > This is only one of many. When I look at my
> initsh.s example file for
> > the lines concerning WCR1 I find the following:
> > 
> > #define WCR1    0x05FFFFA2
> > 
> > ...and further down...
> > 
> >         .long   WCR1
> > 
> > I noticed however there is no problems with the
> use of the two byte word
> > such as:
> > 
> > #define INIT_WCR1       0x05FD
> > 
> > ....further down...
> > 
> >         .word INIT_WCR1
> > 
> > Why am I having these errors with the long words? 
> Thanks for your help.
> 
> Hmm,
> 
> #defines are handled by the C preprocessor (cpp). 
> Somewhere in the back
> of my mind I seem to recall that gcc will invoke cpp
> if the extension is
> .S (upper case) and doesn't for .s (lower case). 
> You might want to
> check in the gcc documentation.
> 
> Art
> 
> ------
> Want more information?  See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sourceware.cygnus.com
> 


Thanks, Art.  It was the *.S extension that it needed.

Robert

__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: #define in assembler file
  2000-10-23 17:55 ` Art Berggreen
@ 2000-10-23 19:41   ` Jeff/Laura Domogala
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff/Laura Domogala @ 2000-10-23 19:41 UTC (permalink / raw)
  To: Art Berggreen; +Cc: Robert Floyd, crossgcc

On Mon, 23 Oct 2000 17:50:43 -0700, you wrote:

] #defines are handled by the C preprocessor (cpp).  Somewhere in the back
] of my mind I seem to recall that gcc will invoke cpp if the extension is
] .S (upper case) and doesn't for .s (lower case).  You might want to
] check in the gcc documentation.

You can also use the gcc '-x assembler-with-cpp' language specifier to
preprocess and assemble the particular file with those #defines.  The use of .S
(capital s) as the file extension will also imply the same language option.

Hope this helps,

Jeff

Jeff/Laura/Ashley/Jason Domogala
Windham, NH
mailto:domogala@bit-net.com
http://www.bit-net.com/~domogala

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* Re: #define in assembler file
  2000-10-23 15:09 Robert Floyd
@ 2000-10-23 17:55 ` Art Berggreen
  2000-10-23 19:41   ` Jeff/Laura Domogala
  0 siblings, 1 reply; 4+ messages in thread
From: Art Berggreen @ 2000-10-23 17:55 UTC (permalink / raw)
  To: Robert Floyd; +Cc: crossgcc

Robert Floyd wrote:
> 
> I am attempting to create an object file from my sh-hms-gcc
> crosscompiler with an example *.s file that I have. But I noticed the
> following when I type the line below:
> 
> ./sh-hms-gcc -o initsh.o initsh.s
> 
> /var/tmp/ccaJD08h.o(.text+0x20):InitSh.S: undefined reference to 'WCR1'
> 
> This is only one of many. When I look at my initsh.s example file for
> the lines concerning WCR1 I find the following:
> 
> #define WCR1    0x05FFFFA2
> 
> ...and further down...
> 
>         .long   WCR1
> 
> I noticed however there is no problems with the use of the two byte word
> such as:
> 
> #define INIT_WCR1       0x05FD
> 
> ....further down...
> 
>         .word INIT_WCR1
> 
> Why am I having these errors with the long words?  Thanks for your help.

Hmm,

#defines are handled by the C preprocessor (cpp).  Somewhere in the back
of my mind I seem to recall that gcc will invoke cpp if the extension is
.S (upper case) and doesn't for .s (lower case).  You might want to
check in the gcc documentation.

Art

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

* #define in assembler file
@ 2000-10-23 15:09 Robert Floyd
  2000-10-23 17:55 ` Art Berggreen
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Floyd @ 2000-10-23 15:09 UTC (permalink / raw)
  To: crossgcc

I am attempting to create an object file from my sh-hms-gcc
crosscompiler with an example *.s file that I have. But I noticed the
following when I type the line below:

./sh-hms-gcc -o initsh.o initsh.s

/var/tmp/ccaJD08h.o(.text+0x20):InitSh.S: undefined reference to 'WCR1'


This is only one of many. When I look at my initsh.s example file for
the lines concerning WCR1 I find the following:

#define WCR1	0x05FFFFA2

...and further down...

	.long	WCR1

I noticed however there is no problems with the use of the two byte word
such as:

#define INIT_WCR1	0x05FD

....further down...

	.word INIT_WCR1

Why am I having these errors with the long words?  Thanks for your help.

Robert F.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2000-10-23 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-23 21:59 #define in assembler file Home Email
  -- strict thread matches above, loose matches on Subject: below --
2000-10-23 15:09 Robert Floyd
2000-10-23 17:55 ` Art Berggreen
2000-10-23 19:41   ` Jeff/Laura Domogala

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