International Business Machines Corp. and Cummins Engine Co. were the top corporate donors to charity in 1989, according to a survey.

IBM, which contributed $135 million to charity in 1989, gave the most money, while Cummins Engine was first in percentage of pretax income. The Indiana diesel maker's $3.4 million in contributions last year represented 16.5 percent of net income before taxes.Public Management Institute of San Francisco listed the top givers among U.S. businesses in its second annual "Generosity Index."

Among dollar leaders, Hewlett-Packard Co. of Palo Alto was second with $74.5 million in donations, and General Motors was third with $62.2 million.

Behind Cummins in percentage leaders was Adolph Coors Co., which donated $4 million, or 15.6 percent of 1989 pretax income. Safeway Stores Inc. of Oakland was third with $14 million in contributions, or 14.9 percent of pretax income.

Despite a looming recession, Public Mangement Institute President Kenneth Gilman predicted contributions will remain steady this year. He said most companies have told PMI their 1990 contributions are about the same or a little higher than last year's.