Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | #include "MipsGenAsmMatcher.inc" | ||||
bool parseSetAssignment(); | bool parseSetAssignment(); | ||||
bool parseDirectiveWord(unsigned Size, SMLoc L); | bool parseDirectiveWord(unsigned Size, SMLoc L); | ||||
bool parseDirectiveGpWord(); | bool parseDirectiveGpWord(); | ||||
MCSymbolRefExpr::VariantKind getVariantKind(StringRef Symbol); | MCSymbolRefExpr::VariantKind getVariantKind(StringRef Symbol); | ||||
bool isMips64() const { | bool isMips64() const { | ||||
return (STI.getFeatureBits() & Mips::FeatureMips64) != 0; | return (STI.getFeatureBits() & Mips::FeatureGP64Bit) != 0; | ||||
dsanders: We should rename this function to isGP64bit(), however we probably also need to keep isMips64()… | |||||
} | } | ||||
bool isFP64() const { | bool isFP64() const { | ||||
return (STI.getFeatureBits() & Mips::FeatureFP64Bit) != 0; | return (STI.getFeatureBits() & Mips::FeatureFP64Bit) != 0; | ||||
} | } | ||||
bool isN64() const { return STI.getFeatureBits() & Mips::FeatureN64; } | bool isN64() const { return STI.getFeatureBits() & Mips::FeatureN64; } | ||||
▲ Show 20 Lines • Show All 2,362 Lines • Show Last 20 Lines |
We should rename this function to isGP64bit(), however we probably also need to keep isMips64() to guard instructions code paths that use instructions that were added in MIPS64.
There seem to be two pre-existing mistakes involving this function which need fixing (either of us can do this, I hope to be able to get to it next week).
The first is that the use of this function in expandLoadAddressSym() needs to be changed to isMips4() since it's guarding instructions rather than register width. It should probably end up as isMips3() once we support MIPS-III, we can either have an isMips3() that really tests for MIPS-IV for now, or we can just use a isMips4().
The second is that both uses of this function in matchCPURegisterName() are really testing for either N32 or N64 rather than for MIPS64.