示例#1
0
void call_firmware(void)
{
    /* Note that we're calling a routine that *SHOULD*
           * re-init the stack... so this function should never return...
           */
    void(*fncall)(void)=(void*)STARTADDR;
    fncall();

}
示例#2
0
文件: record.C 项目: lipei0330/hobbes
  ExprPtr with(const Assign* v) const {
    // hack to assign [char] into <std.string>
    if (hasConstraint(this->constraint, v->type())) {
      if (*v->left()->type()->monoType() == *stdstrty && *v->right()->type()->monoType() == *chararrty) {
        static MonoTypePtr assignty = functy(list(stdstrty, chararrty), unitty);

        return fncall(var("stdstringAssign", assignty, v->left()->la()), list(switchOf(v->left(), *this), switchOf(v->right(), *this)), v->la());
      }
    }

    return wrapWithTy(v->type(), new Assign(switchOf(v->left(), *this), switchOf(v->right(), *this), v->la()));
  }
int main()
{
   //int vs[]={10,-1,+1,-2,+2,78686, -454, 0xFFFF, -0xFFFF  };
   int vs[]={0,-1,+1,-2,+2,78686, -454, 0xFFFF, -0xFFFF  };
   int ns=sizeof(vs)/sizeof(vs[0]);

   for(int i=0;i<ns;i++){
     for(int j=0;j<ns;j++){
       int r=fncall(vs[i],vs[j],&vs[i],vs[j],&vs[i],vs[j],vs[j]);
       fprintf(stdout, "%d,%d,%d\n", vs[i],vs[j],r);
     }
   }
   
    //fprintf(stdout, "%d\n", r);
    //int r=f(15,10);
    //printf("%d\n", r);

   return 0;
}