memory bug fix

This commit is contained in:
George Hotz 2014-07-21 12:08:41 -07:00
parent 56658e021c
commit 16d98f8a2a
3 changed files with 15 additions and 5 deletions

View File

@ -34,11 +34,11 @@ class Memory:
rret = this.daddr[i].fetch(clnum)
if rret != None:
ret[i] = rret
else:
# slow
for (s, e) in this.backing:
if s <= i and i < e:
ret[i] = ord(this.backing[(s,e)][i-s])
continue
# slow
for (s, e) in this.backing:
if s <= i and i < e:
ret[i] = ord(this.backing[(s,e)][i-s])
return ret
# backing commit

BIN
tests/vortex/vortex4 Executable file

Binary file not shown.

10
tests/vortex/vortex4.c Normal file
View File

@ -0,0 +1,10 @@
// -- andrewg, original author was zen-parse :)
#include <stdlib.h>
int main(int argc, char **argv)
{
if(argc) exit(0);
printf(argv[3]);
exit(EXIT_FAILURE);
}