# 2018q3 第 9 週測驗題 (中) ### 測驗 `1` 在 Y86_64 中,`addq` 指令的正確用法 (注意: 和 x86_64 不同),從下方挑選出來 ==作答區== Q12 = ? * `(a)` addq $1, %rax * `(b)` addq %rcx, %r14 * `(c)` addq (%rcx), %r14 * `(d)` addq (%rcx), (%rdx) --- ### 測驗 `2` 考慮以下 Y86 程式碼: ``` foo: rrmovq %rax, %rbx subq %rbx, %rcx irmovq $10, %rcx jle foo xorq %rcx, %rbx ``` 從以下敘述挑出正確的組合: - [ ] X: there is a data dependency between the rrmovq and subq - [ ] Y: there is a data dependency between the rrmovq and irmovq - [ ] Z: there is a data dependency between the subq and the xorq - [ ] A: there is a data dependency between the rrmovq and the xorq ==作答區== Q71 = ? * `(a)` X Y Z * `(b)` X A * `(c)` X Y A * `(d)` Y Z A * `(e)` Y Z * `(f)` X Z A