| 2266 | } |
| 2267 | |
| 2268 | unsigned Memory::getStoreByteSize(const Type &ty) { |
| 2269 | assert(bits_program_pointer != 0); |
| 2270 | |
| 2271 | if (ty.isPtrType()) |
| 2272 | return divide_up(bits_program_pointer, 8); |
| 2273 | |
| 2274 | auto aty = ty.getAsAggregateType(); |
| 2275 | if (aty && !isNonPtrVector(ty)) { |
| 2276 | unsigned sz = 0; |
| 2277 | for (unsigned i = 0, e = aty->numElementsConst(); i < e; ++i) |
| 2278 | sz += getStoreByteSize(aty->getChild(i)); |
| 2279 | return sz; |
| 2280 | } |
| 2281 | return divide_up(ty.bits(), 8); |
| 2282 | } |
| 2283 | |
| 2284 | void Memory::store(const StateValue &v, const Type &type, unsigned offset0, |
| 2285 | vector<pair<unsigned, expr>> &data) { |
nothing calls this directly
no test coverage detected