Analog Devices VISUALDSP++ 3.5 Manual page 209

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

grams as well, you might want your function's name to be just as you write
it. Then you'll also need to tell the C/C++ compiler that it's an
tion, by placing
The C/C++ runtime determines that all function parameters are passed on
the stack. A good way to observe and understand how arguments are
passed is to write a dummy function in C or C++ and compile it using the
command-line switch (see
-save-temps
piler generated assembly file (.s) can then be viewed.
The following example includes the global volatile variable assignments to
indicate where the arguments can be found upon entry to
// Sample file for exploring compiler interface...
// global variables ... assign arguments there just so
// we can track which registers were used
// (type of each variable corresponds to one of arguments)
int global_a;
float global_b;
int *
global_p;
// the function itself
int asmfunc(int a, float b, int * p, int d, int e) {
//do some assignments so .s file will show where args are
global_a = a;
global_b = b;
global_p = p;
//value gets loaded into the return register
return 12345;
}
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
'extern "asm" {}'
around the prototype.
on page
1-44). The resulting com-
Compiler
func-
asm
.
asmfunc
1-171

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents