[PATCH] Fix inline assembly that switches between ARM and Thumb modes
garious at gmail.com
Sun Dec 15 10:18:48 PST 2013
Renato, reverting the mode correctly is not too easy. It isn't enough to set the feature bits back to what they were. We'd need to detect if the .arm/.thumb directive is missing and if the adr and its label are missing. And for anything missing, inject it.
I think the latest patch here is an improvement over the current situation. Rather than generate broken machine code, it allows switching between thumb and arm modes and vice versa, and it detects when the user code failed to switch back.
I don't disagree that there's more that could be done here, but I think Step 1 is to fix the correctness bug with the least invasive change, and that's the aim of this patch.
More information about the llvm-commits