Commit f342d79
authored
[ARM] Auto-decode pred operands of Thumb instructions (llvm#156540)
Most predicable Thumb instructions do not encode the predicate operand,
but rather take it from an enclosing IT block.
Add `bits<0> p` to the encoding of these instructions to make the
predicate operand decodable by the generated code.
The previous approach was to analyze an instruction after it has been
decoded and add missing predicate operand if necessary. The
post-decoding pass is still required to check predicate applicability
and advance IT block state, but it no longer modifies a decoded
instruction.
Some of the custom decoder methods have become redundant and can be
removed in the future, delegating the decoding task to TableGen-erated
decoder.
Pull Request: llvm#1565401 parent b9bdec3 commit f342d79
File tree
8 files changed
+167
-76
lines changed- llvm
- lib/Target/ARM
- Disassembler
- utils/gn/secondary/llvm/lib/Target/ARM/Disassembler
- utils/bazel/llvm-project-overlay/llvm
8 files changed
+167
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
| 1223 | + | |
1223 | 1224 | | |
1224 | 1225 | | |
1225 | 1226 | | |
| |||
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
| 1248 | + | |
1247 | 1249 | | |
1248 | 1250 | | |
1249 | 1251 | | |
| |||
1343 | 1345 | | |
1344 | 1346 | | |
1345 | 1347 | | |
| 1348 | + | |
1346 | 1349 | | |
1347 | 1350 | | |
1348 | 1351 | | |
| |||
1361 | 1364 | | |
1362 | 1365 | | |
1363 | 1366 | | |
| 1367 | + | |
1364 | 1368 | | |
1365 | 1369 | | |
1366 | 1370 | | |
| |||
2221 | 2225 | | |
2222 | 2226 | | |
2223 | 2227 | | |
| 2228 | + | |
2224 | 2229 | | |
2225 | 2230 | | |
2226 | 2231 | | |
| |||
2234 | 2239 | | |
2235 | 2240 | | |
2236 | 2241 | | |
| 2242 | + | |
2237 | 2243 | | |
2238 | 2244 | | |
2239 | 2245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
| |||
492 | 493 | | |
493 | 494 | | |
494 | 495 | | |
| 496 | + | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
| |||
524 | 526 | | |
525 | 527 | | |
526 | 528 | | |
| 529 | + | |
527 | 530 | | |
528 | 531 | | |
529 | 532 | | |
| |||
537 | 540 | | |
538 | 541 | | |
539 | 542 | | |
| 543 | + | |
540 | 544 | | |
541 | 545 | | |
542 | 546 | | |
| |||
551 | 555 | | |
552 | 556 | | |
553 | 557 | | |
| 558 | + | |
554 | 559 | | |
555 | 560 | | |
556 | 561 | | |
| |||
566 | 571 | | |
567 | 572 | | |
568 | 573 | | |
| 574 | + | |
569 | 575 | | |
570 | 576 | | |
571 | 577 | | |
| |||
825 | 831 | | |
826 | 832 | | |
827 | 833 | | |
| 834 | + | |
828 | 835 | | |
829 | 836 | | |
830 | 837 | | |
| |||
855 | 862 | | |
856 | 863 | | |
857 | 864 | | |
| 865 | + | |
858 | 866 | | |
859 | 867 | | |
860 | 868 | | |
| |||
873 | 881 | | |
874 | 882 | | |
875 | 883 | | |
| 884 | + | |
876 | 885 | | |
877 | 886 | | |
878 | 887 | | |
| |||
883 | 892 | | |
884 | 893 | | |
885 | 894 | | |
| 895 | + | |
886 | 896 | | |
887 | 897 | | |
888 | 898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2059 | 2059 | | |
2060 | 2060 | | |
2061 | 2061 | | |
| 2062 | + | |
2062 | 2063 | | |
2063 | 2064 | | |
2064 | 2065 | | |
| |||
2074 | 2075 | | |
2075 | 2076 | | |
2076 | 2077 | | |
| 2078 | + | |
2077 | 2079 | | |
2078 | 2080 | | |
2079 | 2081 | | |
| |||
2089 | 2091 | | |
2090 | 2092 | | |
2091 | 2093 | | |
| 2094 | + | |
2092 | 2095 | | |
2093 | 2096 | | |
2094 | 2097 | | |
| |||
2104 | 2107 | | |
2105 | 2108 | | |
2106 | 2109 | | |
| 2110 | + | |
2107 | 2111 | | |
2108 | 2112 | | |
2109 | 2113 | | |
| |||
2128 | 2132 | | |
2129 | 2133 | | |
2130 | 2134 | | |
| 2135 | + | |
2131 | 2136 | | |
2132 | 2137 | | |
2133 | 2138 | | |
| |||
2146 | 2151 | | |
2147 | 2152 | | |
2148 | 2153 | | |
| 2154 | + | |
2149 | 2155 | | |
2150 | 2156 | | |
2151 | 2157 | | |
| |||
2164 | 2170 | | |
2165 | 2171 | | |
2166 | 2172 | | |
| 2173 | + | |
2167 | 2174 | | |
2168 | 2175 | | |
2169 | 2176 | | |
| |||
2182 | 2189 | | |
2183 | 2190 | | |
2184 | 2191 | | |
| 2192 | + | |
2185 | 2193 | | |
2186 | 2194 | | |
2187 | 2195 | | |
| |||
4030 | 4038 | | |
4031 | 4039 | | |
4032 | 4040 | | |
4033 | | - | |
4034 | | - | |
4035 | | - | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
4036 | 4046 | | |
4037 | 4047 | | |
4038 | 4048 | | |
| |||
5481 | 5491 | | |
5482 | 5492 | | |
5483 | 5493 | | |
| 5494 | + | |
5484 | 5495 | | |
5485 | 5496 | | |
5486 | 5497 | | |
| |||
5509 | 5520 | | |
5510 | 5521 | | |
5511 | 5522 | | |
| 5523 | + | |
5512 | 5524 | | |
5513 | 5525 | | |
5514 | 5526 | | |
| |||
5540 | 5552 | | |
5541 | 5553 | | |
5542 | 5554 | | |
| 5555 | + | |
5543 | 5556 | | |
5544 | 5557 | | |
5545 | 5558 | | |
| |||
5551 | 5564 | | |
5552 | 5565 | | |
5553 | 5566 | | |
| 5567 | + | |
5554 | 5568 | | |
5555 | 5569 | | |
5556 | 5570 | | |
| |||
5563 | 5577 | | |
5564 | 5578 | | |
5565 | 5579 | | |
| 5580 | + | |
5566 | 5581 | | |
5567 | 5582 | | |
5568 | 5583 | | |
| |||
5826 | 5841 | | |
5827 | 5842 | | |
5828 | 5843 | | |
| 5844 | + | |
5829 | 5845 | | |
5830 | 5846 | | |
5831 | 5847 | | |
| |||
5841 | 5857 | | |
5842 | 5858 | | |
5843 | 5859 | | |
| 5860 | + | |
5844 | 5861 | | |
5845 | 5862 | | |
5846 | 5863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
0 commit comments