@bogong said in Using ASM (x86) with Qt on MacOS with CMake. How?:
What is missing by me?
That the error messages imply that you try to use x86 assembly but your compilation is targeting arm64 (hence the assembler's complaints about the eax register not existing; and you getting offered ARM mnemonics like movz, probably in response to you trying to use the movl mnemonic which is x86 only).
Make sure you target only x86_64 in your build (in CMake, you have CMAKE_OSX_ARCHITECTURES).
Or if you want to target ARM, you need to use ARM assembly code which is completely different to x86 assembly.
If you are building universal binaries, then you need to write a different version of the inline assembly block for each architecture, and direct to the correct one with preprocessor macros.
May I ask why you think you need inline assembly? There is quite possibly an easier approach.