Hi Eric, what you got there, looks more or less exactly like what I tried to fix with that patch a few months ago, but unfortunately we were unable to get a consensus on that approach:
[PATCH] Fix asm X constraint (PR inline-asm/59155) https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01649.html Bernd.