Register Names - Backwards Compatibility

1. Intel’s First Processor - 8008

register_first

  • 8 bit registers

2. Intel’s Base Processor Structure - 8086

register_8086

  • 16bit registers
  • H and L for backward compatibility

Intel 80386

register_80386

  • “Extended” prefix for 32bit
  • Can still use 8086 register names for backward compatibility
  • After that, naming was being terrible so Intel went to make a whole new Titanium chip - didn’t work well
  • AMD takes over

AMD x86-64

amd x86-64

  • “Register” prefix
  • 9 -> 17 registers
  • for the new registers just give a number

word size

  • For backward compatibility with 8086: word is 16 bytes
  • x86-64 words are 64 bytes, and we call them quad-words

Assembly

  • Intel syntax: destination on the left

weird_compiler_behavor

  • adding 32 bits and saving to 64 bit compiler?
  • adding and pointing as if rdx and rcx is a base memory pointer?

  • weird in “human conception”
  • optimized compiler code is always not pretty, but fast and works
  • calling convention for functions - different for every architecture, each register has a unique role

assembly_function_convention