compiler: codegen for and immediate.

also add cycles for cmp, cpx, and cpy