Page MenuHomePhabricator

[lld] Check for branch range overflows.

Authored by sidneym on Oct 11 2019, 9:27 AM.

Diff Detail

Event Timeline

sidneym created this revision.Oct 11 2019, 9:27 AM
Herald added a project: Restricted Project. · View Herald Transcript
bcain accepted this revision.Oct 11 2019, 10:01 AM

LGTM, but suggestions for stricter test case.

5–9 ↗(On Diff #224614)

I'd make the subsequent ones CHECK-NEXT.

Also may make sense to constrain the FileCheck with implicit-check-not='out of range' to make sure no range errors are emitted that aren't checked for.

This revision is now accepted and ready to land.Oct 11 2019, 10:01 AM
lebedev.ri retitled this revision from Check for branch range overflows. to [lld] Check for branch range overflows..Oct 11 2019, 10:25 AM
sidneym updated this revision to Diff 224637.Oct 11 2019, 11:00 AM

Update test case.

MaskRay added inline comments.Oct 11 2019, 6:18 PM
5 ↗(On Diff #224637)


If such branch relocation types have a categorical name, e.g. jump, consider rename this test to something like hexagon-jump-error.s

aarch64-lo21-error.s  # the name is good
MaskRay added inline comments.Oct 11 2019, 6:20 PM
21 ↗(On Diff #224637)

Consider moving the CHECK lines just before the corresponding instructions.

28 ↗(On Diff #224637)

If jump #b15 works, you can delete the local label pc15.

sidneym updated this revision to Diff 224866.Oct 14 2019, 9:11 AM

Update and rename testcase.

ruiu accepted this revision.Oct 15 2019, 3:31 AM


This revision was automatically updated to reflect the committed changes.