Things I’ve Learnt

  • printf goes really spazzy if you pass in uint64_t parameters but don’t prefix the d in the format string with ll.
  • gcc inline assembler actually has some sensible parts – like the “A” constraint, which feeds in (or out) a 64-bit value split between eax and edx for use in 64-bit instructions, so you don’t have to faff around with bitmasks and stuff.
  • It is actually impossible to find the particular variation of mov you need for your specific circumstance. Oh, sure, it exists alright – hell, x86 has an instruction that I’m pretty sure calculates phases of the moon, as seen from any point in the solar system – but the instruction set documentation is shrouded in deep magic that prevents you from finding the right one for your needs.
  • Nobody other than me is really all that interested in x86 assembler.

Comments are closed.