mips: loadupib, loadupdb: error (not implemented) if source argument is not source var
authorGuillaume Emont <guijemont@igalia.com>
Sat, 15 Dec 2012 16:48:43 +0000 (17:48 +0100)
committerGuillaume Emont <guijemont@igalia.com>
Fri, 28 Dec 2012 14:23:39 +0000 (15:23 +0100)
Only source vars can get a ptr_offset, and we need one in these operations as
they are implemented now.

orc/orcrules-mips.c

index 465c26189af8e825a7faea644e15fd25610f152a..967249a13aee2f79df7a15afebba12f1fbcdd4ac 100644 (file)
@@ -379,7 +379,7 @@ mips_rule_loadupib (OrcCompiler *compiler, void *user, OrcInstruction *insn)
   OrcMipsRegister tmp1 = ORC_MIPS_T4;
   OrcMipsRegister tmp2 = ORC_MIPS_T5;
 
-  if (compiler->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_CONST) {
+  if (src->vartype != ORC_VAR_TYPE_SRC) {
     ORC_PROGRAM_ERROR (compiler, "not implemented");
     return;
   }
@@ -452,7 +452,7 @@ mips_rule_loadupdb (OrcCompiler *compiler, void *user, OrcInstruction *insn)
   OrcVariable *dest = compiler->vars + insn->dest_args[0];
   OrcMipsRegister tmp = ORC_MIPS_T3;
 
-  if (compiler->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_CONST) {
+  if (src->vartype != ORC_VAR_TYPE_SRC) {
     ORC_PROGRAM_ERROR (compiler, "not implemented");
     return;
   }