1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/tools/llvm-exegesis
Roman Lebedev 73b691a716 [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
..
lib [llvm-exegesis] Fix serialization/deserialization of special NoRegister register (PR41448) 2019-04-11 07:20:50 +00:00
CMakeLists.txt [llvm-exegesis] Add MCParser to LLVM_LINK_COMPONENTS 2018-09-25 08:25:29 +00:00
llvm-exegesis.cpp [llvm-exegesis] benchmarkMain(): less cryptic error if built w/o libpfm 2019-04-08 10:50:31 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00