paulscode
New member
- Thread Starter
- #101
Ari64, thanks again for the help! I am currently on vacation for a couple of weeks, so I don't have access to my pc at the moment, but I've been digging around in your sourcecode from my phone to find the components you mentioned.
For the constant propagation issue, which file(s)/function(s) do I need to be looking in for that? I found the functions "get_const" and "load_all_consts" in new_dynarec.c, but not sure if these are the places you were referring to, as the code is a bit over my head at the moment. I'll take a closer look at them to try and figure out how they work, if these are the right sections.
For the unsigned offset bug in assem_arm.c's verify_dirty and get_bounds functions, I assume the following minor change would correct that problem:
Or is it a bit more complicated than that? Also, does this bug only affect ARMv5? It seems from the ARMv7 code that the offset is added to other values before the result is cast to an unsigned int, so I think it should work as is (I'll have to verify that when I get home, though):
For the constant propagation issue, which file(s)/function(s) do I need to be looking in for that? I found the functions "get_const" and "load_all_consts" in new_dynarec.c, but not sure if these are the places you were referring to, as the code is a bit over my head at the moment. I'll take a closer look at them to try and figure out how they work, if these are the right sections.
For the unsigned offset bug in assem_arm.c's verify_dirty and get_bounds functions, I assume the following minor change would correct that problem:
Code:
int offset=*ptr&0xfff; // CHANGED FROM: u_int offset=*ptr&0xfff;
u_int *l_ptr=(void *)ptr+offset+8;
u_int source=l_ptr[0];
u_int copy=l_ptr[1];
u_int len=l_ptr[2];
Code:
u_int source=(ptr[0]&0xFFF)+((ptr[0]>>4)&0xF000)+((ptr[2]<<16)&0xFFF0000)+((ptr[2]<<12)&0xF0000000);