compute opcode and size for immediate instructions