Description: Maybe fix big endian build of nqp
 From TImo: perhaps this will fix moar on big endian machines
 .
 The goal is to fix nqp build on big endian arches
Bug: https://github.com/rakudo/rakudo/issues/1257#issuecomment-372109368
Author: Timo Paulssen <timonator@perpetuum-immobile.de>
Acked-by: dod
Applied-Upstream: https://github.com/MoarVM/MoarVM/commit/8fa756e869fe2e59bb440c7ba045b99c072590be
--- a/src/core/validation.c
+++ b/src/core/validation.c
@@ -406,10 +406,10 @@ static void validate_operands(Validator *val) {
         case MVM_OP_wval:
         case MVM_OP_wval_wide: {
             validate_reg_operand(val, operands[0]);
-            if (GET_UI16(val->cur_op, 0) >= val->cu->body.num_scs)
-                fail(val, MSG(val, "out of range SC index %u"), GET_UI16(val->cur_op, 0));
             validate_literal_operand(val, operands[1]);
             validate_literal_operand(val, operands[2]);
+            if (GET_UI16(val->cur_op, -4) >= val->cu->body.num_scs)
+                fail(val, MSG(val, "out of range SC index %u"), GET_UI16(val->cur_op, -4));
             break;
         }
 
