Fix a bug with relational operators and remove duplicate code
Fix a bug with relational operators and remove duplicate code

This commit fixes a bug with relational operators where the first
source operand was modified. Duplicate code from these operators
is also eliminated by moving it to compare().

aarmea/mumei,aarmea/mumei,aarmea/mumei