================================================== CPW Part 15: Code Generation for Jump Instructions [TOC] ================================================== ---- VIDEO ------------------------------ https://www.youtube.com/embed/UBeA7xfn3rY ----------------------------------------- Exercise ======== For unsigned integers support for conditional jumps ordered relations (See __Session 5, Page 3__): - Extend the enumerated constants as follows: ---- CODE (type=c) ------------------------------------------------------------- // supported instruction enum GenOp { GEN_CONDJMP_BEGIN, GEN_EQUAL = GEN_CONDJMP_BEGIN, GEN_NOT_EQUAL, GEN_ABOVE, GEN_ABOVE_EQUAL, GEN_BELOW, GEN_BELOW_EQUAL, GEN_CONDJMP_END, // ... }; -------------------------------------------------------------------------------- - This is our current instruction set: :import: session24/ulm-generator/0_ulm_variants/stack/isa.txt [fold] Extend it for two conditional jump instructions _jae_ (_jump above equal_) and _jbe_ (_jump below equal_). Update ~~~~~~ In the original _isa.txt_ the instruction _divq_ where all operands are registers was missing. - Adapt the implementation of _genCondJmp()_. - Extend the test for the code generation interface before you proceed. :links: Session 5, Page 3 -> doc:session05/page03#toc2.2