Lesson 14: Making Decisions, Maybe

Outline:

  1. Data movement, cont’d
    • recap: mov
    • movz/movs/movabsq
    • push/pop (briefly)
  2. Arithmetic operations
    • operations
      • unary ops
      • binary ops
      • shift ops
    • recap: condition codes
    • setXX
  3. Translating conditional code from C to x86-64
    • recap: cmp and test
    • jumping around
    • handout on translating if/else, do-while, while, for to x86-64

Reading assignment (to be completed by the next class):

  • Bryant & O’Halloran Sec. 3.6.7 (p. 228–232)
  • Bryant & O’Halloran Sec. 3.7.1-3.7.2 (p. 238–245)