x86asm: Add popcnt
commit2309517066c545f79b7228cfc2f4cf5539ffd6ff
authorMichael Matz <matz@suse.de>
Thu, 7 Jul 2022 15:02:39 +0000 (7 17:02 +0200)
committerMichael Matz <matz@suse.de>
Tue, 16 Aug 2022 13:59:41 +0000 (16 15:59 +0200)
treed4aa3f6e68e7db53a4fbde49985009af67ca56da
parent98bab41cba27a7da9ebf40389212e811ee2277ac
x86asm: Add popcnt

as this is the first opcode TCC supports that has a 0xf3 prefix
and uses integer registers (not SSE ones) this also needs some shuffling
of the prefix code to not generate invalid instructions (the REX prefix
_must_ come directly before the main opcode (including 0f prefix), and
hence needs to come after the 0xf3 prefix).  Also disable some mnemonics
in asmtest.S that new GAS doesn't support anymore.  The only difference
to GAS (in asmtest.S) is now the 'lock negl' instruction which TCC
emits as 'lock; negl'.  That's fine.
i386-asm.c
i386-asm.h
i386-tok.h
tests/Makefile
tests/asmtest.S
x86_64-asm.h