00001 #ifndef ROSE_SEMANTICSMODULE_H
00002 #define ROSE_SEMANTICSMODULE_H
00003
00004 #include <stdint.h>
00005
00006 #ifndef __STDC_FORMAT_MACROS
00007 #define __STDC_FORMAT_MACROS
00008 #endif
00009 #include <inttypes.h>
00010
00011 static inline int numBytesInAsmType(SgAsmType* ty) {
00012 switch (ty->variantT()) {
00013 case V_SgAsmTypeByte: return 1;
00014 case V_SgAsmTypeWord: return 2;
00015 case V_SgAsmTypeDoubleWord: return 4;
00016 case V_SgAsmTypeQuadWord: return 8;
00017 default: {std::cerr << "Unhandled type " << ty->class_name() << " in numBytesInAsmType" << std::endl; abort();}
00018 }
00019 }
00020
00021 #endif // ROSE_SEMANTICSMODULE_H