Implement new cast creation functions for both instructions and constant