문제

When you are asked to hand compile into assembly language, are there multiple correct answers? For example, in https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-004-computation-structures-spring-2017/c11/c11s3/compilation_answers.pdf, can you get the correct solution even if your solution doesn't match the solution given?

도움이 되었습니까?

해결책

Yup. There are multiple sequences of assembly instructions that all do the same thing. (For instance, one trivial way to see this is to notice that you can insert a no-op instruction anywhere.) They might not all be equally good, but they'd all be correct.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 cs.stackexchange
scroll top