Assignment on Spim machine descriptions

Problem Statement

  1. Level 2: Run the following code for given machine descriptions
    int i=2,j=3;
    int main()
    int a;
    Does the compilation fail? If yes, they why? And how can we rectify this?

  2. Level 1: Eliminate all define_insn started (i,e, define_insn(*...)) and define a new define_insn which will handle all the deleted patterns.

  3. Level 1: Support basic floating point patterns for assignment patterns by using the given .c, .h and protos.h files. One has to make change only in the .md file. (Hint: Mode for supporting floating point is SF mode).

  4. Level 2: Modify the pattern "addsi" by using define_expand and justify your observation.

  5. Level 2: Modify the left shift instruction so that the shifting can be done for some number less than N. N should be an immediate operand. And also it should give an error when n is not an integer. (Hint: Use define_expand)