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的负担吗?