US chipmaker AMD to buy programmer Xilinx for $35B