X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FInterpreter.c;h=ea2064fd04c0a5cad2d02fe9fdb70189e27d0fbe;hb=6cf8982ac30be6836a0cdd8be5a6ac1a1a144213;hp=9c494c1f29666b40f24ab4920097f82c554af4d8;hpb=e0939bc459e2fd5420f875ee3065dca14114bf31;p=ghc-hetmet.git diff --git a/rts/Interpreter.c b/rts/Interpreter.c index 9c494c1..ea2064f 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -1227,6 +1227,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;