Hi,

does anybody know how to add assembler inliens in C
using Hightec's GNU C-Compiler?

The device I use is Infineon's TriCore 1765.

The problem is: I want to use TriCore's DSP instruction set.
I now that there is a DSP-library, but the library does not implement the
functionality I need.


-------------------------------------------------------------- 1. --------------------------------------------------------------

I tried this without success:

*asm {
     svlcx
     nop
     nop
     rslcx
};*

Error message:

../src/pj8001.c: In function `main':
../src/pj8001.c:388: parse error before `{'
make.exe[1]: *** [pj8001.o] Error 1

I tried also _asm, __asm and __asm__ ...



--------------------------------------------------------------
2.
--------------------------------------------------------------

My second try was:

*#define sin(x) \
({ double __value, __arg = (x); \
asm ("fsinx %1,%0": "=f" (__value): "f" (__arg)); \
__value; })*


../src/pj8001.c:49: parse error before `{'
../src/pj8001.c:49: stray '\' in program
../src/pj8001.c:50: parse error before `:'
../src/pj8001.c:50: stray '\' in program
../src/pj8001.c:51: warning: type defaults to `int' in declaration of `__value'
../src/pj8001.c:51: warning: data definition has no type or storage class
../src/pj8001.c:51: parse error before `}'
../src/pj8001.c: In function `uart_rx_interrupt':
../src/pj8001.c:268: `bQueries' undeclared (first use in this function)
../src/pj8001.c:268: (Each undeclared identifier is reported only once
../src/pj8001.c:268: for each function it appears in.)
../src/pj8001.c: In function `main':
../src/pj8001.c:376: `bQueries' undeclared (first use in this function)





Thank you for any help !

Andreas




Reply via email to