File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ class RuntimeMemory {
3030
3131 // variants for load8 etc?
3232 // Do we care about the order here?
33- virtual Literal load (Address addr) const { return {}; }
33+ // todo: address types? Address::address32_t is strange
34+ virtual Literal load (uint32_t addr) const { return {}; }
35+ virtual Literal load (uint64_t addr) const { return {}; }
3436
3537 const Memory* getDefinition () const { return &memoryDefinition; }
3638
Original file line number Diff line number Diff line change @@ -4107,15 +4107,18 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
41074107
41084108 Flow visitLoad (Load* curr) {
41094109 VISIT (flow, curr->ptr )
4110- auto info = getMemoryInstanceInfo (curr->memory );
4111- auto memorySizeBytes = info.instance ->getMemorySizeBytes (info.name );
4112- auto addr = info.instance ->getFinalAddress (
4113- curr, flow.getSingleValue (), memorySizeBytes);
4114- if (curr->isAtomic ()) {
4115- info.instance ->checkAtomicAddress (addr, curr->bytes , memorySizeBytes);
4116- }
4117- auto ret = info.interface ()->load (curr, addr, info.name );
4118- return ret;
4110+ auto * memory = allMemories[curr->memory ];
4111+ return memory->load (static_cast <uint32_t >(flow.getSingleValue ().geti32 ()));
4112+ // auto info = getMemoryInstanceInfo(curr->memory);
4113+ // auto memorySize = info.instance->getMemorySize(info.name);
4114+ // auto addr =
4115+ // info.instance->getFinalAddress(curr, flow.getSingleValue(),
4116+ // memorySize);
4117+ // if (curr->isAtomic()) {
4118+ // info.instance->checkAtomicAddress(addr, curr->bytes, memorySize);
4119+ // }
4120+ // auto ret = info.interface()->load(curr, addr, info.name);
4121+ // return ret;
41194122 }
41204123 Flow visitStore (Store* curr) {
41214124 VISIT (ptr, curr->ptr )
You can’t perform that action at this time.
0 commit comments