altivecpim.pdf

(2195 KB) Pobierz
ALTIVECPIM/D
6/1999
Rev. 0
AltiVec
Technology
Programming Interface Manual
DigitalDNA and Mfax are trademarks of Motorola, Inc.
The PowerPC name and the PowerPC logotype are trademarks of International Business Machines Corporation used by Motorola under license from
International Business Machines Corporation.
This document contains information on a new product under development. Motorola reserves the right to change or discontinue this product without notice.
Information in this document is provided solely to enable system and software implementers to use PowerPC microprocessors. There are no express or
implied copyright licenses granted hereunder to design or fabricate PowerPC integrated circuits or integrated circuits based on the information in this
document.
Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee
regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product
or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters can and do
vary in different applications. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical
experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized
for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other
application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use
Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries,
affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly,
any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent
regarding the design or manufacture of the part. Motorola and
are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/
Affirmative Action Employer.
Motorola Literature Distribution Centers:
USA/EUROPE:
Motorola Literature Distribution; P.O. Box 5405; Denver, Colorado 80217; Tel.: 1-800-441-2447 or 1-303-675-2140/
JAPAN:
Nippon Motorola Ltd SPD, Strategic Planning Office 4-32-1, Nishi-Gotanda Shinagawa-ku, Tokyo 141, Japan Tel.: 81-3-5487-8488
ASIA/PACIFC:
Motorola Semiconductors H.K. Ltd.; 8B Tai Ping Industrial Park, 51 Ting Kok Road, Tai Po, N.T., Hong Kong; Tel.: 852-26629298
Mfaxª:
RMFAX0@email.sps.mot.com; TOUCHTONE 1-602-244-6609; US & Canada ONLY (800) 774-1848;
World Wide Web Address:
http://sps.motorola.com/mfax
INTERNET:
http://motorola.com/sps
Technical Information:
Motorola Inc. SPS Customer Support Center 1-800-521-6274; electronic mail address: crc@wmkmail.sps.mot.com.
Document Comments:
FAX (512) 895-2638, Attn: RISC Applications Engineering.
World Wide Web Addresses:
http://www.mot.com/PowerPC
http://www.mot.com/netcomm
http://www.mot.com/HPESD
© Motorola Inc. 1999. All rights reserved.
Overview
1
High-Level Language Interface
2
Application Binary Interface
3
AltiVec Operations and Predicates
4
AltiVec Instruction Set/Operations/Predicates Cross-Reference
A
Glossary of Terms and Abbreviations
GLO
Index
IND
1
Overview
2
High-Level Language Interface
3
Application Binary Interface
4
AltiVec Operations and Predicates
A
AltiVec Instruction Set/Operations/Predicates Cross-Reference
GLO
Glossary of Terms and Abbreviations
IND
Index
CONTENTS
Paragraph
Number
Title
Page
Number
Audience .............................................................................................................. xvi
Organization......................................................................................................... xvi
Suggested Reading.............................................................................................. xvii
PowerPC Documentation................................................................................ xvii
General Information....................................................................................... xviii
Chapter 1
Overview
1.1
1.2
High-Level Language Interface ........................................................................... 1-1
Application Binary Interface (ABI) ..................................................................... 1-2
Chapter 2
High-Level Language Interface
2.1
2.2
2.2.1
2.2.2
2.3
2.3.1
2.3.2
2.3.3
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5
2.5.1
2.5.2
2.5.3
2.5.4
2.6
Data Types ........................................................................................................... 2-1
New Keywords..................................................................................................... 2-2
The Keyword and Predefine Method............................................................... 2-2
The Context Sensitive Keyword Method......................................................... 2-3
Alignment ............................................................................................................ 2-3
Alignment of Vector Types ............................................................................. 2-3
Alignment of Non-Vector Types ..................................................................... 2-3
Alignment of Aggregates and Unions Containing Vector Types .................... 2-3
Extensions of C/C++ Operators for the New Types ............................................ 2-4
sizeof() ............................................................................................................. 2-4
Assignment ...................................................................................................... 2-4
Address Operator ............................................................................................. 2-4
Pointer Arithmetic............................................................................................ 2-4
Pointer Dereferencing ...................................................................................... 2-4
Type Casting .................................................................................................... 2-5
New Operators ..................................................................................................... 2-5
Vector Literals ................................................................................................. 2-5
Vector Literals and Casts................................................................................. 2-6
Value for Adjusting Pointers ........................................................................... 2-7
New Operators Representing AltiVec Operations........................................... 2-7
Programming Interface ........................................................................................ 2-8
Chapter 3
Application Binary Interface (ABI)
3.1
3.2
Data Representation ............................................................................................. 3-1
Register Usage Conventions ................................................................................ 3-1
MOTOROLA
Contents
v
Zgłoś jeśli naruszono regulamin