A.M.D. Agrees to Buy Xilinx for $35 Billion in Stock