fixed a couple of bugs in 64bit assembler.

This commit is contained in:
Abdulaziz Ghuloum
2008-04-08 02:22:26 -04:00
parent 6bdb38ca16
commit 5eaa2ff469
4 changed files with 53 additions and 28 deletions
+11 -5
View File
@@ -183,11 +183,17 @@ ik_relocate_code(ikptr code){
else if(tag == 3){
/* jump label */
long int obj_off = unfix(ref(p, wordsize));
ikptr obj = ref(p, 2*wordsize);
ikptr displaced_object = obj + obj_off;
ikptr next_word = data + code_off + wordsize;
ikptr relative_distance = displaced_object - (long int)next_word;
ref(next_word, -wordsize) = relative_distance;
long int obj = ref(p, 2*wordsize);
long int displaced_object = obj + obj_off;
long int next_word = data + code_off + 4;
long int relative_distance = displaced_object - next_word;
#if 0
if(wordsize == 8){
relative_distance += 4;
}
#endif
*((int*)(data+code_off)) = relative_distance;
// ref(next_word, -wordsize) = relative_distance;
p += (3*wordsize);
}
else if(tag == 1){