2009-02-03 06:49:04 calling asembly function in c code
Kaustubh Vaidya (INDIA)
Message: 68719
Hi
I am compiling C program to calculate DCT. In this program I have to use asembly functions but I dont know how to call them in main C program .So please guide me in this issue
Thank you............
QuoteReplyEditDelete
2009-02-03 07:15:22 Re: calling asembly function in c code
Pavel Frolov (BELARUS)
Message: 68722
Try to read this:
http://docs.blackfin.uclinux.org/doku.php?id=using_in-line_assembly_calling_external_assembly_from_c
QuoteReplyEditDelete
2009-02-03 07:36:24 Re: calling asembly function in c code
Kaustubh Vaidya (INDIA)
Message: 68757
Thank you for reply but after using this URL it is giving me message This topic does not exist.
so what is other link available?
QuoteReplyEditDelete
2009-02-03 08:02:58 Re: calling asembly function in c code
Robin Getz (UNITED STATES)
Message: 68761
Kaustubh:
Works for me:
http://docs.blackfin.uclinux.org/doku.php?id=using_in-line_assembly_calling_external_assembly_from_c
-Robin
QuoteReplyEditDelete
2009-02-03 08:45:50 Re: calling asembly function in c code
Kaustubh Vaidya (INDIA)
Message: 68766
Bascically I am trying to port a sample DCT program written for vdsp to linux enviornment .It consist of following files;
1.cycle_count.asm
2.mds_def.h
3.r8x8dct.asm
4.tr8x8dct.c
5.tr8x8dct.h
while compiling the main file that is r8x8dct.c I got some warnings along with error messages-
tr8x8dct.c:14: error: parameter ‘error_flag’ is initialized
tr8x8dct.c:15: error: storage class specified for parameter ‘f1’
tr8x8dct.c:16: error: storage class specified for parameter ‘cycle_count’
tr8x8dct.c:18: error: storage class specified for parameter ‘_r8x8dct’
tr8x8dct.c:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr8x8dct.c:18: error: declaration for parameter ‘_r8x8dct’ but no such parameter
tr8x8dct.c:16: error: declaration for parameter ‘cycle_count’ but no such parameter
tr8x8dct.c:15: error: declaration for parameter ‘f1’ but no such parameter
tr8x8dct.c:14: error: declaration for parameter ‘error_flag’ but no such parameter
tr8x8dct.h:91: error: declaration for parameter ‘Testcase4_out’ but no such parameter
tr8x8dct.h:76: error: declaration for parameter ‘Testcase4_In’ but no such parameter
tr8x8dct.h:52: error: declaration for parameter ‘Testcase3_out’ but no such parameter
tr8x8dct.h:37: error: declaration for parameter ‘Testcase2_out’ but no such parameter
tr8x8dct.h:17: error: declaration for parameter ‘const_data2’ but no such parameter
tr8x8dct.h:16: error: declaration for parameter ‘const_data1’ but no such parameter
tr8x8dct.h:15: error: declaration for parameter ‘zero_in’ but no such parameter
tr8x8dct.h:10: error: declaration for parameter ‘in’ but no such parameter
tr8x8dct.c:123: error: expected ‘{’ at end of input
so whether this is happening due to some files are not properly changed in ?
I am attaching files
r8x8dct.asm
tr8x8dct.h
tr8x8dct.c
mds_def.h
cycle_count.asm
QuoteReplyEditDelete
2009-02-03 11:38:37 Re: calling asembly function in c code
Mike Frysinger (UNITED STATES)
Message: 68782
then review the VDSP porting pages: