Assembly Constructs With Input And Output Operands - Analog Devices VISUALDSP++ 3.5 Manual

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

Advertisement

cannot use instructions with side effects, but you must be careful to notify
the compiler that you are using them by using the clobber specifiers (see
Table 1-10 on page
The compiler may eliminate supplied assembly instructions if the output
operands are not used, move them out of loops, or replace two with one if
they constitute a common subexpression. Also, if the instruction has a side
effect on a variable that otherwise appears not to change, the old value of
the variable may be reused later if it happens to be found in a register.
Use the keyword
moved, combined, or deleted. For example:
#define IOwrite(val,addr) \
asm volatile ("si="#val";IO("#addr")=si;": : :"si");
A sequence of
pletely consecutive; it may be moved across jump instructions or in other
ways that are not significant to the compiler. To force the compiler to
keep the output consecutive, use only one
use the output of the

Assembly Constructs with Input and Output Operands

The assembly constructs' output operands must be write only; cc219x
assumes that the values in these operands do not need to be preserved.
When the assembler instruction has an operand that is both read from and
written to, you must logically split its function into two separate operands:
one input operand and one write-only output operand. The connection
between them is expressed by constraints that say they need to be in the
same location when the instruction executes.
You can use the same C expression for both operands, or different expres-
sions. For example, in the following statement, the
as its read only source operand and
sock
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
1-73).
to prevent an
volatile
constructs is not guaranteed to be com-
asm volatile()
construct in a C/C++ statement.
asm()
instruction from being
asm()
asm volatile()
instruction uses
modify
as its read-write destination:
shoe
Compiler
construct, or
1-75

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?

Questions and answers

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents