EasyManua.ls Logo

Intel i960 - Page 243

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i960 Processor Compiler User's Guide
7-54
7
Example 1: sf1 (Simple)
asm volatile ("mov 0,sf1");
Example 2: sf1 (Complex)
asm volatile ("mov sf1,%0; mov %1,sf1":
"=&d" (old_mask) : "dI" (new_mask));
Example 3: emul
asm("emul %1,%2,%0" : "=t" (temp) : "dI" (in1), "dI" (in2));
Example 4: synmovq
__asm__ volatile ("synmovq %2,%3" : "=m"(*IAC_dst)
: "m"(*IAC_p),"d"(IAC_dst),"d"(IAC_p)); }
Example 5: attadd
__asm__ __volatile__("atadd %4,%2,%1" : "=m"(*p),"=d"(wtmp)
: "dI"(val),"m" (*p),"d"(p));
Example 6: modpc
__asm__ __volatile__("modpc %1,%1,%0" : "=d"(new_pc)
: "dI"(mask),"0"(new_pc)));
asm Statement Syntax
asm statements have the following syntax:
asm [ volatile ] (
asm-template
[
asm-interface
] ) ;
asm-template
A C language ASCII string containing
zero or more
substitution-
directives
.
substitution-directive %d where no white space follows the %,
and
d is a decimal digit.
asm-interface :[out-list][:[in-
list][:clobber-list]]
out-list output-spec [,out-list]...
in-list input-spec
[,in-list]...

Table of Contents

Related product manuals