EXHIBIT 5.1 [LETTERHEAD OF LATHAM & WATKINS] May 8, 1998 Advanced Micro Devices, Inc. One AMD Place Sunnyvale, California 94086 Re: $517,500,000 Aggregate Principal Amount of 6% Convertible Subordinated ---------------------------------------------------------------------- Notes of Advanced Micro Devices, Inc. ------------------------------------- Ladies & Gentlemen: In connection with the public offering by Advanced Micro Devices, Inc. (the "Company") of $517,500,000 aggregate principal amount of the Company's 6% Convertible Subordinated Notes due 2005 (the "Securities") pursuant to (a) a registration statement on Form S-3 (Registration No. 333-47243) under the Securities Act of 1933, as amended (the "Securities Act"), filed with the Securities and Exchange Commission (the "Commission") on March 3, 1998, as amended by Amendment No. 1 filed with the Commission on April 17, 1998 (the "Registration Statement"), (b) a prospectus dated April 20, 1998 and the accompanying prospectus supplement dated May 5, 1998 (collectively, the "Prospectus") and (c) an indenture dated as of May 8, 1998 (the "Indenture") between the Company and The Bank of New York, as trustee (the "Trustee"), you have requested our opinion with respect to the matters set forth below. In our capacity as your special counsel in connection with the Registration Statement, we are generally familiar with the proceedings taken by the Company in connection with the authorization and issuance of the Securities. In addition, we have made such legal and factual examinations and inquiries, including an examination of originals and copies certified or otherwise identified to our satisfaction, of all such documents, corporate records and instruments of the Company as we have deemed necessary or appropriate for purposes of this opinion. In our examination, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, and the conformity to authentic original documents of all documents submitted to us as copies. Advanced Micro Devices, Inc. May 8, 1998 Page 2 We have been furnished with, and with your consent have exclusively relied upon, certificates of officers of the Company with respect to certain factual matters. In addition, we have obtained and relied upon such certificates and assurances from public officials as we have deemed necessary. We are opining herein as to the effect on the subject transaction only of the federal securities laws of the United States, the General Corporation Law of the State of Delaware and the internal laws of the State of New York, and we express no opinion with respect to the applicability thereto, or the effect thereon, of the laws of any other jurisdiction or, in the case of Delaware, any other laws, or as to any matters of municipal law or the laws of any local agencies within any state. Subject to the foregoing and the other qualifications set forth herein, it is our opinion that, as of the date hereof, the Securities have been duly authorized by the Company, and when the Securities have been duly authenticated by the Trustee and duly executed and delivered on behalf of the Company against payment therefor in accordance with the terms and provisions of the Indenture and as contemplated by the Registration Statement, the Securities will constitute valid and legally binding obligations of the Company, enforceable against the Company in accordance with the terms of the Securities. Our opinion is subject to the following exceptions, limitations and qualifications: (i) the effect of bankruptcy, insolvency, reorganization, moratorium or other similar laws now or hereafter in effect relating to or affecting the rights and remedies of creditors; (ii) the effect of general principles of equity, including without limitation, concepts of materiality, reasonableness, good faith and fair dealing and the possible unavailability of specific performance or injunctive relief, regardless of whether enforcement is considered in a proceeding in equity or at law, and the discretion of the court before which any proceeding therefor may be brought; (iii) the unenforceability under certain circumstances under law or court decisions of provisions providing for the indemnification of, or contribution to, a party with respect to a liability where such indemnification or contribution is contrary to public policy; and (iv) we express no opinion with respect to whether acceleration of the Securities may affect the collectibility of any portion of the stated principal amount thereof which might be determined to constitute unearned interest thereon or concerning the enforceability of the waiver of rights or defenses contained in Section 4.06 of the Indenture. We assume for purposes of our opinion that the Trustee is duly organized, validly existing and in good standing under the laws of its jurisdiction of organization; that the Trustee is duly qualified to engage in the activities contemplated by the Indenture; that the Indenture has been duly authorized, executed and delivered by the Trustee and constitutes a legally valid, binding and enforceable obligation of the Trustee, enforceable against the Trustee in accordance with its terms; that the Trustee is in compliance, generally and with respect to acting as Trustee under the Indenture, with all applicable laws and regulations; and that the Trustee has the requisite organizational and legal power and authority to perform its obligations under the Indenture. Advanced Micro Devices, Inc. May 8, 1998 Page 3 We consent to your filing this opinion as an exhibit to the Registration Statement and to the reference to our firm under the caption "Legal Matters" in the Prospectus included therein. Very truly yours, /s/ Latham & Watkins