EasyManuals Logo

Infineon TriCore TC1.6P User Manual

Infineon TriCore TC1.6P
484 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #23 background imageLoading...
Page #23 background image
TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set Overview
V1.0 2013-07
User Manual (Volume 2) 2-1
2 Instruction Set Overview
This chapter provides an overview of the TrICore® Instruction Set Architecture (ISA). The basic properties and
use of each instruction type are desribed, together with a description of the selection and use of the 16-bit (short)
instructions.
2.1 Integer Arithmetic
This section covers the following topics:
• Move, page 2-1
• Addition and Subtraction, page 2-1
• Multiply and Multiply-Add, page 2-2
• Division, page 2-2
• Absolute Value, Absolute Difference, page 2-2
• Min, Max, Saturate, page 2-2
• Conditional Arithmetic Instructions, page 2-2
• Logical, page 2-3
• Count Leading Zeros, Ones and Signs, page 2-3
• Shift, page 2-4
• Bit-Field Extract and Insert, page 2-4
2.1.1 Move
The move instructions move a value in a data register or a constant value in the instruction to a destination data
register, and can be used to quickly load a large constant into a data register.
A 16-bit constant is created using MOV (which sign-extends the value to 32-bits) or MOV.U (which zero-extends
to 32-bits).
The MOVH (Move High-word) instruction loads a 16-bit constant into the most-significant 16 bits of the register
and zero fills the least-significant 16-bits. This is useful for loading a left-justified constant fraction.
Loading a 32-bit constant is achieved by using a MOVH instruction followed by an ADDI (Add Immediate), or a
MOV.U followed by ADDIH (Add Immediate High-word).
2.1.2 Addition and Subtraction
The addition instructions have three versions:
• ADD (No saturation)
• ADDS (Signed saturation)
• ADDS.U (Unsigned saturation)
For extended precision addition, the ADDX (Add Extended) instruction sets the PSW carry bit to the value of the
ALU carry out. The ADDC (Add with Carry) instruction uses the PSW carry bit as the carry in, and updates the
PSW carry bit with the ALU carry out. For extended precision addition, the least-significant word of the operands
is added using the ADDX instruction, and the remaining words are added using the ADDC instruction. The ADDC
and ADDX instructions do not support saturation.
It is often necessary to add 16-bit or 32-bit constants to integers. The ADDI (Add Immediate) and ADDIH (Add
Immediate High) instructions add a 16-bit, sign-extended constant or a 16-bit constant, left-shifted by 16. Addition
of any 32-bit constant is carried out using ADDI followed by an ADDIH.
All add instructions except those with constants, have similar corresponding subtract instructions. Because the
immediate of ADDI is sign-extended, it may be used for both addition and subtraction.
The RSUB (Reverse Subtract) instruction subtracts a register from a constant. Using zero as the constant yields
negation as a special case.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Infineon TriCore TC1.6P and is the answer not in the manual?

Infineon TriCore TC1.6P Specifications

General IconGeneral
BrandInfineon
ModelTriCore TC1.6P
CategoryMicrocontrollers
LanguageEnglish

Related product manuals