[PATCH] D60417: [libunwind] Add support for ARMv7-M architecture which uses the Thumb 2 ISA (unified syntax)
Jérémie Faucher-Goulet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 8 20:03:17 PDT 2019
jeremfg added a comment.
In D60417#1458778 <https://reviews.llvm.org/D60417#1458778>, @mstorsjo wrote:
> The change looks sensible to me, but should we maybe even skip the `#if` altogether? If the files uses unified syntax and can't be parsed in thumb mode otherwise, there's maybe no need for conditionals at all?
I'm no expert but I just read that UAL (Unified Assembler Language), while being backward compatible with the old ARM syntax, is **not** compatible with the previous Thumb syntax.
http://downloads.ti.com/docs/esd/SPNU118/unified-assembly-language-syntax-support-spnu1184444.html
But again, perhaps it doesn't matter in the specific case that concerns us here? I guess it depends on whether the code in the ###if !defined(__ARM_ARCH_ISA_ARM) && __ARM_ARCH_ISA_THUMB == 1## condition that follows contains only valid UAL syntax as well. Which I am not qualified to confirm or not.
If somebody can confirm that my understanding is correct, I could try and see if GCC throws an error during compilation for the ARMv4T, ARMv5T* and ARMv6 architectures which only supports the legacy Thumb-1, but I don't trust myself enough to rely on my own tests alone and my weak understanding to ensure I won't break support for current Thumb-1 users. Hopefully somebody else can pitch in to confirm (or infirm) my understanding.
If that's all UAL-compatible instructions, then yes I think my ###if## could be removed and only the ##.syntax unified## should be kept. At least, that's how I understand it. I could be wrong...
Perhaps some assemblers simply refuses the **.sytanx unified** directive altogether when targeting legacy Thumb-1 architectures, making this all a moot discussion?
Repository:
rUNW libunwind
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60417/new/
https://reviews.llvm.org/D60417
More information about the cfe-commits
mailing list