added support for CMP/SEQ, SNE and SLT

the changes haven't been tested completely, so the code (or at least lines 213 to 245) should be checked for errors