mips: error when trying to use load with a constant
authorGuillaume Emont <guijemont@igalia.com>
Tue, 30 Oct 2012 11:43:29 +0000 (12:43 +0100)
committerGuillaume Emont <guijemont@igalia.com>
Fri, 28 Dec 2012 14:17:45 +0000 (15:17 +0100)
orc/orcrules-mips.c

index 650ec38..676cd03 100644 (file)
@@ -11,6 +11,11 @@ mips_rule_load (OrcCompiler *compiler, void *user, OrcInstruction *insn)
   int total_shift = compiler->insn_shift + ORC_PTR_TO_INT (user);
   int is_aligned = compiler->vars[insn->src_args[0]].is_aligned;
 
+  if (compiler->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_CONST) {
+    ORC_PROGRAM_ERROR (compiler, "not implemented");
+    return;
+  }
+
   ORC_DEBUG ("insn_shift=%d", compiler->insn_shift);
   /* FIXME: Check alignment. We are assuming data is aligned here */
   switch (total_shift) {