Due: Thu 11/04 at 9:00pm
Suppose we want to add support to Diamondback for single-precision (32-bit) floating point numbers. Describe what phases of the compiler might be impacted, and describe the changes needed.
Suppose we implemented the above correctly. Now suppose we wanted to also add support for double-precision (64-bit) numbers. Describe what else might need to change.
You do not need to go into detail about the exact assembly code produced. Instead you should focus on the impact on the compiler pipeline and semantic issues. For basics on floating point arithmetic in the x86 instruction set, see here. The most basic understanding is that there are 8 floating point registers named st0-st7 and there are special instructions for loading, storing and performing floating-point arithmetic operations on these registers.
Reminder: Every time we enhance our source language, we need to consider several things:
Its impact on the concrete syntax of the language
Examples using the new enhancements, so we build intuition of them
Its impact on the abstract syntax and semantics of the language
Any new or changed transformations needed to process the new forms
Executable tests to confirm the enhancement works as intended
You should go through this process for these features, except you do not need to write any executable tests.
Wait! Please read the assignment again and verify that you have not forgotten anything!
Please submit your homework to gradescope by the above deadline.