From 9f3ad5f1313be89da3b3fea6a7224fb72756be60 Mon Sep 17 00:00:00 2001 From: Giorgis Georgakoudis Date: Tue, 5 Jun 2018 22:43:26 +0100 Subject: Fixed accessing multiple chains per thread --- src/run.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/run.cpp') diff --git a/src/run.cpp b/src/run.cpp index c3e2495..44a8319 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -373,7 +373,7 @@ static benchmark chase_pointers(int64 chains_per_thread, // memory loading per t std::vector heads(chains_per_thread); for (int i = 0; i < chains_per_thread; i++) { AsmJit::GPVar head = c.newGP(); - c.mov(head, ptr(chain)); + c.mov(head, ptr( chain, i * sizeof( Chain * ) ) ); heads[i] = head; } @@ -381,7 +381,7 @@ static benchmark chase_pointers(int64 chains_per_thread, // memory loading per t std::vector positions(chains_per_thread); for (int i = 0; i < chains_per_thread; i++) { AsmJit::GPVar position = c.newGP(); - c.mov(position, heads[0]); + c.mov(position, heads[i]); positions[i] = position; } -- cgit v1.2.3