This is an archive of the discontinued LLVM Phabricator instance.

[MIPS] Detect MIPS application specific extensions like micromips
ClosedPublic

Authored by jaydeep on Jul 13 2015, 2:22 AM.

Details

Reviewers
clayborg
Summary

The patch detects MIPS application specific extensions (ASE) like micromips by reading ELF header.e_flags and SHT_MIPS_ABIFLAGS section. MIPS triple does not contain ASE information like micromips, mips16, DSP, MSA etc. These can be read from header.e_flags or SHT_MIPS_ABIFLAGS section.

Diff Detail

Repository
rL LLVM

Event Timeline

jaydeep updated this revision to Diff 29537.Jul 13 2015, 2:22 AM
jaydeep retitled this revision from to [MIPS] Detect MIPS application specific extensions like micromips .
jaydeep updated this object.
jaydeep added a reviewer: clayborg.
jaydeep set the repository for this revision to rL LLVM.
jaydeep added subscribers: lldb-commits, bhushan, slthakur and 2 others.
clayborg requested changes to this revision.Jul 13 2015, 10:40 AM
clayborg edited edge metadata.

A few changes as noted in inlined comments.

source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
418

Make "features_str" a "const char *". No need to construct a std::string just to pass a string argument. Or we can use llvm::StringRef objects for triple, cpu and features_str.

693

pass features_str.c_str() if we switch to "const char *" as mentioned above, else it will make an llvm::StringRef implicitly.

source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
44

Make "features_str" a "const char *". No need to construct a std::string just to pass a string argument. Or we can use llvm::StringRef objects for triple, cpu and features_str.

This revision now requires changes to proceed.Jul 13 2015, 10:40 AM
jaydeep updated this revision to Diff 29642.Jul 13 2015, 8:59 PM
jaydeep edited edge metadata.

Addressed review comments.

clayborg accepted this revision.Jul 15 2015, 10:20 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Jul 15 2015, 10:20 AM
jaydeep closed this revision.Aug 13 2015, 10:10 PM

Closed by commit rL242381