I have an inline AT&T style assembly block, which works with XMM registers and there are no problems in Release configuration of my XCode project, however I’ve stumbled upon this strange error (which is supposedly a GCC bug) in Debug configuration… Can I fix it somehow? There is nothing special in assembly code, but I am using a lot of memory constraints (12 constraints), can this cause this problem?
Share
Not a complete answer, sorry, but the comments section is too short for this …
Can you post a sample
asm("..." :::)line that demonstrates the problem ?The use of XMM registers is not the issue, the error message indicates that GCC wanted to create code like, say:
i.e. memory loads/stores through pointers held in general registers, and you specified more memory locations than available general-purpose regs (it’s probably 12 in debug mode because because
RBP,RSPare used for frame/stackpointer and likelyRBXfor the global offset table andRAXreserved for returns) without realizing register re-use potential.You might be able to eek things out by doing something like:
i.e. put all the mem locations into a table that you pass as operand, and then manage the actual general-purpose register use on your own. It might be two pointer accesses through the indirection table, but whether that makes a difference is hard to say without knowing your complete assembler code piece.