This is an archive of the discontinued LLVM Phabricator instance.

llvm-objdump bug may hide a single-byte instruction near a label.
ClosedPublic

Authored by srking on Aug 12 2014, 8:50 AM.

Details

Reviewers
rafael
Group Reviewers
deleted
Summary

An off-by-one bug in the target indepedent llvm-objdump code prevents display of a single byte instruction before a label.

Diff Detail

Event Timeline

srking updated this revision to Diff 12401.Aug 12 2014, 8:50 AM
srking retitled this revision from to llvm-objdump bug may hide a single-byte instruction near a label..
srking updated this object.
srking edited the test plan for this revision. (Show Details)
srking added a reviewer: deleted.
srking added a project: deleted.
srking added a subscriber: Unknown Object (MLST).
silvas added a subscriber: silvas.Aug 12 2014, 2:56 PM

Just a drive-by comment, but you probably need to put the test in the X86 directory if it depends on the x86 disassembler.

I also wondered about the best location for the input file. The bug is not specific to x86 and there is precedence for x86 files in the Inputs directory, so I just chose that location. I don't care where the test input ultimately lands, but I'll leave it as-is unless somebody insists to move it.

rafael added inline comments.
tools/llvm-objdump/llvm-objdump.cpp
499

The first line in the comment about the initialization of End. The second line is about the "if (Start == End)".

It would probably be better to split the comment.

srking updated this revision to Diff 12466.Aug 13 2014, 1:18 PM
srking edited the test plan for this revision. (Show Details)

New patch uploaded:

  1. Moved test file to X86 subdirectory
  2. Ungrouped code comments.

Thanks reviewers.

rafael accepted this revision.Aug 13 2014, 1:29 PM
rafael added a reviewer: rafael.

LGTM

This revision is now accepted and ready to land.Aug 13 2014, 1:29 PM