Fixes issues in drcachesim and raw2trace because of which some memrefs in the scatter/gather expansion were not seen in basic_counts for data loads and stores.
Continues instrumenting in drcachesim even if we see an instr with app pc same as the last one. In the scatter/gather expansion, all instrs have the same app pc; this is unlike rep str expansion where the actual stringop has the original app pc, and others have a fake one.
Modifies raw2trace to properly detect scatter/gather memrefs: when we see a scatter/gather instr, we keep reading entries until we encounter a non-memref entry. This works because scatter/gather instr expansions have their own separate bbs. The alternative to this was to add a pc entry for each mov instr (to fulfil raw2trace's requirement of always having a preceding pc entry for each memref), but that may have higher overhead.
Skips instrumenting memref for the first instr in the expanded scatter/gather sequence, which turns out to be a non-app instr. This instr needs to be instrumented to output pc entry (for scatter/gather completely suppressed due to mask, we still want want a pc entry), but as we don't want a memref entry for that, had to add a special check. This special handling should go away with i#4865.
Figures out pc for scatter/gather instr using fragment tag, instead of the passed instr. As the first instr in the expanded scatter/gather is a non-app instr, we cannot use that to get the app pc. Instead, if we find an instr with no app pc, we use the fragment tag to determine the pc. For such cases (of missing app pc) we assert that the instr is the first instr in the bb. This special handling should go away with i#4865.
Finds scatter/gather instr size using pc in online traces. Size cannot be found out using the passed-in instr (which is from the expansion), so we use the original instr at app pc to get those details.
Disables instr bundling for scatter/gather expansions, so that we can choose to not output a duplicate pc entry for some instrs in the online trace.
Disables address elision for bbs with scatter/gather app instr or expansion. instru_offline and raw2trace see different instrs for scatter gather bbs: expanded scatter/gather seq vs the original app instr respectively. To avoid any issues due to this mismatch, it is better to disable address elision.
Disables address elision for all similar emulated instr cases too. This is done by identifying whether there is an emulation start/end marker in the ilist provided by instru_offline. For the ilist provided by raw2trace, we check existence of scatter/gather, or rep stringop directly.
Adds drcachesim online test for all-asm scatter gather app.
Adds an all-asm app that uses repstr, and a drcachesim offline and online test for this.
Splits out some setup for pure asm apps in suite/tests/CMakeLists to reuse instead of duplicating for each app.
Issue: #2985 (closed)