129 std::cerr <<
"SgAsmIntegerValueExpression::virtual_address: non-addressable node type: "
131 assert(!
"need addressable node type");
156 SgNode *node = get_base_node();
178 SgAsmBlock *blk = SageInterface::getEnclosingNode<SgAsmBlock>(node);
180 refkind =
"JumpTable";
182 refkind =
"StaticData";
187 refkind =
"Rva/Size";
189 refkind =
"Reference";
193 int64_t
offset = (int64_t)get_relative_value();
194 if (retval.empty()) {
195 retval =
"<" + refkind;
205 if (offset > 0xffffffffll) {
208 }
else if (offset > 0xffffll) {
211 }
else if (offset > 0xffll) {
214 }
else if (offset > 9) {
217 }
else if (offset > 0) {
219 snprintf(buf,
sizeof buf,
"+%"PRId64, offset);
221 }
else if (offset==0) {
223 }
else if (-offset > 0xffffffffll) {
227 }
else if (-offset > 0xffffll) {
231 }
else if (-offset > 0xffll) {
235 }
else if (-offset > 9) {
241 snprintf(buf,
sizeof buf,
"%"PRId64, offset);
254 assert(nbits>0 && nbits<=64);
255 p_significant_bits = nbits;
262 return p_significant_bits;
272 uint64_t cur_value = get_absolute_value();
273 uint64_t base_va = virtual_address(base_node);
274 set_base_node(base_node);
275 set_relative_value(cur_value - base_va);
283 return virtual_address(get_base_node());
294 nbits = get_significant_bits();
295 uint64_t retval = get_base_address() + get_relative_value();
296 uint64_t mask = IntegerOps::genMask<uint64_t>(nbits);
297 return retval & mask;
304 size_t nbits = get_significant_bits();
305 uint64_t u = (get_base_address() + get_relative_value()) & IntegerOps::genMask<uint64_t>(nbits);
307 return (int64_t)retval;
316 uint64_t new_offset = v - get_base_address();
317 set_relative_value(new_offset);