Intrinsic Functions

Intrinsic Functions

Hochsprachen-Compiler unterstützen häufig sogenannte Intrinsic Functions oder Intrinsics, bei denen prozessorspezifische Operationen in Funktionsaufrufe gekapselt werden. Anders als bei der Verwendung von inline-Assembler kann der Compiler Intrinsic Functions in vollem Umfang bei Optimierungen berücksichtigen.

Häufig muss man für die Verwendung von Intrinsic Functions bestimmte Headerdateien einbinden und/oder bestimmte Compiler-Optionen setzen[1]. Meist ist durch die Namensgebung der Intrinsic Functions sichergestellt, dass sie sich von library- oder eigenen Funktionen unterscheiden, z.B. durch zwei Unterstriche als Präfix.

Beispiele

Die Programmzeile

u32_intvalue = __ROUND(f_floatvalue);

wird vom C-Compiler für den R32C in den Assembler-Code ROUND übersetzt, wobei der Compiler die Kontrolle über die für die Variablen verwendeten Prozessor-Register hat[2]. Der ROUND-Opcode wandelt beim R32C eine Gleitkommazahl unter Berücksichtigung des für den Prozessor eingestellten Rundungsmodus in eine Integer-Zahl um.

Einzelnachweise

  1. Visual C++ Language Reference Kapitel Compiler Intrinsics von Microsoft im MSDN
  2. Absatz INTRINSIC FUNCTIONS im R32C IAR C/C++ Compiler Reference Guide der Fa. IAR Systems

Wikimedia Foundation.

Игры ⚽ Поможем написать реферат

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Intrinsic function — In compiler theory, an intrinsic function is a function available in a given language whose implementation is handled specially by the compiler. Typically, it substitutes a sequence of automatically generated instructions for the original… …   Wikipedia

  • Intrinsic Funktions — Hochsprachen Compiler unterstützen häufig sogenannte Intrinsic Functions oder Intrinsics, bei denen prozessorspezifische Operationen in Funktionsaufrufe gekapselt werden. Anders als bei der Verwendung von inline Assembler kann der Compiler… …   Deutsch Wikipedia

  • Intrinsic viscosity — left [ eta ight] is a measure of a solute s contribution to the viscosity eta of a solution. It is defined as:left [ eta ight] = lim {varphi ightarrow 0} frac{eta eta {0{eta {0}varphi} where eta 0 is the viscosity in the absence of the solute and …   Wikipedia

  • Intrinsic dimension — In signal processing of multidimensional signals, for example in computer vision, the intrinsic dimension of the signal describes how many variables are needed to represent the signal. For a signal of N variables, its intrinsic dimension M… …   Wikipedia

  • Major intrinsic proteins — Major intrinsic protein Structure of a glycerol conducting channel.[1] Identifiers Symbol M …   Wikipedia

  • Fortran language features — This is a comprehensive overview of features of the Fortran 95 language, the version supported by almost all existing Fortran compilers. Old features that have been superseded by new ones are not described few of those historic features are used… …   Wikipedia

  • Fortran — Infobox programming language name = Fortran caption = The Fortran Automatic Coding System for the IBM 704 (October 15, 1956), the first Programmer s Reference Manual for Fortran paradigm = multi paradigm: procedural, imperative, structured,… …   Wikipedia

  • Intrinsische Funktion — Hochsprachen Compiler unterstützen häufig sogenannte Intrinsic Functions oder Intrinsics, bei denen prozessorspezifische Operationen in Funktionsaufrufe gekapselt werden. Anders als bei der Verwendung von inline Assembler kann der Compiler… …   Deutsch Wikipedia

  • Microsoft Visual Studio — Visual Studio 2010 SP1 editing a WPF application Developer(s) …   Wikipedia

  • User-defined function — A User Defined Function, or UDF, is a function provided by the user of a program or environment, in a context where the usual assumption is that functions are built into the program or environment.BASIC languageIn some old implementations of the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”