SPRAC71B
February 2019 – October 2023
1
1
Introduction
1.1
ABIs for the C28x
1.2
Scope
1.3
ABI Variants
1.4
Toolchains and Interoperability
1.5
Libraries
1.6
Types of Object Files
1.7
Segments
1.8
C28x Architecture Overview
1.9
C28x Memory Models
1.10
Reference Documents
1.11
Code Fragment Notation
2
Data Representation
2.1
Basic Types
2.2
Data in Registers
2.3
Data in Memory
2.4
Pointer Types
2.5
Complex Types
2.6
Structures and Unions
2.7
Arrays
2.8
Bit Fields
2.8.1
Volatile Bit Fields
2.9
Enumeration Types
3
Calling Conventions
3.1
Call and Return
3.1.1
Call Instructions
3.1.1.1
Indirect Calls
3.1.1.2
Direct Calls
3.1.2
Return Instruction
3.1.3
Pipeline Conventions
3.1.4
Weak Functions
3.2
Register Conventions
3.2.1
Argument Registers
3.2.2
Callee-Saved Registers
3.3
Argument Passing
3.3.1
Passing 16-Bit Arguments
3.3.2
Passing Longer Arguments
3.3.3
C++ Argument Passing
3.3.4
Passing Structs and Unions
3.3.5
Stack Layout of Arguments Not Passed in Registers
3.3.6
Frame Pointer
3.4
Return Values
3.5
Structures and Unions Passed and Returned by Reference
3.6
Conventions for Compiler Helper Functions
3.7
Prolog and Epilog Helper Functions
3.8
Scratch Registers for Functions Already Seen
3.9
Interrupt Functions
4
Data Allocation and Addressing
4.1
Data Sections and Segments
4.2
Data Blocking
4.3
Addressing Modes
4.4
Allocation and Addressing of Static Data
4.4.1
Addressing Methods for Static Data
4.4.2
Placement Conventions for Static Data
4.4.2.1
Abstract Conventions for Addressing
4.4.3
Initialization of Static Data
4.5
Automatic Variables
4.6
Frame Layout
4.6.1
Stack Alignment
4.6.2
Register Save Order
4.7
Heap-Allocated Objects
5
Code Allocation and Addressing
5.1
Computing the Address of a Code Label
5.2
Calls
5.2.1
Direct Call
5.2.2
Far Call Trampoline
5.2.3
Indirect Calls
6
Helper Function API
6.1
Floating-Point Behavior
6.2
C Helper Function API
6.3
Floating-Point Helper Functions for C99
7
Standard C Library API
7.1
About Standard C Libraries
7.2
Reserved Symbols
7.3
<assert.h> Implementation
7.4
<complex.h> Implementation
7.5
<ctype.h> Implementation
7.6
<errno.h> Implementation
7.7
<float.h> Implementation
7.8
<inttypes.h> Implementation
7.9
<iso646.h> Implementation
7.10
<limits.h> Implementation
7.11
<locale.h> Implementation
7.12
<math.h> Implementation
7.13
<setjmp.h> Implementation
7.14
<signal.h> Implementation
7.15
<stdarg.h> Implementation
7.16
<stdbool.h> Implementation
7.17
<stddef.h> Implementation
7.18
<stdint.h> Implementation
7.19
<stdio.h> Implementation
7.20
<stdlib.h> Implementation
7.21
<string.h> Implementation
7.22
<tgmath.h> Implementation
7.23
<time.h> Implementation
7.24
<wchar.h> Implementation
7.25
<wctype.h> Implementation
8
C++ ABI
8.1
Limits (GC++ABI 1.2)
8.2
Export Template (GC++ABI 1.4.2)
8.3
Data Layout (GC++ABI Chapter 2)
8.4
Initialization Guard Variables (GC++ABI 2.8)
8.5
Constructor Return Value (GC++ABI 3.1.5)
8.6
One-Time Construction API (GC++ABI 3.3.2)
8.7
Controlling Object Construction Order (GC++ ABI 3.3.4)
8.8
Demangler API (GC++ABI 3.4)
8.9
Static Data (GC++ ABI 5.2.2)
8.10
Virtual Tables and the Key function (GC++ABI 5.2.3)
8.11
Unwind Table Location (GC++ABI 5.3)
9
Exception Handling
9.1
Overview
9.2
PREL31 Encoding
9.3
The Exception Index Table (EXIDX)
9.3.1
Pointer to Out-of-Line EXTAB Entry
9.3.2
EXIDX_CANTUNWIND
9.3.3
Inlined EXTAB Entry
9.4
The Exception Handling Instruction Table (EXTAB)
9.4.1
EXTAB Generic Model
9.4.2
EXTAB Compact Model
9.4.3
Personality Routines
9.5
Unwinding Instructions
9.5.1
Common Sequence
9.5.2
Byte-Encoded Unwinding Instructions
9.6
Descriptors
9.6.1
Encoding of Type Identifiers
9.6.2
Scope
9.6.3
Cleanup Descriptor
9.6.4
Catch Descriptor
9.6.5
Function Exception Specification (FESPEC) Descriptor
9.7
Special Sections
9.8
Interaction With Non-C++ Code
9.8.1
Automatic EXIDX Entry Generation
9.8.2
Hand-Coded Assembly Functions
9.9
Interaction With System Features
9.9.1
Shared Libraries
9.9.2
Overlays
9.9.3
Interrupts
9.10
Assembly Language Operators in the TI Toolchain
10
DWARF
10.1
DWARF Register Names
10.2
Call Frame Information
10.3
Vendor Names
10.4
Vendor Extensions
11
ELF Object Files (Processor Supplement)
11.1
Registered Vendor Names
11.2
ELF Header
11.3
Sections
11.3.1
Section Indexes
11.3.2
Section Types
11.3.3
Extended Section Header Attributes
11.3.4
Subsections
11.3.5
Special Sections
11.3.6
Section Alignment
11.4
Symbol Table
11.4.1
Symbol Types
11.4.2
Common Block Symbols
11.4.3
Symbol Names
11.4.4
Reserved Symbol Names
11.4.5
Mapping Symbols
11.5
Relocation
11.5.1
Relocation Types
11.5.1.1
Absolute Relocations
11.5.1.2
PC-Relative Relocations
11.5.1.3
Relocations in Data Sections
11.5.1.4
Relocations for C28x Instructions
11.5.1.5
Other Relocation Types
11.5.2
Relocation Operations
11.5.3
Relocation of Unresolved Weak References
12
ELF Program Loading and Linking (Processor Supplement)
12.1
Program Header
12.1.1
Base Address
12.1.2
Segment Contents
12.1.3
Thread-Local Storage
12.2
Program Loading
13
Build Attributes
13.1
About Build Attributes
13.2
C28x ABI Build Attribute Subsection
13.3
Build Attribute Tags
14
Copy Tables and Variable Initialization
14.1
About Copy Tables
14.2
Copy Table Format
14.3
Compressed Data Formats
14.3.1
RLE
14.3.2
LZSS Format
14.4
Variable Initialization
15
Revision History
188
8.11
Unwind Table Location (GC++ABI 5.3)
Exception handling is covered in
Chapter 9
of this document.