SDKZSPF LSI, SDKZSPF Datasheet - Page 83
![no-image](/images/manufacturer_photos/0/4/400/lsi_sml.jpg)
SDKZSPF
Manufacturer Part Number
SDKZSPF
Description
Manufacturer
LSI
Datasheet
1.SDKZSPF.pdf
(356 pages)
Specifications of SDKZSPF
Lead Free Status / Rohs Status
Supplier Unconfirmed
- Current page: 83 of 356
- Download datasheet (6Mb)
3.10.4 Explicitly Clobbered Registers
3.10.5 Examples of asm Directive
3.10.5.1 Example 1
3.10.5.2 Example 2
3.10.5.3 Example 3
The syntax for an explicitly clobbered register is:
This entry tells the compiler that the assembly code generated will
clobber the specified register. Thus the generated assembly code may
use the specified register for scratch purposes.
The examples in the subsections below illustrate the usage of the asm
directive.
asm(“norm.e %0, %1”:
The example shown above has one output argument, ret, and one input
expression, a. If the variable ret is in r0 and the variable a is in r4, this
directive produces:
asm(“abs r5, %1\n\tst r5, %0” : :
The example shown above stores the absolute value of val at addr.
Two instructions are generated by this directive. There are two input
expressions and no output arguments. Note that register r5 is clobbered
by this directive. If addr is in a0 and val is in r15, this directive
produces:
asm(“mac.%m0 %2, %o2” :
Inline Assembly
Copyright © 1999-2003 by LSI Logic Corporation. All rights reserved.
“register name”
“=r” (ret) :
“r” (a));
norm.e r0, r4
“e” (addr), “r” (val) :
“r5”);
abs r5, r15
st r5, a0
“=c” (acc) :
3-29