compiler: codegen for cmp, cpx, and cpy