[PATCH] D74927: [MC][ARM] make Thumb function also if type attribute is set

Stefan Agner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 15:14:50 PST 2020


falstaff84 marked 2 inline comments as done and an inline comment as not done.
falstaff84 added a comment.

In D74927#1891751 <https://reviews.llvm.org/D74927#1891751>, @MaskRay wrote:

> [...]
>  On the Linux kernel side, it'd be nice to make a change anyway if that moves us away from an edge case.


I tried changing Linux first, but it is not entirely trivial as there are different cases (where only the `ENDPROC` macro is used and hence would require more invasive changes). Also I think the Linux case is quite straight forward, as it is always defined within the label and at a point where the assembler is still in Thumb mode. Hence my current approach using the mode when the type directive is found works...

In D74927#1891713 <https://reviews.llvm.org/D74927#1891713>, @psmith wrote:

> [...]
>
>   For the case where .type comes after the definition. I think that using mapping symbols could work well, although I don't think that they could be used directly as we only record the last mapping symbol and we need the first mapping symbol after the definition. I think that if the pending labels have been flushed then a reverse search up the Symbols defined in MCAssembler looking for the closest mapping symbol in the same fragment as the definition would work.


>From the comments I guess an approach using mapping symbol is requested? While I understand conceptually what we want I am a bit lost how to implement this exactly. From what I understand we generate mapping symbols of some kind already? I tried to find them in code but wasn't really successful... Can you maybe give me a more concrete pointer?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74927/new/

https://reviews.llvm.org/D74927





More information about the llvm-commits mailing list