The texinfo manual for gcc-4.7.2 states that '=' is mandatory for output constraints, and that '+' in the output operand means that it can also be input. The rules are somewhat complicated; read the manual carefully.
As I understand it, '=' at the input does not make sense (written only input !). If the input is modified, list it as output (maybe several!). Perhaps by linking it to a garbage variable and bind it to the output by limiting the number.
Yes, it's all pretty confusing. Limitations come from the internal language that GCC uses to describe operations and evolved over time (with some backward compatibility, dropped it for spice). Accept some style and stick to it. Remember that the compiler treats your asm() snippet as a black box that needs to be copied, replacing the arguments that say it, and nothing more, just like preprocessor macros. It does not check if the addressing mode of your team makes sense if the instructions for your current computer are nothing. Just text that should be macro-exclusive and copied to the assembly. Carefully check what you say what you mean (I hope as liberal as addressing modes allow, you do not want the compiler to go through distortions to comply with undefined restrictions, but not allowing something that the instruction does not process) . Check generated assembly!
source share