Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
240
Descriptions of intrinsic functions
AVR® IAR C/C++ Compiler
Reference Guide
_ _multiply_unsigned
unsigned int _ _multiply_unsigned(unsigned char, unsigned char);
Generates a 
MUL
 instruction.
_ _no_operation
void _ _no_operation(void);
Generates a 
NOP
 instruction.
_ _require
void _ _require(void *);
Sets a constant literal as required. 
One of the prominent features of the IAR XLINK Linker is its ability to strip away 
anything that is not needed. This is a very good feature because it reduces the resulting 
code size to a minimum. However, in some situations you may want to be able to 
explicitly include a piece of code or a variable even though it is not directly used.
The argument to 
_ _require
 could be a variable, a function name, or an exported 
assembler label. It must, however, be a constant literal. The label referred to will be 
treated as if it would be used at the location of the 
_ _require
 call.
Example
In the following example, the copyright message will be included in the generated 
binary file even though it is not directly used. 
#include <intrinsics.h>
char copyright[] = "Copyright 2005 by XXXX";
void main(void)
{
_ _require(copyright);
[... the rest of the program ...]
}
_ _restore_interrupt
void _ _restore_interrupt(unsigned char oldState);
This intrinsic function will restore the interrupt flag to the specified state.
Note: The value of 
oldState
 must be the result of a call to the 
_ _save_interrupt
 
intrinsic function.
_ _reverse
unsigned int _ _reverse(unsigned int);
This intrinsic function reverses the byte order of the value given as parameter. Avoid 
using 
_ _reverse
 in complex expressions as it might introduce extra register copying.