0% found this document useful (0 votes)
132 views17 pages

Lecture#8-Instruction Set Architecture - 012458

The document discusses instruction set architecture (ISA) at the level between compilers and hardware. It describes properties of the ISA level including memory models, registers, data types, and instruction formats. Specifically, it provides examples of registers in the Pentium II and UltraSPARC II ISAs, common data types like integers and floating point, and different instruction formats with varying numbers of addresses. Maintaining backward compatibility is important when developing new machines.

Uploaded by

ALI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views17 pages

Lecture#8-Instruction Set Architecture - 012458

The document discusses instruction set architecture (ISA) at the level between compilers and hardware. It describes properties of the ISA level including memory models, registers, data types, and instruction formats. Specifically, it provides examples of registers in the Pentium II and UltraSPARC II ISAs, common data types like integers and floating point, and different instruction formats with varying numbers of addresses. Maintaining backward compatibility is important when developing new machines.

Uploaded by

ALI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

Instruction Set Architecture

Computer Organization

Lecture #8
Jahan Zeb
ISA Level
 ISA level defines the interface
between the compilers and the
hardware
 Backward compatibility
 New machine
 Predecessor Compatibility
 Operating System
 Applications Unmodified

Lecture #8, ISA 2


Properties of the ISA Level
 Memory Models
 Registers
 Types of instructions
 Normative
 Which impose requirements
 Informative
 Intended to help the reader but are not part of definitions
 Kernel Mode
 Allows all instructions
 User Mode
 Allow application programs and not permit certain sensitive
instructions
Lecture #8, ISA 3
Memory Models

 Memory divided into cells, consecutive addresses, common size is 8 bits


 Many architectures require words to be aligned on their natural
boundaries
 Alignment is illustrated in figure (a)
 Having the ability to read words at arbitrary addresses requires extra
logic on the chip, which makes it bigger and more expensive
Lecture #8, ISA 4
Registers
 ISA level registers can be divided into two categories:
 Special Purpose Registers: include registers like program
counter, stack pointer, as well as other registers with a
specific function
 General Purpose Registers: are there to hold key local
variables and intermediate results of calculations
 On some machines, the general purpose registers are
completely symmetric and interchangeable, at some machines
general purpose registers can be a bit special e.g. EDX in
Pentium II

Lecture #8, ISA 5


contd…
 Even general purpose registers are interchangeable it is
common to adopt conventions about how they are used,
system-wide conventions regarding some registers should be
adhered
 Special purpose registers only available in kernel mode,
controls various caches, memory, I/O devices etc
 Control register: Flag Register or Program Status Word, hold
various bits needed by the CPU e.g. condition codes
 N: set when the result was Negative
 Z: set when the result was Zero
 V: Set when the result caused an oVerflow
Lecture #8, ISA 6
Pentium II ISA Level
 Instrucions
 Main feature of the ISA level is its set of machine
instructions, these control what a machine can do
 LOAD, STORE, MOVE
 In figure, first four registers: EAX, EBX, ECX,
EDX are general purpose registers
 EAX: arithmetic register, EBX: hold pointers,
ECX: Looping, EDX: Multiplication/Division

Lecture #8, ISA 7


Overview of Pentium II ISA Level
The Pentium IIs primary registers.

Lecture #8, ISA 8


Pentium II ISA Level Primary Registers

 ESI and EDI are used to hold pointers in memory


 EBP, points to stack frame, frame pointer
 ESP, is the stack pointer
 CS through GS are segment registers used by
predecessor
 EIP: Program Counter
 EFLAGS: which is the PSW

Lecture #8, ISA 9


UltraSPARC II ISA Level
 In order to make procedure calls more efficient, organization of
registers is a bit complex
 It has two groups of registers: general purpose registers and
floating point registers
 Conventional functions are listed in figure, though it would be
unwise to deviate from the listed uses
 Global variables: variables and pointers needed in all
procedures
 Three dedicated registers are used for special purposes, FP, SP,
R31
 Register Window, using registers as a stack
 Current Window Pointer keeps track of which register set is in
use
Lecture #8, ISA 10
Lecture #8, ISA 11
Data Types
 For processing computers require data
 Computer systems process commercial, financial,
engineering etc data
 Data has to be represented inside the computer
 At ISA level variety of data types are used
 Numeric Data Types
 Non Numeric Data Types

Lecture #8, ISA 12


Numeric Data Types
 Integers
 Count things (No. of computers, cars etc)
 Identify things (Bank Account Numbers, Credit card numbers,
passwords)
 Integers can be further categorized into unsigned and signed
integers, an unsigned integer contains no sign bit and all the bits
contain data
 Floating Point
 For numbers like, 2.7, 7.7, 0.5 etc, floating point data types are
used
 Many Computers have separate registers for holding integer
operands and for holding floating point operands
Lecture #8, ISA 13
Nonnumeric Data Types
 Characters
 For the representation of various characters, character data type is
used
 Most common character codes are ASCII, UNICODE
 Character Strings
 For handling consecutive run of characters, special instructions are
intended to handle character strings
 Instructions can perform copy, search, edit and other functions on
strings
 Boolean
 Boolean value can take one or two values: true or false
 In practice, a byte or a word is used per Boolean value because
individual bits in a byte do not have their own addresses
 Bit Map: Consecutive 1 bit Boolean values

Lecture #8, ISA 14


contd…
 Pointers
 Just an address
 Accessing a variable at a fixed location we require
pointer

Lecture #8, ISA 15


Instruction Formats
 An instruction consists upon an ‘opcode’ and ‘address’
 Opcode is usually along with information e.g. where
operands come from, where results go to
 Specifying where the operands are (i.e. addresses) is
called addressing
 Figure shows several possible formats for instructions,
having opcode and address(s)
 There can be a zero, one, two, or three addresses present

Lecture #8, ISA 16


Instruction Formats

Four common instruction formats:


(a) Zero-address instruction. (b) One-address instruction
(c) Two-address instruction. (d) Three-address instruction.

Lecture #8, ISA 17

You might also like