Skip to content
Search

Calling convention

lastmod 2018-08-17created 2016-10-191 edits

In computer science, a calling convention is a scheme for how subroutines receive variables from their caller and how they return a result.

Different programming languages use different calling conventions, and so do different platforms (CPU architecture + operating system). This can cause problems when merging modules written in multiple languages, or when calling operating system and library APIs written in a different language. In such cases, special attention must be paid to coordinating the calling conventions used by the caller and the callee. Even a program written in a single programming language may use multiple calling conventions, either chosen by the compiler for code optimization or specified by the programmer.

On different platforms

  • 68k
  • x86
  • PowerPC
  • MIPS
  • SPARC
  • ARM (A32)
  • ARM (A64)
  • SuperH
  • IBM 1130
  • IBM System/360
  • Threaded code

Favorite site