assembly macro syntax...
Noonan, Michael E (Michael)
mnoonan1@lucent.com
Mon Feb 18 09:14:00 GMT 2002
> 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
More information about the Gcc-help
mailing list