This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: assembly macro syntax...



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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]