Due on November 20th @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
Due on November 20th @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
In class, we have used the two registers (the base pointer and the stack pointer) to track the boundaries of an activation record. A mysterious cloaked figure claims to have implemented a A compiler that only needs to use the stack pointer. Is this possible for A? How about for other languages?
Assume that your nemesis has invented a language with the following aspects:
Consider the following 3AC snippet. What code is generated from each
quad to create X64 code?
Q1: [b] := 1
Q2: ifz [b] goto Q4
Q3: [b] := 0
Q4: nop