Commit 4aea677
committed
[PowerPC][MC] Diagnose out of range branch fixups
Currently, out-of-range branch fixups will be silently miscompiled.
GNU as will instead print a message like:
> Error: operand out of range (0x0000000000010004 is not between 0xffffffffffff8000 and 0x0000000000007ffc)
Check that the branch target fixups fit into the proper range and
have low zero bits.
I'm not sure if there is any way to test the absolute cases. It
looks like something like `beqa 0, 0x10000` already gets rejected
during parsing.
(My actual interest here is not actually assembly usage, but LLVM
producing invalid branches for reasons I've not tracked down yet.
Currently this just silently truncates the branch target, and I'd
rather make it produce an error instead.)1 parent 8177965 commit 4aea677
File tree
2 files changed
+66
-2
lines changed- llvm
- lib/Target/PowerPC/MCTargetDesc
- test/MC/PowerPC
2 files changed
+66
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
| |||
37 | 56 | | |
38 | 57 | | |
39 | 58 | | |
| 59 | + | |
40 | 60 | | |
41 | 61 | | |
42 | 62 | | |
43 | 63 | | |
| 64 | + | |
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
| |||
202 | 223 | | |
203 | 224 | | |
204 | 225 | | |
205 | | - | |
| 226 | + | |
206 | 227 | | |
207 | 228 | | |
208 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments