I don't know about the federal level, but in NY State, the rule on engine swaps allows for a newer engine to be installed in an older car as long as the newer emissions equipment is installed as well. So swapping a 2010 k series motor into a 90s civic would be legal if you also bring the ECU (because obd counts as emissions) and the catalytic converters. At least that was my read of the law.