I would think that is perfectly OK. You are copying exactly one x86 assembly language instruction, "cpuid". I don't think anyone would make an issue of that. In fact, it is likely that that code came from some other place anyway, using that to discover everything from # of cores to cache size and such is quite common...
Yes, I would have to agree. In the case of the above function, ecx register is right shifted 23 bits to see if it is set and ANDed with 1, for SSE4a (population count) instruction support. The snippet is pretty much generic as there aren't really many other ways of calling cpuid opcode. A slight modification for vendor checking: