Page MenuHomePhabricator

[x86] [MC] fixed no error diagnostic for out-of-range jrcxz/jecxz/jcxz (PR24072)
Needs ReviewPublic

Authored by kbelochapka on Aug 21 2017, 4:54 PM.

Details

Reviewers
craig.topper
Summary

Fixed no diagnostic message problem for out of range fixup value for loop/loope/loopne/jcxz/jecxz/jrcxz instructions.

Diff Detail

Event Timeline

kbelochapka created this revision.Aug 21 2017, 4:54 PM
craig.topper added inline comments.Aug 24 2017, 3:14 PM
lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
153–165

Why is this (Size * 8) - 1 now?

kbelochapka added inline comments.Aug 24 2017, 3:19 PM
lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
153–165

signed 8 bit PC relative value

craig.topper added inline comments.Aug 24 2017, 3:36 PM
lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
153–165

To detect if something is a signed 8 bit value, isIntN expects to be passed 8. Not 7.

kbelochapka added inline comments.Aug 24 2017, 3:57 PM
lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
153–165

you are absolutely right, will correct this

as was pointed by Craig, corrected isIntN() argument mistake

This revision is now accepted and ready to land.Aug 24 2017, 6:28 PM

treat PC relative fixups as signed values and absolute fixups as unsigned values

kbelochapka requested review of this revision.Sep 15 2017, 2:59 PM
kbelochapka edited edge metadata.

Reimplemented fixup overflow check, treat PC relative fixup values as signed values and absolute fixup values as unsigned values.

Craig, can you please when you have chance, review the update that I had made for the initial fix of the bug.