Asm Statements - Intel i960 User Manual

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

7
Language Implementation
the compiler treats the body of an
function as text. The compiler
asm
parses the text for symbolic names (parameters, local temporaries, and
labels). However, the compiler does not recognize function calls, memory
references, or explicit register usage within the
function text.
asm

asm Statements

You can use an
statement to pass an assembler instruction through the
asm
compiler, and you can specify the instruction's operands using C
expressions. Typically,
is used to gain access to machine instructions
asm
that have no corresponding C paradigm.
statements are somewhat similar to function calls; both use parameter
asm
mechanisms to help describe the statements' inputs. In
statements,
asm
however, an extensive mechanism is also provided for describing the
asm's effects; the compiler can then assume that an asm has no effects or
inputs that are not explicitly stated. In contrast, a function call is assumed
to read or write all program variables unless proven otherwise. No such
assumption is made for asm statements.
NOTE. The compiler assumes that the inserted assembly instructions can
only be executed immediately after the statement that precedes them, and
that after the inserted assembly instructions have been executed, program
execution resumes at the statement immediately following them.
Syntax Examples
The following brief syntax examples are provided here for reference when
studying the detailed grammar below. The effects and components of
each specific example are discussed in detail in the Examples section
below.
7-53

Advertisement

Table of Contents
loading

Table of Contents