Fourth-quarter earnings hit by greater investments in advanced chip manufacturing