Professional Documents
Culture Documents
Lec 09
Lec 09
Lec 09
Dr. A. Sahu
Dept of Comp. Sc. & Engg.
Indian Institute of Technology Guwahati
1
Outline
• CISC
– X86 ISA: Intel architectures history
• Computer Arithmetic
Arithmetic's:
s:
– Integer, Float, Double: ALU, FU‐IFU/SFU/DFU
• Binary
Bi representation
t ti
• Adder/Substractor
/
• Variation of Adder
VAX instruction with 6 operands
addp6 op1,
op1 op2,
op2 op3,
op3 op4,
op4 op5,
op5 op6
⇒add two packed decimal numbers
• LLarrabee:
b A ManyM Core
C x86
86 Architecture
A hi
for Visual Computing (Craped in 2010)
Bus Interface
C BUS
Unit
SUM Q6
Q5
Q4
Q3
Q2
Q1
IP (Intr Ptr)
31 15 7 0
EAX AH AL
EBX BH BL
ECX CH CL
EDX DH DL
ESI SI (Source Idx )
EDI DI (Dest. Idx)
Extended
EBP BP (Base Ptr )
ESP SP (St
(Stackk Pt
Ptr))
EZ Z (Flag Reg)
ECS CS (Code Seg Reg)
EDS DS (Data Seg Reg )
EES ES (Extra Seg Reg )
ESS SS (Stack Seg Reg)
• 2001: Pentium 4
• Net burst, another 144 instructions (SSE2)
• 2003: PI4 HT
HT, Trace Cache
• 2005: Centrino, low power
• 2007:
2007 CCore architecture,
hit t D
Duo
• 2008: Atom, Quad core with HT….
• 2009---:Multi core (Large chip multiprocessor)
Intel x86 : peculiar feature
Upto 3 “prefixes” for an instruction
• Override default data size
• Override default segment register
• Lock bus for a semaphore
• Repeat
R t the
th ffollowing
ll i iinstruction
t ti
• Override default address size
RISC /CISC Contribution
• PowerPC : RISC with powerful branch
instructions
• SPARC : RISC with register windows
• VAX : CISC with addressing modes orthogonal
to opcodes
d
• Intel X86 : CISC with code compatibility over
several generations
Computer Arithmetic:
C ÎAssembly
Î Î Machine
• C : short,
short int,
int long,
long float,
float double
• 16 bit, 32 bit, 32 bit, 32 bit, 64 bit
• Si d/
Signed/Unsigned
i d
• Have a FU in your processor
– Processor is capable to do it in hardware
– 8086: No support of FP, 8087 FP Co processor
• If you don’t have FPU : Write FP in software
– $gcc –mfloat‐soft
mfloat soft –SS test.c
test c
– undefined reference to `__mulsf3' 15
Representation
• Int’s are not Integers, Float’s are not Reals
• Int : 8, 16, 32, 64 bit (char, short, int, long)
• Real
– Fixed point: N bit Int part . M for real part
(Software Emul)
• User defiened
– Floating point: 32,64 (float‐SingleFP/double‐
doubleFP)
• IEEE 754 format
16
Basic Units of Computer
Data
Instruction
PC Memory Reg#
Register Address
Address
Instruction Reg# FILE
ALU Data
Reg# Memory
Data
17
ALU: Arithmetic and Logic Unit
• Binary arithmetic and ALU design
• Signed operations, overflow
A
• Compare/Shift
R l
Result
• Multiplier design
• Divider design B ALU
• Speeding up addition/subtraction
• Floating point representation
and operations Operation
• Floating point unit design
18