public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Noonan, Michael E (Michael)" <mnoonan1@lucent.com>
To: "'Dylan Cuthbert'" <dylan@q-games.com>,
	"Noonan, Michael E (Michael)" <mnoonan1@lucent.com>,
	help-gcc@gnu.org
Subject: RE: assembly macro syntax...
Date: Tue, 19 Feb 2002 15:26:00 -0000	[thread overview]
Message-ID: <A1F1AD611488D411886400508B69AD5A01C33DE5@MA8132EXCH001U> (raw)


ok...  i have gotten a little further and have a new issue...  basically all
the macros that i converted are compiling without error, but there when i
try and use the output of any of them, the compiler chokes on it with the
error message shown below.  The actual code is also shown....  and all it
does is read from a gpr and then prints the result (output).  If i co the
printf statement, it compiles without error.

Any help is appreciated.  Thanks, Mike

   __asm__ ( "mr %0 %1" : "=&r" (output) : "r" (1) );

//   __asm__ ( "or %0 %1 %2" : "=g" (output) : "g" (1), "g" (1) );

   dprintf (DPRINT_LF, "Current r1 Stack: 0x%x.", output );


[d:\exs2_rom\hdl\smc]make vxWorks
mkvers2 build.c build.sav -b
Mkvers2, ver. 4.1, Jun 28 2001 Mnoo
Output File :  build.c
Source File :  build.sav
Build Info  :  0.0.0:289-
Builder Name:
ccppc -BC:\Tornado/host/x86-win32/lib/gcc-lib/  -c build.c -o build.o
ccppc -BC:\Tornado/host/x86-win32/lib/gcc-lib/  -mstrict-align
-DVXWORKS_HDL_BUILD -nostdinc -g -O2 -fvolatil
e -fno-builtin -fno-for-scope -Wall -I./h -IC:\Tornado\target\config\smc8260
-I..\h -I..\h\diag -I..\h\drv -I
. -IC:\Tornado\target\config\all -IC:\Tornado\target/h
-IC:\Tornado\target/src/config -IC:\Tornado\target/src
/drv -DCPU=PPCEC603    -msoft-float -c ..\src\diag/excpTest.c
d:\TEMP\cca00272.s: Assembler messages:
d:\TEMP\cca00272.s:935: Error: syntax error; found `1' but expected `,'
d:\TEMP\cca00272.s:935: Error: junk at end of line: `11'
ccppc: Internal compiler error: program as got fatal signal 1
make: *** [excpTest.o] Error 0x1
[d:\exs2_rom\hdl\smc]




-----Original Message-----
From: Dylan Cuthbert [mailto:dylan@q-games.com]
Sent: Monday, February 18, 2002 10:31 PM
To: Dylan Cuthbert; Noonan, Michael E (Michael); help-gcc@gnu.org
Subject: Re: assembly macro syntax...



sorry about that... remove the .html from the URL:

http://www.geocities.com/dylan_cuthbert

---------------------------------
Q-Games, Dylan Cuthbert.
http://www.q-games.com

----- Original Message -----
From: "Dylan Cuthbert" <dylan@q-games.com>
To: "Noonan, Michael E (Michael)" <mnoonan1@lucent.com>; <help-gcc@gnu.org>
Sent: Tuesday, February 19, 2002 10:58 AM
Subject: Re: assembly macro syntax...


> check out my page which some info and links on it regarding gcc's asm
> statement- http://www.geocities.com/dylan_cuthbert.html
>
> Regards
> ---------------------------------
> Q-Games, Dylan Cuthbert.
> http://www.q-games.com
> ----- Original Message -----
> From: "Noonan, Michael E (Michael)" <mnoonan1@lucent.com>
> To: "Noonan, Michael E (Michael)" <mnoonan1@lucent.com>;
<help-gcc@gnu.org>
> Sent: Tuesday, February 19, 2002 1:51 AM
> Subject: RE: assembly macro syntax...
>
>
> >
> > > I have a simple question for anyone who knows how to write assembly
> macros
> > > for the GNU compiler.  I am trying to port macros that target the Diab
> > > compiler for PPC and am having a hell of a time figuring out the
correct
> > > syntax.  The macros are used to test the PPC exception handler by
> forcing
> > > the respective exceptions.  Here are a couple of the Diab format
> assembly
> > > macros for reference...
> > >
> > > VOID  excpTestPage (ULONG input)
> > > {
> > >    asm (" lwz r4,0(r3)");
> > > }
> > >
> > > VOID  excpTestIsi (VOID)
> > > {
> > >    asm (" .long 0x4BC00001");  // branch to 0x0F00_0000 + ip
> > > }
> > >
> > > VOID  excpTestTrap (ULONG input)
> > > {
> > >    asm (" twgti r3,5"); // trap if input is greater than 5
> > > }
> > >
> > > I have scoured the GCC manual and cannot figure it out from the given
> > > info.
> > >
> > > Any help is greatly appreciated.  Thanks, Mike
>

             reply	other threads:[~2002-02-19 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-19 15:26 Noonan, Michael E (Michael) [this message]
2002-02-19 22:17 ` Dylan Cuthbert
  -- strict thread matches above, loose matches on Subject: below --
2002-02-18  9:14 Noonan, Michael E (Michael)
2002-02-18 19:30 ` Dylan Cuthbert
2002-02-19  1:47   ` Dylan Cuthbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A1F1AD611488D411886400508B69AD5A01C33DE5@MA8132EXCH001U \
    --to=mnoonan1@lucent.com \
    --cc=dylan@q-games.com \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).