Types of Operations Data Transfer Arithmetic Logical Conversion

  • Slides: 16
Download presentation
Types of Operations • • Data Transfer Arithmetic Logical Conversion I/O System Control Transfer

Types of Operations • • Data Transfer Arithmetic Logical Conversion I/O System Control Transfer of Control

Data Transfer • Specify – Source & Destination – Length of data – Addressing

Data Transfer • Specify – Source & Destination – Length of data – Addressing mode • May be different instructions for different movements – e. g. IBM 370 • Or one instruction and different addresses – e. g. VAX

Arithmetic • • Add, Subtract, Multiply, Divide Signed Integer Floating point May include –

Arithmetic • • Add, Subtract, Multiply, Divide Signed Integer Floating point May include – Increment (a++) – Decrement (a--) – Negate (-a)

Logical • • Bitwise operations AND, OR, NOT, XOR EQUAL – binary test Shift

Logical • • Bitwise operations AND, OR, NOT, XOR EQUAL – binary test Shift and rotate operations

Shift and Rotate Operations

Shift and Rotate Operations

Conversion • E. g. Binary to Decimal • S/390’s TR(translate instruction) TR R 1,

Conversion • E. g. Binary to Decimal • S/390’s TR(translate instruction) TR R 1, R 2, L R 2 start address of a table of 8 bit codes L bytes starting at address R 1 are translated, each byte being replaced by the contents of a table entry indexed by that byte

Input/Output • May be specific instructions • May be done using data movement instructions

Input/Output • May be specific instructions • May be done using data movement instructions (memory mapped) • May be done by a separate controller (DMA)

Systems Control • Privileged instructions • CPU needs to be in specific state For

Systems Control • Privileged instructions • CPU needs to be in specific state For operating systems use

Transfer of Control • Branch – e. g. branch to x if result is

Transfer of Control • Branch – e. g. branch to x if result is zero • Skip – e. g. increment and skip if zero – ISZ Register 1 – Branch xxxx – ADD A • Subroutine call or procedure call

Branch Instruction

Branch Instruction

Nested Procedure Calls

Nested Procedure Calls

Use of Stack

Use of Stack

Stack Frame Growth Using Sample Procedures P and Q

Stack Frame Growth Using Sample Procedures P and Q

Pentium and Power PC operation types • Pentium operation types: • Call/ Return instructions:

Pentium and Power PC operation types • Pentium operation types: • Call/ Return instructions: – provides 4 instructions: – CALL – ENTER – LEAVE – RETURN

Memory Management • Specialized instructions which deals with memory segmentation Condition codes: Pentium MMX

Memory Management • Specialized instructions which deals with memory segmentation Condition codes: Pentium MMX instructions: introduced in 1996 set of highly optimized instructions for multimedia tasks

 • Packet byte • Packed word • Packed double word Power PC operation

• Packet byte • Packed word • Packed double word Power PC operation types: • Branch oriented instructions – 9 conditional branch instructions Load/store instructions – Data size – Sign extension