diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2006-08-23 19:11:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2006-08-23 19:11:14 +0000 |
commit | 83fb86f32b73942be758c22423c0bfe506fd4ff6 (patch) | |
tree | d51a136781eaccf67bfb2addfbe5330d9aed4791 /doc/supplements/c4x/callconv.t | |
parent | 2006-08-23 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-83fb86f32b73942be758c22423c0bfe506fd4ff6.tar.bz2 |
2006-08-23 Joel Sherrill <joel@OARcorp.com>
* Makefile.am, configure.ac, FAQ/stamp-vti, FAQ/version.texi,
common/cpright.texi: Merging CPU Supplements into a single document.
As part of this removed the obsolete and impossible to maintain size
and timing information.
* cpu_supplement/.cvsignore, cpu_supplement/Makefile.am,
cpu_supplement/arm.t, cpu_supplement/i386.t, cpu_supplement/m68k.t,
cpu_supplement/mips.t, cpu_supplement/powerpc.t,
cpu_supplement/preface.texi, cpu_supplement/sh.t,
cpu_supplement/sparc.t, cpu_supplement/tic4x.t: New files.
* supplements/.cvsignore, supplements/Makefile.am,
supplements/supplement.am, supplements/arm/.cvsignore,
supplements/arm/BSP_TIMES, supplements/arm/ChangeLog,
supplements/arm/Makefile.am, supplements/arm/arm.texi,
supplements/arm/bsp.t, supplements/arm/callconv.t,
supplements/arm/cpumodel.t, supplements/arm/cputable.t,
supplements/arm/fatalerr.t, supplements/arm/intr_NOTIMES.t,
supplements/arm/memmodel.t, supplements/arm/preface.texi,
supplements/arm/timeBSP.t, supplements/c4x/.cvsignore,
supplements/c4x/BSP_TIMES, supplements/c4x/ChangeLog,
supplements/c4x/Makefile.am, supplements/c4x/bsp.t,
supplements/c4x/c4x.texi, supplements/c4x/callconv.t,
supplements/c4x/cpumodel.t, supplements/c4x/cputable.t,
supplements/c4x/fatalerr.t, supplements/c4x/intr_NOTIMES.t,
supplements/c4x/memmodel.t, supplements/c4x/preface.texi,
supplements/c4x/timeBSP.t, supplements/i386/.cvsignore,
supplements/i386/ChangeLog, supplements/i386/FORCE386_TIMES,
supplements/i386/Makefile.am, supplements/i386/bsp.t,
supplements/i386/callconv.t, supplements/i386/cpumodel.t,
supplements/i386/cputable.t, supplements/i386/fatalerr.t,
supplements/i386/i386.texi, supplements/i386/intr_NOTIMES.t,
supplements/i386/memmodel.t, supplements/i386/preface.texi,
supplements/i386/timeFORCE386.t, supplements/m68k/.cvsignore,
supplements/m68k/ChangeLog, supplements/m68k/MVME136_TIMES,
supplements/m68k/Makefile.am, supplements/m68k/bsp.t,
supplements/m68k/callconv.t, supplements/m68k/cpumodel.t,
supplements/m68k/cputable.t, supplements/m68k/fatalerr.t,
supplements/m68k/intr_NOTIMES.t, supplements/m68k/m68k.texi,
supplements/m68k/memmodel.t, supplements/m68k/preface.texi,
supplements/m68k/timeMVME136.t, supplements/m68k/timedata.t,
supplements/mips/.cvsignore, supplements/mips/BSP_TIMES,
supplements/mips/ChangeLog, supplements/mips/Makefile.am,
supplements/mips/bsp.t, supplements/mips/callconv.t,
supplements/mips/cpumodel.t, supplements/mips/cputable.t,
supplements/mips/fatalerr.t, supplements/mips/intr_NOTIMES.t,
supplements/mips/memmodel.t, supplements/mips/mips.texi,
supplements/mips/preface.texi, supplements/mips/timeBSP.t,
supplements/powerpc/.cvsignore, supplements/powerpc/ChangeLog,
supplements/powerpc/DMV177_TIMES, supplements/powerpc/Makefile.am,
supplements/powerpc/PSIM_TIMES, supplements/powerpc/bsp.t,
supplements/powerpc/callconv.t, supplements/powerpc/cpumodel.t,
supplements/powerpc/cputable.t, supplements/powerpc/fatalerr.t,
supplements/powerpc/intr_NOTIMES.t, supplements/powerpc/memmodel.t,
supplements/powerpc/powerpc.texi, supplements/powerpc/preface.texi,
supplements/powerpc/timeDMV177.t, supplements/powerpc/timePSIM.t,
supplements/sh/.cvsignore, supplements/sh/BSP_TIMES,
supplements/sh/ChangeLog, supplements/sh/Makefile.am,
supplements/sh/bsp.t, supplements/sh/callconv.t,
supplements/sh/cpumodel.t, supplements/sh/cputable.t,
supplements/sh/fatalerr.t, supplements/sh/intr_NOTIMES.t,
supplements/sh/memmodel.t, supplements/sh/preface.texi,
supplements/sh/sh.texi, supplements/sh/timeBSP.t,
supplements/sparc/.cvsignore, supplements/sparc/ChangeLog,
supplements/sparc/ERC32_TIMES, supplements/sparc/Makefile.am,
supplements/sparc/bsp.t, supplements/sparc/callconv.t,
supplements/sparc/cpumodel.t, supplements/sparc/cputable.t,
supplements/sparc/fatalerr.t, supplements/sparc/intr_NOTIMES.t,
supplements/sparc/memmodel.t, supplements/sparc/preface.texi,
supplements/sparc/sparc.texi, supplements/sparc/timeERC32.t,
supplements/template/.cvsignore, supplements/template/BSP_TIMES,
supplements/template/ChangeLog, supplements/template/Makefile.am,
supplements/template/bsp.t, supplements/template/callconv.t,
supplements/template/cpumodel.t, supplements/template/cputable.t,
supplements/template/fatalerr.t, supplements/template/intr_NOTIMES.t,
supplements/template/memmodel.t, supplements/template/preface.texi,
supplements/template/template.texi, supplements/template/timeBSP.t: Removed.
Diffstat (limited to '')
-rw-r--r-- | doc/supplements/c4x/callconv.t | 161 |
1 files changed, 0 insertions, 161 deletions
diff --git a/doc/supplements/c4x/callconv.t b/doc/supplements/c4x/callconv.t deleted file mode 100644 index 94d52a05a3..0000000000 --- a/doc/supplements/c4x/callconv.t +++ /dev/null @@ -1,161 +0,0 @@ -@c -@c COPYRIGHT (c) 1988-1999. -@c On-Line Applications Research Corporation (OAR). -@c All rights reserved. -@c -@c $Id$ -@c - -@chapter Calling Conventions - -@section Introduction - -Each high-level language compiler generates -subroutine entry and exit code based upon a set of rules known -as the compiler's calling convention. These rules address the -following issues: - -@itemize @bullet -@item register preservation and usage -@item parameter passing -@item call and return mechanism -@end itemize - -A compiler's calling convention is of importance when -interfacing to subroutines written in another language either -assembly or high-level. Even when the high-level language and -target processor are the same, different compilers may use -different calling conventions. As a result, calling conventions -are both processor and compiler dependent. - -The GNU Compiler Suite follows the same calling conventions -as the Texas Instruments toolset. - -@section Processor Background - -The TI C3x and C4x processors support a simple yet -effective call and return mechanism. A subroutine is invoked -via the branch to subroutine (@code{XXX}) or the jump to subroutine -(@code{XXX}) instructions. These instructions push the return address -on the current stack. The return from subroutine (@code{XXX}) -instruction pops the return address off the current stack and -transfers control to that instruction. It is important to -note that the call and return mechanism for the C3x/C4x does not -automatically save or restore any registers. It is the -responsibility of the high-level language compiler to define the -register preservation and usage convention. - -XXX other supplements may have "is is". - -@section Calling Mechanism - -All subroutines are invoked using either a @code{XXX} -or @code{XXX} instruction and return to the user application via the -@code{XXX} instruction. - -@section Register Usage - -XXX - -As discussed above, the @code{XXX} and @code{XXX} instructions do -not automatically save any registers. Subroutines use the registers -@b{D0}, @b{D1}, @b{A0}, and @b{A1} as scratch registers. These registers are -not preserved by subroutines therefore, the contents of -these registers should not be assumed upon return from any subroutine -call including but not limited to an RTEMS directive. - -The GNU and Texas Instruments compilers follow the same conventions -for register usage. - -@section Parameter Passing - -Both the GNU and Texas Instruments compilers support two conventions -for passing parameters to subroutines. Arguments may be passed in -memory on the stack or in registers. - -@subsection Parameters Passed in Memory - -When passing parameters on the stack, the calling convention assumes -that arguments are placed on the current stack before the subroutine -is invoked via the @code{XXX} instruction. The first argument is -assumed to be closest to the return address on the stack. This means -that the first argument of the C calling sequence is pushed last. The -following pseudo-code illustrates the typical sequence used to call a -subroutine with three (3) arguments: - -@example -@group -push third argument -push second argument -push first argument -invoke subroutine -remove arguments from the stack -@end group -@end example - -The arguments to RTEMS are typically pushed onto the -stack using a @code{sti} instruction with a pre-incremented stack -pointer as the destination. These arguments must be removed -from the stack after control is returned to the caller. This -removal is typically accomplished by subtracting the size of the -argument list in words from the current stack pointer. - -@c XXX XXX instruction .. XXX should be code format. - -With the GNU Compiler Suite, parameter passing via the -stack is selected by invoking the compiler with the -@code{-mmemparm XXX} argument. This argument must be -included when linking the application in order to -ensure that support libraries also compiled assuming -parameter passing via the stack are used. The default -parameter passing mechanism is XXX. - -When this parameter passing mecahanism is selected, the @code{XXX} -symbol is predefined by the C and C++ compilers -and the @code{XXX} symbol is predefined by the assembler. -This behavior is the same for the GNU and Texas Instruments -toolsets. RTEMS uses these predefines to determine how -parameters are passed in to those C3x/C4x specific routines -that were written in assembly language. - -@subsection Parameters Passed in Registers - -When passing parameters via registers, the calling convention assumes -that the arguments are placed in particular registers based upon -their position and data type before the subroutine is invoked via -the @code{XXX} instruction. - -The following pseudo-code illustrates -the typical sequence used to call a subroutine with three (3) arguments: - -@example -@group -move third argument to XXX -move second argument to XXX -move first argument to XXX -invoke subroutine -@end group -@end example - -With the GNU Compiler Suite, parameter passing via -registers is selected by invoking the compiler with the -@code{-mregparm XXX} argument. This argument must be -included when linking the application in order to -ensure that support libraries also compiled assuming -parameter passing via the stack are used. The default -parameter passing mechanism is XXX. - -When this parameter passing mecahanism is selected, the @code{XXX} -symbol is predefined by the C and C++ compilers -and the @code{XXX} symbol is predefined by the assembler. -This behavior is the same for the GNU and Texas Instruments -toolsets. RTEMS uses these predefines to determine how -parameters are passed in to those C3x/C4x specific routines -that were written in assembly language. - -@section User-Provided Routines - -All user-provided routines invoked by RTEMS, such as -user extensions, device drivers, and MPCI routines, must also -adhere to these calling conventions. - |