https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111828
Peter Bergner <bergner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bergner at gcc dot gnu.org, | |dje at gcc dot gnu.org, | |meissner at gcc dot gnu.org, | |segher at gcc dot gnu.org --- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> --- (In reply to Kewen Lin from comment #0) > Technically speaking we are able to parse the inline asm string and figure > out it's HTM related or not. Excepting for the HTM specific instructions > like .tbegin etc., we also need to take care of those special registers > related to HTM feature. I don't like the idea of scanning the inline asm string for HTM instructions. The problem is, the user could have used ".long 0x7c00051d" which is a valid HTM instruction, rather than typing "tbegin.". There's just no easy way to handle all possible cases. It's also a slippery slope of peeking into the inline asm string and I don't think we want to do that! If we start doing it for this, there will just be more and more requests for doing it for other things. Let's not. I also believe that if the user compiles some inline asm using -mcpu=power10, then the compiler can assume that inline asm only uses features available on Power10, meaning we can assume the inline asm does not contain HTM or any other feature not supported on Power10. If the user compiles a piece of inline asm that doesn't support the features used in that inline asm, then that is user error!