hanchenye-llvm-project/llvm/test/tools/llvm-exegesis
Roman Lebedev fbb823891d [llvm-exegesis] Fix serialization/deserialization of special NoRegister register (PR41448)
Summary:
A *lot* of instructions have this special register.
It seems this never really worked, but i finally noticed it only
because it happened to break for `CMOV16rm` instruction.

We serialized that register as "" (empty string), which is naturally
'ignored' during deserialization, so we re-create a `MCInst` with
too few operands.

And when we then happened to try to resolve variant sched class
for this mis-serialized instruction, and the variant predicate
tried to read an operand that was out of bounds since we got less operands,
we crashed.

Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=41448 | PR41448 ]].

Reviewers: craig.topper, courbet

Reviewed By: courbet

Subscribers: tschuett, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60517

llvm-svn: 358153
2019-04-11 07:20:50 +00:00
..
AArch64 [llvm-exegesis] Fix function return generation so it doesn't return register 0 2018-10-10 13:03:23 +00:00
X86 [llvm-exegesis] Fix serialization/deserialization of special NoRegister register (PR41448) 2019-04-11 07:20:50 +00:00
lit.local.cfg [llvm-exegesis] Add lit tests (v2). 2018-09-25 13:59:35 +00:00