equal
deleted
inserted
replaced
927 public: |
927 public: |
928 // Helper functions for groups of instructions |
928 // Helper functions for groups of instructions |
929 |
929 |
930 enum Predict { pt = 1, pn = 0 }; // pt = predict taken |
930 enum Predict { pt = 1, pn = 0 }; // pt = predict taken |
931 |
931 |
932 // Instruction must start at passed address. |
932 //---< calculate length of instruction >--- |
933 static int instr_len(unsigned char *instr) { return BytesPerInstWord; } |
933 // With PPC64 being a RISC architecture, this always is BytesPerInstWord |
934 |
934 // instruction must start at passed address |
935 // longest instructions |
935 static unsigned int instr_len(unsigned char *instr) { return BytesPerInstWord; } |
936 static int instr_maxlen() { return BytesPerInstWord; } |
936 |
|
937 //---< longest instructions >--- |
|
938 static unsigned int instr_maxlen() { return BytesPerInstWord; } |
937 |
939 |
938 // Test if x is within signed immediate range for nbits. |
940 // Test if x is within signed immediate range for nbits. |
939 static bool is_simm(int x, unsigned int nbits) { |
941 static bool is_simm(int x, unsigned int nbits) { |
940 assert(0 < nbits && nbits < 32, "out of bounds"); |
942 assert(0 < nbits && nbits < 32, "out of bounds"); |
941 const int min = -(((int)1) << nbits-1); |
943 const int min = -(((int)1) << nbits-1); |