1. 94成大電通
哪一項符合design principle的"simplicity favors regurality"?
(a) Keeping all insturctions in a single size
(b) Always requiring three operands in arithmetic instruction
(c) Keeping the register fields in the same place in each instruction format
(d) Having the same opcode field in the same place in each instruction format
答案: (a) (b) (c)
請問d為甚麼錯? 雖然課本舉例的"一致才會簡單"是舉前3個而已,
但d應該也是符合一致性吧?
2. 104台大資工
In each ISA's calling convention, the set of general purpose registers is
usually divided into caller-save and callee-save two subsets. Which type of procedures could
benefit most from such a register partition?
答案: If general purpose registers is not divided into caller-save and callee-save
subsets, the caller must maintain all the registers allocated to the frequently used local
variables even though the callee don’t have any local variables. That is, if the
callee-procedure has no local variables, it could benefit most from such a register partition.
請問為何是對callee較好? 不是減輕caller的負擔嗎?