In order to support hot-patching, we need to make sure the first emitted instruction in a function a two-byte+ op. This is already the case on x86_64, which seems to always emit two-byte+ ops. However on 32-bit targets this wasn't the case.
Whenever using the "patchable-function" attribute, a PATCHABLE_OP now lowers to a XCHG AX, AX, (66 90) like MSVC does. However when targetting pentium3 or i386 targets with /arch:IA32 or /arch:SSE, we generate MOV EDI,EDI (8B FF) like MSVC does. This is for compatiblity reasons with older tools that rely on this byte pattern.
The goal of this patch, along with D43002 and D80833, is to support the clang-cl flag /hotpatch: https://docs.microsoft.com/sv-se/cpp/build/reference/hotpatch-create-hotpatchable-image?view=vs-2019
Since you are changing the signature, you can rename it to emitNops as well to conform to the coding standards.