Labels by Inline ASM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi !
Please, help me.
I need _quickly_ add two  _unsigned_ 
long and test carry flag.

For Example:
////////////////////////////////////////////////

int AddULong(ulong a, ulong b, ulong *c)
{
   *c = a + b;
    asm volatile("jc  La1");
        return 0;   // carry == 0
La1:  return 1;  //  carry == 1
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////
Compile width gcc-3.2.2 ( in Linux Red Hat 9 )

g++ -DHAVE_CONFIG_H -I. -I. -I.. -Wnon-virtual-dtor -Wno-long-long -Wundef 
-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi 
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -O0 -g3 -Wall 
-fno-exceptions -fno-check-new -c -o Mach.o `test -f 'Mach.cpp' || echo 
'./'`Mach.cpp 

Mach.cpp: warning: label `La1' defined but not used    <------   !!!!
Mach.cpp: undefined reference to `La1'                       <------???

////////////////////////////////////////////////////////////////////////////////////////////////////////////

If know how, please mail me.

Thanks a lot for your time!!

Best regards.   

         Eugene.     MailTo ezeml@xxxxxxxxxxx


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux