Weakness in personal-computer sales mixed with strong data-center sales made Advanced Micro Devices Inc. earnings a snack that was “a little crunchy on the outside, but the creamy center still tastes good.”