Skip to content
所有標籤

#x86-64

6 篇文章

Stanford CS107 Lecture 15:看懂 x86-64 addressing modes,分清位址和值

CS107 第 15 講把 x86-64 的 mov 拆成 immediate、register、absolute、indirect、displacement、indexed 與 scaled indexed operands,並以 D + R[b] + R[i]×s 統一解讀 pointer dereference 和 array access。

Stanford CS107 Lecture 16:從 subregister 到 ALU,讀懂 x86-64 算術與位元運算

CS107 第 16 講把 b/w/l/q 資料寬度、subregister、movs/movz、lea、呼叫慣例、算術邏輯與 shift 串成一套規則:先確定操作寬度,再追蹤來源、目的與是否真的讀取記憶體。

Stanford CS107 Lecture 18:從 condition codes 到 loops,讀懂 x86-64 條件控制

CS107 第 18 講以 ZF/SF/CF/OF 串起 cmp、test、signed/unsigned conditional jumps,再拆解 if、loops、dynamic instruction count、setcc 與 cmovcc。

Stanford CS107 Lecture 17:從乘除法到 %rip,讀懂 x86-64 control flow

CS107 第 17 講先完成 x86-64 的 full-width multiplication 與 division,再沿著 instruction bytes 追蹤 %rip,最後以 direct/indirect jmp 說明程式如何離開預設的順序執行。

Stanford CS107 Lecture 19:從 call/ret 到 calling convention,讀懂 x86-64 函式呼叫

CS107 第 19 講追蹤 %rsp、push/pop、call/ret、parameters、return values、stack locals 與 caller/callee register discipline,建立可跨函式維持資料與控制流的 ABI 契約。

Stanford CS107 Lecture 14:從 C 到 x86-64,第一次讀懂反組譯輸出

CS107 第 14 講用 sum_array 的 10 條 x86-64 指令拆開反組譯輸出:左側是位址與機器碼,右側是 AT&T assembly;讀者的任務是由 opcode、operand、register 與控制流程還原 C,而不是手寫組合語言。