Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sadrabt committed Nov 15, 2024
1 parent 23c9fb6 commit 9769403
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ class Graph(val proc: Procedure,
}

def SSAVar(posLabel:String, varName: String): Slice = {
assert(posLabel.matches("%[0-9]{8}"))
assert(posLabel.matches("%[0-9]{8}?\\$\\d"))

val res = varToCell.keys.filter(pos => pos.toShortString.startsWith(posLabel))
assert(res.size == 1)
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/DataStructureAnalysisTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class DataStructureAnalysisTest extends AnyFunSuite {
assert(dsg.find(dsg.globalMapping(AddressRange(1876, 1876)).node.cells(0)).offset.equals(0))
assert(dsg.find(dsg.globalMapping(AddressRange(1896, 1896)).node.cells(0)).offset.equals(8))

assert(dsg.adjust(dsg.SSAVar("%00000429", "R8")).equals(dsg.find(dsg.globalMapping(AddressRange(1876, 1876)).node.cells(0))))
assert(dsg.adjust(dsg.SSAVar("%00000438", "R8")).equals(dsg.find(dsg.globalMapping(AddressRange(1896, 1896)).node.cells(0))))
assert(dsg.adjust(dsg.SSAVar("%00000429$1", "R8")).equals(dsg.find(dsg.globalMapping(AddressRange(1876, 1876)).node.cells(0))))
assert(dsg.adjust(dsg.SSAVar("%00000438$1", "R8")).equals(dsg.find(dsg.globalMapping(AddressRange(1896, 1896)).node.cells(0))))



Expand Down

0 comments on commit 9769403

Please sign in to comment.