src/cpu/x86/vm/assembler_x86.hpp

changeset 3310
6729bbc1fcd6
parent 3049
95134e034042
child 3388
127b3692c168
equal deleted inserted replaced
3309:8c57262447d3 3310:6729bbc1fcd6
691 // Decoding 691 // Decoding
692 static address locate_operand(address inst, WhichOperand which); 692 static address locate_operand(address inst, WhichOperand which);
693 static address locate_next_instruction(address inst); 693 static address locate_next_instruction(address inst);
694 694
695 // Utilities 695 // Utilities
696
697 #ifdef _LP64
698 static bool is_simm(int64_t x, int nbits) { return -(CONST64(1) << (nbits-1)) <= x &&
699 x < (CONST64(1) << (nbits-1)); }
700 static bool is_simm32(int64_t x) { return x == (int64_t)(int32_t)x; }
701 #else
702 static bool is_simm(int32_t x, int nbits) { return -(1 << (nbits-1)) <= x &&
703 x < (1 << (nbits-1)); }
704 static bool is_simm32(int32_t x) { return true; }
705 #endif // _LP64
706
707 static bool is_polling_page_far() NOT_LP64({ return false;}); 696 static bool is_polling_page_far() NOT_LP64({ return false;});
708 697
709 // Generic instructions 698 // Generic instructions
710 // Does 32bit or 64bit as needed for the platform. In some sense these 699 // Does 32bit or 64bit as needed for the platform. In some sense these
711 // belong in macro assembler but there is no need for both varieties to exist 700 // belong in macro assembler but there is no need for both varieties to exist

mercurial