[project @ 2005-05-23 10:17:22 by simonpj]
[ghc-hetmet.git] / ghc / rts / Interpreter.c
index 5a13428..72e6506 100644 (file)
@@ -13,6 +13,7 @@
 #include "Schedule.h"
 #include "RtsFlags.h"
 #include "Storage.h"
+#include "LdvProfile.h"
 #include "Updates.h"
 #include "Sanity.h"
 #include "Liveness.h"
@@ -42,7 +43,7 @@
 
 #define BCO_NEXT      instrs[bciPtr++]
 #define BCO_PTR(n)    (W_)ptrs[n]
-#define BCO_LIT(n)    (W_)literals[n]
+#define BCO_LIT(n)    literals[n]
 #define BCO_ITBL(n)   itbls[n]
 
 #define LOAD_STACK_POINTERS                                    \
@@ -901,7 +902,7 @@ run_BCO:
            int n_words = BCO_NEXT;
            Sp -= n_words;
            for (i = 0; i < n_words; i++) {
-               Sp[i] = BCO_LIT(o_lits+i);
+               Sp[i] = (W_)BCO_LIT(o_lits+i);
            }
            goto nextInsn;
        }
@@ -1004,7 +1005,7 @@ run_BCO:
        }
 
        case bci_TESTLT_P: {
-           int discr  = BCO_NEXT;
+           unsigned int discr  = BCO_NEXT;
            int failto = BCO_NEXT;
            StgClosure* con = (StgClosure*)Sp[0];
            if (GET_TAG(con) >= discr) {
@@ -1014,7 +1015,7 @@ run_BCO:
        }
 
        case bci_TESTEQ_P: {
-           int discr  = BCO_NEXT;
+           unsigned int discr  = BCO_NEXT;
            int failto = BCO_NEXT;
            StgClosure* con = (StgClosure*)Sp[0];
            if (GET_TAG(con) != discr) {