X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FInterpreter.c;h=339d4d8f8849e3e5ea6ad9ecc62712ff8f5429b4;hb=2fe38b5fb0957f9428864afd69ad3ccd82fae3d0;hp=9c494c1f29666b40f24ab4920097f82c554af4d8;hpb=e0939bc459e2fd5420f875ee3065dca14114bf31;p=ghc-hetmet.git diff --git a/rts/Interpreter.c b/rts/Interpreter.c index 9c494c1..339d4d8 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -27,6 +27,13 @@ #include #endif +// When building the RTS in the non-dyn way on Windows, we don't +// want declspec(__dllimport__) on the front of function prototypes +// from libffi. +#if defined(mingw32_HOST_OS) && !defined(__PIC__) +# define LIBFFI_NOT_DLL +#endif + #include "ffi.h" /* -------------------------------------------------------------------------- @@ -1227,6 +1234,27 @@ run_BCO: goto nextInsn; } + case bci_TESTLT_W: { + // There should be an Int at Sp[1], and an info table at Sp[0]. + int discr = BCO_NEXT; + int failto = BCO_GET_LARGE_ARG; + W_ stackWord = (W_)Sp[1]; + if (stackWord >= (W_)BCO_LIT(discr)) + bciPtr = failto; + goto nextInsn; + } + + case bci_TESTEQ_W: { + // There should be an Int at Sp[1], and an info table at Sp[0]. + int discr = BCO_NEXT; + int failto = BCO_GET_LARGE_ARG; + W_ stackWord = (W_)Sp[1]; + if (stackWord != (W_)BCO_LIT(discr)) { + bciPtr = failto; + } + goto nextInsn; + } + case bci_TESTLT_D: { // There should be a Double at Sp[1], and an info table at Sp[0]. int discr = BCO_NEXT;