Implement lcmp.