16. Real Stuff : ARMv8(64-bit) Instructions
16.1. ARM v8 Instructions
In moving to 64-bit
→ memory addressing 때문에 32bit → 64bit으로 바뀜
→ MIPS와 비슷해짐
ARM v8 resembles MIPS
No conditional execution field
GPR set expanded to 32
Branch if equal/branch if not equal instructions
17. Real Stuff : x86 Instructions
17.1. The Intel x86 ISA
Evolution with backward compatibility
8086(1978) : 16-bit extension to 8080
Complex instruction set(CISC)
Pentium(1993)
: superscalar, 64-bit datapath
Later versions
added MMX(multi-Media eXtension) instructions
MMX :
SIMD(Single Instruction Multiple Data) 명령어 집합
The infamous FDIV(Floating point division) bug
AMD64(2003) : extended architecture to 64bits
EM64T - Extended Memory 64 Technology(2004)
AMD64 adopted by Intel
17.1. x86 Instruction Encoding
Variable length encoding
Postfix bytes specify addressing mode
Prefix bytes modify operation
18. Fallacies and Pitfalls
18.1. Fallacies
Powerful instruction ⇒ higher performance ?
Fewer instructions required
But complex instructions are hard to implement
May slow down all instructions, including simple ones
Use assembly code for high performance ?
But modern compilers are better at dealing with modern processors
Backward compatibility → Instruction set doesn’t change ?
But they do accrete more instructions
18.2. Pitfalls
Sequential words are not at sequential addresses
Increment by 4
Keeping a pointer to an automatic variable after procedure returns
Pointer becomes invalid when stack popped
19. Concluding Remarks
19.1. Concluding Remarks