MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / castPtrToInt

Method castPtrToInt

ir/memory.cpp:398–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398expr Byte::castPtrToInt() const {
399 auto offset = ptrByteoffset().zextOrTrunc(bits_ptr_address);
400 offset = offset * expr::mkUInt(bits_byte, offset);
401 return ptr().getAddress().lshr(offset).zextOrTrunc(bits_byte);
402}
403
404expr Byte::forceCastToInt() const {
405 return expr::mkIf(isPtr(), castPtrToInt(), nonptrValue());

Callers

nothing calls this directly

Calls 3

lshrMethod · 0.80
getAddressMethod · 0.80
zextOrTruncMethod · 0.45

Tested by

no test coverage detected