Metal-semiconductor diode