Intel i960 User Manual page 252

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

Advertisement

Language Implementation
"dI" (new_mask)
constraint
a constant from 0 to 31. The compiler generates extra code as
necessary to make sure
before the asm is generated.
Example 3: emul.c
The example refers to Example 7-3 below. The asm containing the
instruction is shown in bold.
Example 7-3 emul.c
typedef struct
{
unsigned int lo32;
int hi32;
}
int64;
typedef int int32;
static inline
int64 asm_emul(int32 in1, int32 in2)
{
int64 temp;
asm("emul %1,%2,%0"
return temp;
}
int32 mul32_check_overflow(int32 a, int32 b)
{
int64 t;
t = asm_emul(a, b);
if ((t.lo32 & 0x80000000) != 0)
{
is the only
indicates that operand 1 must be in a word register, or be
new_mask
if (t.hi32 == -1) /*upper32 matches lower32 sign bit*/
. It is operand 1. The "
input-spec
matches one of the
: "=t" (temp)
: "dI" (in1), "dI" (in2));
7
"
dI
constraints
emul
continued
7-63

Advertisement

Table of Contents
loading

Table of Contents