Support for all these platforms is based on a single source tree. This is organized into machine-dependent and machine-independent parts. The machine-dependent part contains the parts specific to a particular computer architecture, which establish the connection between the hardware and the independent parts.
This division, together with the central management of the source code, is the reason why newly developed solutions are immediately available on all platforms: The time-consuming backporting of new functions is not necessary. New functions and error corrections in the machine-independent code are immediately available on all supported architectures.
This also applies to the development of new device drivers. A PCI card therefore works on IA-32, DEC Alpha, PowerPC, Sun SPARC and other architectures with PCI support. An Ethernet chip that is included on various PCI, ISA and USB devices only requires a single driver, which is then connected via various bus attachments.
(Partly translated from German Wikipedia: https://de.wikipedia.org/wiki/NetBSD)