MCPcopy Create free account
hub / github.com/GANGE666/xVMP / getDecodedUnaryOpcode

Function getDecodedUnaryOpcode

src/lib/Bitcode/Reader/BitcodeReader.cpp:972–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

970}
971
972static int getDecodedUnaryOpcode(unsigned Val, Type *Ty) {
973 bool IsFP = Ty->isFPOrFPVectorTy();
974 // UnOps are only valid for int/fp or vector of int/fp types
975 if (!IsFP && !Ty->isIntOrIntVectorTy())
976 return -1;
977
978 switch (Val) {
979 default:
980 return -1;
981 case bitc::UNOP_NEG:
982 return IsFP ? Instruction::FNeg : -1;
983 }
984}
985
986static int getDecodedBinaryOpcode(unsigned Val, Type *Ty) {
987 bool IsFP = Ty->isFPOrFPVectorTy();

Callers 2

parseConstantsMethod · 0.85
parseFunctionBodyMethod · 0.85

Calls 2

isFPOrFPVectorTyMethod · 0.80
isIntOrIntVectorTyMethod · 0.80

Tested by

no test coverage detected