[PATCH] D69411: [MC] Calculate difference of symbols in two fragments when possible
Jian Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 14:33:49 PDT 2019
jcai19 added a comment.
In D69411#1725261 <https://reviews.llvm.org/D69411#1725261>, @peter.smith wrote:
> I'd like to see some more test cases for the error cases. Off the top of my head I can think of these cases:
>
> // Align fragment in between MCDataFragments
> 9997: nop ;
> .align 4
> nop
> .if . - 9997b == 4 ;
>
>
> // Fill (I think) fragment in between MCDataFragments
> 9997: nop ;
> .space 4
> nop
> .if . - 9997b == 4 ;
>
>
> // Relaxable (in Thumb) fragment in between MCDataFragments
> 9997: nop ;
> b external
> nop
> .if . - 9997b == 4 ;
>
>
> // Constant pool between MCDataFragments,
> 9997:
> ldr r0,=0x12345678 ;
> .ltorg
> nop
> .if . - 9997b == 4 ;
>
>
> There is also something called a MCCompactEncodingInstFragment that would cause this to fail, but I think that only exists as part of NaCl bundle locking, which I think isn't too much of a concern.
Thanks for providing these test cases! It seems the third and fourth case do not produce any errors as expected (even with arm gcc). Will dig more.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69411/new/
https://reviews.llvm.org/D69411
More information about the llvm-commits
mailing list