912 }
913 }
914
915
916 // Return the type signature for the ideal operation
917 const char *ArchDesc::getIdealType(const char *idealOp) {
918 // Find last character in idealOp, it specifies the type
919 char last_char = 0;
920 const char *ptr = idealOp;
921 for (; *ptr != '\0'; ++ptr) {
922 last_char = *ptr;
923 }
924
925 // Match Vector types.
926 if (strncmp(idealOp, "Vec",3)==0) {
927 switch(last_char) {
928 case 'S': return "TypeVect::VECTS";
929 case 'D': return "TypeVect::VECTD";
930 case 'X': return "TypeVect::VECTX";
931 case 'Y': return "TypeVect::VECTY";
932 default:
933 internal_err("Vector type %s with unrecognized type\n",idealOp);
934 }
935 }
936
937 // !!!!!
938 switch(last_char) {
939 case 'I': return "TypeInt::INT";
940 case 'P': return "TypePtr::BOTTOM";
941 case 'N': return "TypeNarrowOop::BOTTOM";
942 case 'F': return "Type::FLOAT";
943 case 'D': return "Type::DOUBLE";
944 case 'L': return "TypeLong::LONG";
945 case 's': return "TypeInt::CC /*flags*/";
946 default:
947 return NULL;
948 // !!!!!
949 // internal_err("Ideal type %s with unrecognized type\n",idealOp);
950 break;
951 }
|
912 }
913 }
914
915
916 // Return the type signature for the ideal operation
917 const char *ArchDesc::getIdealType(const char *idealOp) {
918 // Find last character in idealOp, it specifies the type
919 char last_char = 0;
920 const char *ptr = idealOp;
921 for (; *ptr != '\0'; ++ptr) {
922 last_char = *ptr;
923 }
924
925 // Match Vector types.
926 if (strncmp(idealOp, "Vec",3)==0) {
927 switch(last_char) {
928 case 'S': return "TypeVect::VECTS";
929 case 'D': return "TypeVect::VECTD";
930 case 'X': return "TypeVect::VECTX";
931 case 'Y': return "TypeVect::VECTY";
932 case 'Z': return "TypeVect::VECTZ";
933 default:
934 internal_err("Vector type %s with unrecognized type\n",idealOp);
935 }
936 }
937
938 // !!!!!
939 switch(last_char) {
940 case 'I': return "TypeInt::INT";
941 case 'P': return "TypePtr::BOTTOM";
942 case 'N': return "TypeNarrowOop::BOTTOM";
943 case 'F': return "Type::FLOAT";
944 case 'D': return "Type::DOUBLE";
945 case 'L': return "TypeLong::LONG";
946 case 's': return "TypeInt::CC /*flags*/";
947 default:
948 return NULL;
949 // !!!!!
950 // internal_err("Ideal type %s with unrecognized type\n",idealOp);
951 break;
952 }
|