svm: Fixed icall instruction, and cast in IMPORT_REGS.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Tue, 14 Feb 2012 16:36:27 +0000 (09:36 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Tue, 14 Feb 2012 16:36:27 +0000 (09:36 -0700)
src/microcode/svm1-interp.c

index 4b25452f1573617735083ebf71ebe3e88b56b99b..38638269e2e6a192936fe65231c3174414422cac 100644 (file)
@@ -191,7 +191,7 @@ initialize_svm1 (void)
   WREG_SET (SVM1_REG_STACK_POINTER, ((word_t)stack_pointer));          \
   WREG_SET (SVM1_REG_FREE_POINTER, ((word_t)Free));                    \
   WREG_SET (SVM1_REG_VALUE, GET_VAL);                                  \
-  WREG_SET (SVM1_REG_DYNAMIC_LINK, BYTE_ADDR(OBJECT_ADDRESS(GET_VAL)));        \
+  WREG_SET (SVM1_REG_DYNAMIC_LINK, ((word_t)(OBJECT_ADDRESS(GET_VAL)))); \
 } while (0)
 
 #define EXPORT_REGS() do                                               \
@@ -659,29 +659,29 @@ push_object (SCHEME_OBJECT object)
 }
 
 static void
-push_icall_entry (void * entry)
+push_entry (void)
 {
-  push_object (MAKE_CC_BLOCK (entry));
+  push_object (MAKE_CC_ENTRY (PC + CC_ENTRY_HEADER_SIZE));
 }
 
 DEFINE_INST (icall_u8)
 {
   DECODE_SVM1_INST_ICALL_U8 (offset);
-  push_icall_entry (PC - 2);
+  push_entry ();
   IJUMP (offset);
 }
 
 DEFINE_INST (icall_u16)
 {
   DECODE_SVM1_INST_ICALL_U16 (offset);
-  push_icall_entry (PC - 3);
+  push_entry ();
   IJUMP (offset);
 }
 
 DEFINE_INST (icall_u32)
 {
   DECODE_SVM1_INST_ICALL_U32 (offset);
-  push_icall_entry (PC - 5);
+  push_entry ();
   IJUMP (offset);
 }
 \f