The E34 M5 was produced from 1989 to 1995, although sales in North America started in 1991 and ended in 1993. It was produced at BMW M GmbH in Garching, Germany and like the previous M5, was entirely hand-built. It utilized the 535i chassis which was produced at BMW's Dingolfing plant. Assembly was done either by a single M employee or a team of M employees and generally took about two weeks. It is rumored that the test drivers of the E34 M5 could determine who or what team made each specific M5, due to characteristic quirks of the handbuilt nature of the E34 M5. The engines were also built by hand by BMW M technicians. All of the E34 M5 powerplants were built to 5% of advertised output.
The early E34 M5 used an evolution of the 24-valve I6 found in the E28 M5 and E24 M635CSi/M6. Designated S38B36, the engine technically remains a 3.5 L, with a bore of 93.4 mm and stroke of 86 mm for a total capacity of 3535 cc. The added stroke is due to a new forged steel crankshaft, though the camshafts were also changed. Compression was up slightly (10:1 versus 9.8:1). Other adjustments made included an electronically controlled butterfly valve in the intake plenum which provided better low rpm and mid-range power. The engine also featured an improved flywheel, Bosch Motronic fuel injection, equal length stainless steel headers and three way ceramic catalysts.
Source: Wikipedia (original)