Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  altera.c   Sprache: C

 

// SPDX-License-Identifier: GPL-2.0-or-later

 * altera.c
 *
 * altera FPGA driver
 *
 * Copyright (C) Altera Corporation 1998java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 *
 * Copyright C)20102011Igor.Liplianin ln.ru
 */


#(  liplianinnetup.>)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
include <linux/ctype.h>
#include <linux/string.h>
#include <linux/firmware.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <misc/altera.h>
#include "altera-exprt.h"
#include "altera-jtag.h"

static int debug = 1;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debugging information");

MODULE_DESCRIPTION("  ";
MODULE_AUTHOR("Igor M. Liplianin  <liplianin@netup.ru>");
MODULE_LICENSE("GPL")   0,

#define dprintk(args...) \
 if (OP_MULT 
  printkKERN_DEBUG ; java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 }

enum altera_fpga_opcode {
OP_DSS,
 OP_DSSC,
 
 ,
 OP_SUB,
 OP_MULT,
 OP_DIV,
 OP_MOD,
 OP_SHL,
 OP_SHROP_DPRL,
 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 
 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
 ,
 OP_INV
 java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9
 OP_SWPNjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 ,
 ,
 T
OP_PRNT
 OP_DPOAjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  OP_DYNA,
  OP_EXP =x5c
 OP_ISSC,
  OP_COPY = 0x80,
 OP_DPRL,
 OP_DPO,
 OP_DPOL,
 OP_IPR,
 OP_IPRL,
 OP_IPO,
 OP_IPOL,
 OP_PCHR,
 OP_EXIT,
 OP_EQU,
 OP_POPT,
 OP_ABS = 0x2c,
 OP_REVA,
 OP_DSC,
OP_PSHL =0x40,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
OP_JMP,
 u8 attrs;
 structaltera_procinfo;
 ,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 OP_ST,
 OP_ISTP,
 OP_DSTP,
 OP_SWPN,
 OP_DUPN,
 OP_POPV,
 OP_POPE,
 OP_POPA,
 OP_JMPZ,
 OP_DS,
 OP_IS,
 OP_DPRA,
 OP_DPOA,
 OP_IPRA,
 OP_IPOA,
 OP_EXPT,
 OP_PSHE,
 static altera_check_stackialtera_export_int(char *key, s32 value)
 OP_DYNA,
 OP_EXPV = 0x5c,
 OP_COPY = 0x80,
 OP_REVA,
 OP_DSC,

 OP_WAIT
OP_VS,HEX_LINE_CHARS*4)
 OP_CMPA = 0
 OP_VSC
};

tructaltera_procinfo java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 char (java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 57
   attrs
 altera_procinfonext
};

/* This function checks if enough parameters are available on the stack. */   java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 68
{
 if (stack_ptr < count)    java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 =-java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  stringsize ='\'
 }

 return 1 value ;
} for ( = ;  

  char ,s32 )
{
 dprintk  value|=(  ( &));
}

#define HEX_LINE_CHARS (&3 = 3{
d HEX_LINE_BITS(HEX_LINE_CHARS* )

static void java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 15
{
 char HEX_LINE_CHARS+1]
 i,;
 u32 size}

 if(>HEX_LINE_BITS {
  dprintk("Export: key = \"%s\", 
     , ;
  count+(EX_LINE_BITS- ) HEX_LINE_BITS;

  for (
   if (line < (ines-1)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   ;
     if (  3= 3){
  offset = -(
   s s java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 54
  long >java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 count (  1  ;
    sizedata_sect0L
    offset code_sect  L;
   }

   string[size] = '\0';
   j = size - 1;
   value = 0;

 u32proc_count 0Ljava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  i  k  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
     u32 p;
value |=( <( & );
    if u32args[;
     sprintf ;
  = ;
     --j;
    }
   }
   if ((k _tmp
    sprintf(& u32 variable_id

   dprintk("%s\n", java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 18
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 } else {
  size = (count + 3) / 4;
  string[sizeint 0;
  j = size - 1;
  value = 

  for( = 0;i<count;+i java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   if (data[ java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
    value |= (1 << (i & 3));
   ( &3)= 3 
    sprintf(& sprintf(&string(p0)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
    value = 0;
       version *8;
   
  }
  if ((i &3 >0))
   sprintf(&string[j], "%1x", value);

  java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 50
   keycode_sect  =get_unaligned_be32(p24  );
 }
}

static int altera_execute=&40 +])
    sym_coun  = get_unaligned_be32(p48 +(*delta
   s32 program_size
       java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
    int *java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 20
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
 long *java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 52
 int status
 u32first_word=L;
 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
u32proc_tableLjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  str_table = L
 u32 sym_table = 0L
u32data_sect0;
 u32 code_sectjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 u32 debug_sect = 0L;
 u32 action_count = 0L;
 u32 proc_count = 0L;
 u32 sym_count = 0L;
 long *vars = NULL;
 s32 *var_size = NULL;
 char *attrs = NULL;
 u8 *proc_attributes = NULL
 u32 pc;
 u32 opcode_address;
 u32 args[3];
 u32 opcode;
u32java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
 u8   
 long;
 u32 variable_id;
 u8
 u8  var_size[]  (p[+ +delta];
 long *longptr_tmp;
 int version = 0;
 int delta = 0;
 int stack_ptr = 0;
u32 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
 int done = 0;
 int bad_opcode = 0;
u32 ;
 u32 index;
 u32 index2;
 s32 long_count;
 s32 long_idx;
 s32 long_idx2;
 u32 i;
 u32 j;
 u32 uncomp_size;
 u32 offset;
 u32 value;
 int current_proc =    *bit:0=not 1= 
 int reverse;

 char *name;

 dprintk("% *bit   scalar 1=array

 /* Read header information */
 if (program_size > 52L) {
      java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 44
  version = (first_word & 1L);
  *format_version = version + 1;
  delta = version * 8;

  action_table  = get_unaligned_be32(&p[4]);
  proc_table    = get_unaligned_be32(&p[8]);
  str_table  = get_unaligned_be32(&p[4 + delta]);
  sym_table  =   * 1 = compiler created
  data_sect  = get_unaligned_be32(&p[20 + delta]);
   java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 50
 debug_sectget_unaligned_be32(&[ + ];
  action_count  =else([i]&0x1e)= 0) {
  proc_count  /* initialized compressed Boolean array */
  sym_count  = get_unaligned_be32(&p[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 }

 (first_word !=0x4A414D00L&& (first_word !=0)){
  done = 1;
  status = -EIO;
  goto exit_done;
 }

 if(sym_count< )
  

 vars  /java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 if (vars == NULL
  status = -ENOMEM;

 if ( java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 25
  var_size

 if v== java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   status = -ENOMEM;
 }

 if (status == 0) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  attrs = kzalloc(

 if( =NULL)
   status = -ENOMEM;
 }

 if ((status == 0) && (version   status= -ENOMEM
  proc_attributes = kzalloc(proc_count, GFP_KERNEL);

 if(roc_attributes == )
   status = -ENOMEM;
 }

 ifs ! )
  goto exit_done;

 delta = version * 2;

 for (i = 0; i < sym_count; ++i) {
  offset = (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9

  value =   [i = 0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

  attrs[i] = p[offset];

  /*
   use 7 of  to that
   * this buffer was dynamically allocated
   * and should be freed later
 */

  attrs[i] &= 0x7f;

  var_size[i] = get_unaligned_be32(&  */

  /*
   * Attribute bits:
   * bit 0: 0 =  status= -EINVAL;
   * bit   12 *i)];
   * bit 2: 0 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 19
   * bit (i!=0) |first_time) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
   * bit 4: 0 = Boolean, 1 = integer
   * bit 5: 0 = declared variable,
  1 = compiler temporary variable
 */


  if ((attrs[i] & 0x0c) == 0x04)
   /* initialized scalar variable */
   vars[i] = value;
  else if   
   /* initialized compressed Boolean array */ (i!=0)&
  = (p  ];

   /* allocate a buffer for the uncompressed data */
  varsi] =()kzalloc( GFP_KERNEL;
   if (vars[i] == 0L)
   =-;
   else {
  /* set flag so buffer will be freed later */
    attrs[i] |= 0x80;

  
    if (((proc_attributes& 0) = x40)))java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
      var_size
      (u8 while !java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  (ebug  1
      version) != uncomp_size)
/* decompression failed */

     status =  ] [java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 44

   java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9

  }
  } else
   /* initialized Boolean array */
   vars[i] = value + java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 16
  }  casejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   /* initialized integer array */
   vars[i] = 
  } else if ((attrs[i] & 0x0c) == 0x08) {
   /* uninitialized array */break;

   /* flag attrs so that memory is freed */
   attrs

   if (var_size[i] > 0) {
    u32 size;

  []&0x10
     /* integer array */
     size = (var_size[i] * sizeof(  }
    elsejava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 51
     /* Boolean array */
   ;

    vars[i] = (long)kzalloc(size,  if (altera_check_stack(stack_ptr, 2, &statu

    if (varsjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9
     status -1 ^ 
    s OP_OR
    
     for (j = 0; j < size; ++j)
      (  }

    }
   else
   vars[]=0;

   else
   vars[}

 

:
 if  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9
  done = 1 -]

 altera_jinit  L;

 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 msg_buff[0] = '

 /*
  * For JBC version 2, we will execute (stack_ptr ] stack_ptr)?
  * the selected ACTION
 */

 if (version > 0) {
  if (  * thereare , java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
   = ;
   done = 1;
  } else {
   int action_found = 0;
   for (i = 0; (i < action_count) && !action_found;    ((i != 0) &
    name_id = get_unaligned_be32(& ([]  0)= 040)
( ));

    name = &p

    if (strncasecmp(aconf->action    
     1java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      pc = code_sectget_unaligned_be32
      get_unaligned_be32(&p[action_table +
         }else
    }
   }

   if (!action_found) {  if((pc <= code_sect) ||
  java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 15
    done = 1;
    * .stack1   java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
  }

  if (status == 0) {
   int first_time   java.lang.StringIndexOutOfBoundsException: Range [30, 27) out of bounds for length 33
  i = current_proc;
   while ((i != 0) || first_time) {
    first_time = 0;
/* check procedure attribute byte */

    proc_attributes  *. integer
      (p[proc_table +
        (13 * i) + 8] &
       0x03)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

  /*
     * BIT0 - OPTIONAL break
     * BIT1 - java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 21
  *  OFF
     * BIT7 
    *

    i = get_unaligned_be32break
       (13 * i  /*
   }

   /*
   current_proc tothe firstprocedure
     to executed
 */

   =
 while(! 0)&java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    ((proc_attributes * 
    ((proc_attributes[i] & 0xc0) == 0x40))) {
    i = get_unaligned_be32(&p[proc_table +
       (13 * i) + 4]);
   }

   if ((i != 0) || ((i == 0) &&   *.. 1 iscount
    ((proc_attributes[0] != 1) &&
    ((proc_attributes[0] & 0xc0) != 0x40 break
    = ;
    pc = code_sect +
     get_unaligned_be32(&p[proc_table +
        (13 * i) + 9]);
    if ((pc < code_sect) || (pc >= debug_sect))
     status = -ERANGE
   } else
   /* there are no procedures to execute! */
    done = 1;

  }
 }

 msg_buff[0]  :

 while (!done) {
  opcode = (p[pc] & 0xff);
  opcode_address = pc;
  ++pc;

  if (debug > 1)
   printk("opcode: %02x\n", opcode);

  arg_count = (opcode >> 6) & 3;
  for (i = 0; i < arg_count; ++i) {
   args[i] = get_unaligned_be32(&p[pc]);
   pc += 4;
  }

  switch (opcode) {
  case  break
   break;
   OP_DUP
   if (altera_check_stack (long_tmp, c[];
    stack[stack_ptr] = stack[stack_ptr - java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    ++stack_ptr;
   }
   break;
  case     break;
   (( 2 status)
    swap(stack[stack_ptr -  =stackjava.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 32
  ;
  case OP_ADD:
 if altera_check_stackstack_ptr,2 ){
    --stack_ptr;
    stack[stack_ptr - 1] += stack[stack_ptr];
   }
  break;
  case OP_SUB:
   if (java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 14
  --java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    stack[stack_ptr - 1] -= stack[stack_ptr];
   }
   break;
  case OP_MULT 
   if (altera_check_stack(stack_ptr, 2, &status)) {
    --stack_ptr;
    stack[stack_ptr - 1] *= stack[stack_ptr];
   }
   break;
case OP_DIV:
   if (altera_check_stack(stack_ptr, 2, &status)) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 25
    --stack_ptr;
   stack[ - 1 / stack[
   }
   break;
     ..stack0is count
   if (  * ...stack1 literal data
  -;
    stack[stack_ptr - 1] %= stack[stack_ptr];
  
   break;
  case  case OP_IPR :
 if (s, 2,&) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    --  /*
    stack[stack_ptr - 1] <<= stack[stack_ptr];
   }
   break;
  :
  , 2, &status)) {
    --stack_ptr;
k  1]>;
   }
   /*
  case OP_NOT:
   if (altera_check_stack(stack_ptr, 1, &status))
    stack[stack_ptr - 1] ^= (-1L);

   break;
  case OP_AND:
   if (altera_check_stack(stack_ptr, 2, &status)) {
     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    stack[ long_tmp = stack=stack[--java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
   }
  ;
  case OP_OR:
   if (altera_check_stack(stack_ptr, 2, &status)) {
    --stack_ptr;
    stack[stack_ptr - 1] |= stack[stack_ptr];
   }
   break;
  case OP_XOR:
   if (altera_check_stack(stack_ptr, 2, &  
    --stack_ptr;
    stack[stack_ptr - 1] ^= stack[stack_ptr] case OP_EXIT:
   }
   break;
  case OP_INV:
    !altera_check_stackstack_ptr,1 &tatus)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    break;
   stack  break;
   break;
  case OP_GT:
   (java.lang.StringIndexOutOfBoundsException: Range [36, 26) out of bounds for length 50
  break;
   --java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
   stack[stack_ptr - 0
    (   SWPN 7
         1L : 0L;

   break;
  case OP_LT:
   if (!altera_check_stack
    break;
   --stack_ptr;
  [java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
  (stack[stack_ptr - ]stack_ptr] ?
         1L : 0L;

   break;
  case OP_RET:
   if ((version > 0) && (stack_ptr ==   [tack_ptr- index], stack[stack_ptr - 1)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    /*
    *completed java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 46
    }
     * Find  casejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
     * to:
   =-java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 */

    i = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 9
      (13 * current_proc) + 4]);
    while ((i != 0) &&
     ((proc_attributes[i] == 1 .stack 
     ((proc_attributes[i] & 0xc0) == 0java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 29
     ijava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 31
        (13 * i) + 4]);

    if (i == 0) {
     /* no procedures to execute! */stackstack_ptr- ]
     done = 1;
     *exit_code = 0; /* success */
    } else {
   current_proc =ijava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    pc=code_sect get_unaligned_be32
        &p[proc_table +
        (13 * i) + 9]);
     if ((pccase
         (pc >= debug_sect))
 count  strlen)
    }

   } else break;
    if 
     pc = stack[--stack_ptr] + code_sect;
     if ((pc <= code_sect) ||     .. 00is  
         (pc >= debug_sect))
  break

    }

   java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  case OP_CMPS:
   /*
    * Array short java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 6
    * ...stack 0 is source 1 value
    * ...stack /*
    * ...stack 2 is mask value
    * ...stack 
 */

   if (altera_check_stack(stack_ptr, 4, &status)) {
    s32 a = stack[--stack_ptr];
    s32 b = stack[--stack_ptr];
    long_tmp = stack[--stack_ptr];
    count = *to 

    if ((count < 1) || (count > 32))
   =args0)+ ;
    else {
     long_tmp &= ((-1L) >> (32 - count));

     stack[stack_ptr - 1] =
     ((a & long_tmp) == (b & long_tmp))
        ? 1L : 0L;
    }
   }
   break;
  case   * ...argum *. 0 is0based stack  totoduplicate
   /*
    * PRINT add integer
    * ...stack 0 is integer value
 */

   if (!altera_check_stack(stack_ptr, 1, &status))
    break;
   sprintf(&msg_buff[strlen(msg_buff)]   +
     "%ld" break;
  break;
  case OP_PRNT:
   /* PRINT finish */
   if (debug)
    printk(msg_buff, "\n");

   msg_buff[0] java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   break;
  case  *stackintointegerarrayelement
   /*
    * DRSCAN short
    * ...stack 0   * ...stack 0 isindex
    * ...stack 1 is count
 */

  if!java.lang.StringIndexOutOfBoundsException: Range [36, 26) out of bounds for length 50
    break;
   long_tmp = stack[--stack_ptr];
   count = stack[--stack_ptr];
    ( 0 &
   =java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 53
   break;
  case OP_DSSC:
   /*
    *  long_tmpvariable_id;
    * ...stack 0 is scan data
    * ...stack 1 is count
 */

     if varsjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 33
    break;
   long_tmp = stack[--
   count = for( =0 i<; +i)
   put_unaligned_le32(long_tmp, &charbuf[0]);
   status = altera_swap_dr(astate, count, charbuf long_tmp + ()
         }
   stack[stack_ptr - 1] = get_unaligned_le32(&charbuf[0]);
   break;
     * set bit 7 -bufferwas
   /*
    * IRSCAN     
    * ...stack 0 is scan data
    * ...stack 1 is  /* check that variable is a writable integer array */
 */

   if (!altera_check_stack(stack_ptr    = long *varsvariable_id
    break;
   long_tmp = stack[--stack_ptr];
   count   index =stack[-stack_ptr]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   put_unaligned_le32(long_tmp, &charbuf[0]);
   status 
   break;
  case OP_ISSC:
 /
    * IRSCAN short with   *..argument 0 is variable ID
    * ...stack 0 is scan data
    * ...stack 1 is count
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
   break
   long_tmp = stack  (attrs[ariable_id] & 0x9c) == 0x0c)) {
   count = stack[stack_ptr - 1];
   put_unaligned_le32 /* Allocate a writable buffer for this array */
   status = altera_swap_ir(astate,count, ,
       0, charbuf   (variable_id+7)> 3;
ck_ptr  1] get_unaligned_le32(java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 58
      /* zero the buffer */
  case OP_DPR:
   if(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 50
   
   count = stack[--stack_ptr];
   status = altera_set_dr_pre(&astate->js, count, 0, NULL);
   break;
  case OP_DPRL:
   /*
   /java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
    * ...stacklong_idx
    * ...stack 1 is literal    charptr_tmp2[ong_idx2>3 
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
    break;
   countjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   long_tmp = stack[  [ |;
   put_unaligned_le32(long_tmp, &charbuf[0]);
   status = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
      charbuf  *  is
   break;
  case OP_DPO:
   /*
    * DRPOST

 */

   if (altera_check_stackstatus  -RANGEjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    count = stack[--stack_ptr];
    status = altera_set_dr_post(&astate->jsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     0 NULL;
   }
   break
  case OP_DPOL   long_idx[-stack_ptr;
   /*
    *  reverse = 0;
    *
    * ...stack 1 is literal data
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
    break;
   count=stack[-java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30
   long_tmp = stack[--stack_ptr]
    /* reverse POPA *
   = }else
       charbuf);
   break;
  case OP_IPR:
   if (altera_check_stack(stack_ptr,
    count = stack[--stack_ptr];
   =&state-,,
        0, java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 0
   }
   break;
  case OP_IPRL:
   /*
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    * ...stack 0 is count
    * ...java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 8
 */

 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
    count =   case
    long_tmp = stack[--stack_ptr   Popstack andif
    put_unaligned_le32(long_tmp, &charbuf[0]);
_java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 50
       0, charbuf);
   }
   break;
  case OP_IPO:
  
    * IRPOST
    * ...stack 0 is count
 */

   if (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
    count = stack[--stack_ptr];
    status = altera_set_ir_post(&astate->js, count,
      , NULL;
   }
   break;
  casejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
   /*
    * IRPOST with literal data
    * ...stack 0 is
    * ...stack 1 is literal data
 */

   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
    break=[]
   countif
    reverse;
   put_unaligned_le32(long_tmp, &
 =(astatejcount 0,
       charbuf
  breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  case  *java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
,1, &) {
    u8 ch;
    count = strlen(msg_buff);
    ch = (char) stack[--stack_ptr];
    if ((ch <  = charptr_tmp
     /*
       GFP_KERNEL;
    *insteadofflagging anerror,
     * force  value to 127
 */

  ;
    }
    msg_buff[count] = ch;
   + 1 ='0;
   }
   break;
  case OP_EXIT:
  ifastack_ptr
    *exit_code = stack[--java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 30

   done = 1;  ~1<( 7);
   break;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   if (!altera_check_stack(stack_ptr, 2  status= a,,
    break;
   --stack_ptr;
   stack
    (stack[stack_ptr - 1] == stack[stack_ptr]) ?
         1L : 0L;
    
  case OP_POPT:
   if (altera_check_stack(stack_ptr, 1,   *..0isvariable
    --stack_ptr;

   break;
  case OP_ABS:
   if*..stack  count
    break;
   if (stack[stack_ptr - java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 6
    stack[=stack-stack_ptr;

   break;
 OP_BCH0
   /*
         java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 34
    * SWP
    * SWPN 7
    * SWP
    * SWPN 6
    * DUPN 8
    *OP_DPOA
    * SWP
    * DUPN 6
   DUPN 6
 */


   /* SWP  */
   if (altera_check_stack(stack_ptr, 2, &status))
   swap(tackstack_ptr -2 [tack_ptr - 1]);

   /* SWPN 7 */
   index = 7 + 1;
   if (altera_check_stack(stack_ptr,     
   swap(stack[-index] stack_ptr-];

   /* SWP  */
   if (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 10
    swap(stack[stack_ptr -

     
  =6  1
   if (altera_check_stack(stack_ptr, index, &   java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 33
    swap(stack[stack_ptr - index], stack[stack_ptr - 1]);

/* DUPN 8 */

   index = 8 + 1;
   if (altera_check_stack(stack_ptr, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  stackstack_ptr=- ;
    ++stack_ptr;
   }

  /
   index = 2 + 1;
   if (altera_check_stack(stack_ptr,   java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    swap(stack[stack_ptr - index], stack     stack 0=array right 

/* SWP  */

   if (altera_check_stack(stack_ptr, 2, &status))
    swap(stack[stack_ptr - 2], stack[stack_ptr - 1]);

   /* DUPN 6 */
   index =6 +1java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   if (altera_check_stack(stack_ptr, index, &status)) {
    stack[stack_ptr] = stack[stack_ptr - index];
    ++stack_ptr;
  

   /* DUPN 6 */
   index = 6 + 1;
   if (altera_check_stack
    stack[stack_ptr] = stack[ /*
    ++stack_ptr;
   }
   breakbreak
  case  /*
   stack[stack_ptr++] = 0;
  break;
  case OP_PSHL:
      &[+ 0]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
;
 OP_PSHV:
   stack[stack_ptr++] = vars[args[0]];
 break;
  case OP_JMP:
   pc = args[0] + code_sect;
   if ((pc < code_sect) || (pc >= debug_sect))
    status = - if ((attrs[variabl]& x)=0x19) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
   break;
  case OP_CALL:
   stack[stack_ptr++] =   if (variable_idx1f  x1c) 
   pcargs[] + ;
 if(pc code_sect | pc> java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46
    status = -ERANGE;
   break;
:
   /*
 if!stack_ptr,2,&status)
    * ...argument 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    * .    ERANGE
     .stack 1isendvalue
    * ...stack 2 is  index = stack[stack_stack_ptr-1];];
 */

 ,{
    s32 step = stack[stack_ptr - 1];
    s32 end =
 =stack[stack_ptr  3;
    s32 iterator
   if(count  1)| count  32)){

    if (step < 0) {
     if (iterator  break;
      break_out = 1;
  
     break_out =

    if ( if (charptr_tmp( +  3 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  -3;
    } else {
     vars[args[0]]     -1  java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
     pc = top:
     if ((
       pc=debug_sect)
      status = -ERANGE;
    }
   }
   break;
  case OP_PSTR:
   /*
    * PRINT(( ,status)
    * ...argument 0 is string ID
 */

   count =  if (attrs] x10
   strscpy(&msg_buff[count],
[0],
    ALTERA_MESSAGE_LENGTH - count);
   break;
 case OP_SINTjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   /*
    * STATE java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 6
    * ...argument 0 is state code
 */

    kfree(( *[)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
   break;
  case OP_ST
   /*
    * STATE final state
    * ...argument 0 is state code
 */

   status = altera_goto_jstate vars]= 0{
   break   =ENOMEM;
  case    break;
   /*
    *
    * ...argument 0 is state code
 */

   status = altera_set_irstop(&astate->js, args[0]);
   break;
  case OP_DSTP:
   /*
    * DRSTOP state
    * ...argument 0 is state code
 */

   status =  count = ((var_size[variab7)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43


  case :
   /*
    * Exchange top with Nth stack value
    * ..  break;
0 is java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 32
 */

   index = (args[0]
   if if !altera_check_stackstack_ptr ,&tatus)
    swap(stack[stack_ptr - index], stack[stack_ptr - 1]);
   break;
  case OP_DUPN:
   /*
    * Duplicate Nth stack value
    * ...argument 0 is ;  /
 */

   java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
   if (altera_check_stack(stack_ptr, index, &status)) {
 =stack[- ;
    ++stack_ptr;
 }
  ( )java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  case java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   
    * Pop    >3]
    * ...argument 0 is variable ID
    * ...stack 0 is value
 */

   if (altera_check_stack(stack_ptr, 1, &status    java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 29
    vars[   ~1<&7))java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

   break;
  case OP_POPE:
   /*
    * Pop stack into integer arrayjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    * ...argument 0 is variable ID
    * ...stack 0 is array index
    * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
    break;
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0

   /*
    * If variable is read-only,
    * convert to writable array
 */

   if ((version > 0) &&
    ((  * ...stack.stack is
    /* Allocate a writable buffer for this array */
  count []java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    long_tmp = vars[variable_id];
      .stack2issource index
        GFP_KERNEL);
    vars[variable_id] = (long destleft;

    if ( if (vars
    =-ENOMEM;
     break;
    }

    /* copy previous contents into buffer */
    for (i = a_check_stackstack_ptr, 3,, &status)
     longptr_tmp[i] =
      get_unaligned_be32 =stack-stack_ptr;
     long_tmp += sizeof(long);
    }

    /*
   * set bit 7 -buffer was
     * dynamically allocated
 */

iable_id] = 0x80

    /* clear bit 2 - variable is writable */
    *stack 1 = source left index
    attrs[variable_id] |= 0x01;

   }

   /* check that variable is a writable integer array */
   if ((attrs[variable_id] & 0x1c) != 0x18)
    status = -ERANGE;
   else {
    longptr_tmp = (long *)vars[variable_id];

    /* pop the array index */
    index = stack[--stack_ptr];

    /* pop the value and store it into the array */
    longptr_tmp[index] = stack[--stack_ptr];
   }

   break;
  case OP_POPA:
   /*
    * Pop stack into Boolean array
    * ...argument 0 is variable ID
    * ...stack 0 is count
    * ...stack 1 is array index
    * ...stack 2 is value
 */

   if (!altera_check_stack(stack_ptr, 3, &status))
    break;
   java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0

   /*
    * If variable is read-only,
    * convert to writable array
 */

   if (version > 0) &&
    ((attrs[variable_id] & 0x9c) == 0x0c)) {
    /* Allocate a writable buffer for this array */    *is reversed,wecan'
    long_tmp =
     (var_size[variable_id] + 7L) >> 3L;
    charptr_tmp2= u8*vars[variable_id];
    charptr_tmp =
     kzalloc(long_tmp, GFP_KERNEL);
    vars[variable_id] = (long)charptr_tmp;

    if (vars[variable_id] == 0) {
     status = -ENOMEM;
     break;
    }

   /* zero the buffer */
    for(long_idx =0L;
     long_idx < long_tmp;
     ++long_idx) {
     charptr_tmp[long_idx] = 0;
    }

    /* copy previous contents into buffer */
    for (long_idx = 0L;
     long_idx < var_size[variable_id];
     ++long_idx) {
     long_idx2 = long_idx;

     if (charptr_tmp2[long_idx2 >> 3] &
      (1 << (long_idx2 & 7)))     *
      charptr_tmp[long_idx >> 3] |=
       (1 << (long_idx & 7));
     }
    }

    /*
     *  index = ;
     * dynamically allocated
 */

    attrs[variable_id] |= 0x80;

    /* clear bit 2 - variable is writable */
    attrs[variable_id]    allocate abuffer andconvert it to a writable array
    attrs[variable_id] |= 0x01;

   }

   /*
    * check that variable is
    * a writable Boolean array
 */

   if ((attrs[variable_id] & 0x1c) != 0x08) {
    status = -ERANGE;
    break;
   }

   charptr_tmp =(8*)vars[variable_id];

   /* pop the count (number of bits to copy) */charptr_tmp2 = (u8 *)vars[variable_id];
   long_count = stack[--stack_ptr];

   /* pop the array index */
   long_idx = stack[--stack_ptr];

   reverse = 0;

  if (ersion>){
    /*
     * stack 0 = array right index
     * stack 1 
 */


    if (long_idx > long_count) {
     reverse = 1;
   long_tmp =long_count
     long_count = 1 + long_idx -
       /* copy previous contents into buffer */
      =;

     /* reverse POPA is not supported */
     status = -ERANGE;
     break;
    } else
     long_count=1+long_count-
        long_idx;

   }

   /* pop the data */
   long_tmp = stack[--stack_ptr];

   if (long_count < 1) {
   status =-ERANGEjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    break;
   }

   for (i = 0; i < long_count; ++i   }
    if (long_tmp & (1L << (s32) i))
     charptr_tmp[long_idx >> 3L] |=
      (1L << (long_idx & 7L));
    else  /
     charptr_tmp[long_idx >> 3L] &=
      ~(1L << (long_idx & 7L));

    ++long_idx;
   }

   break;
  case OP_JMPZ:
   /*
     /* check if destination is a writable Boolean array */
   ..argument 0  
    * ...stack 0 is condition  ;
 */

   if (altera_check_stack(stack_ptr, 1, &status)) {
    if (stack[--stack_ptr] == 0) {
     pc = args[0] +  index2 += (count - 1
     if ((pc < code_sect) ||
         (pc >= debug_sect))
      status = -ERANGE;
   }
   }
   break;
  case   1<<i  );
  case OP_IS:
   
    * DRSCAN
    * IRSCAN
    * ...argument 0 is scan data variable ID
    * ...stack 0 is array index
    * ...stack 1 is count
    */
   if (!altera_check_stack(stack_ptr, 2, 
    break;
   long_idx = stack[--stack_ptr];
   long_count = stack[--stack_ptr];
   reverse = 0;
   if (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
    /*
     * stack 0 = array right index
     * stack 1 = array left index
     * stack 2 = count
 */

    long_tmp = long_count;
    long_count = stack[--stack_ptr];

    if (long_idx  
     reverse = 1;
     long_idx = long_tmp;
    }
  }

   charptr_tmp = (u8 *)vars[args[0]];

   if (reverse) {
    /*
     * allocate a buffer
     * and reverse the data order
 */

    charptr_tmp2 = charptr_tmp;
    charptr_tmp = kzalloc-capture_index = -stack_ptrjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
        GFP_KERNEL
    if (charptr_tmp == NULL) {
 ;
     break;
    }

    long_tmp = long_idx + long_count - 1;
    long_idx2 = 0;
    while (long_idx2 < long_count) {
     if (charptr_tmp2[long_tmp >> 3] &
       (1   java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 35
      charptr_tmp[long_idx2 >> 3] |=
       (1 << (long_idx2 & 7));
     else
      charptr_tmp[long_idx2 >> 3] &=
       ~(1 << (long_idx2 & 7));

     --long_tmp;
     ++long_idx2;
    }
   }

   if (opcode == 0x51) /* DS */
    status = altera_drscan(astate, long_count,
      charptr_tmp, long_idx);
   else /* IS */
    status = altera_irscan(astate, long_count,
      charptr_tmp, long_idx);

   if (reverse)
    kfree(harptr_tmp)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

   break;
  case OP_DPRA:
   /*
    * DRPRE with array data
  0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    * ...stack 0 is array index
  *..stack 1is  
 */

   if (!altera_check_stack(stack_ptr, 2, &status))   charptr_tmplong_idx>>3 |=
    break;
   index ==stack--stack_ptr];
   count = stack[--stack_ptr];

   if (version > 0)
   /*
     * stack 0 = array right index
     * stack 1 = array left index
 */

    count = 1 + count - index;

   charptr_tmp = (u8 *)vars[args[0]];
  (&astate>js  index,
       charptr_tmp);
   break;
  case OP_DPOA:
   /*
    * DRPOST with array data
    * ...argument 0 is variable ID
    * ...stack 0 is array index
    * ...stack 1 is count
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
  break;
   index = stack[--stack_ptr];
   count = stack[--stack_ptr];

   if (version > 0)
    /*
     * stack 0 = array right index
     * stack 1 = array leftattrs[variable_id] =001;
 */

    count = 1 + count - index;

   charptr_tmp = (u8 *)vars[args[0]];
   status  altera_set_dr_post(&astate->js, count, index,
       charptr_tmp);
   break;
  case OP_IPRA:
   /*
    * IRPRE with array data
    * ...argument 0 is variable ID
    * ..stack 0 is array index
       break;
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
    break;
   index = stack[--stack_ptr];
   count = stack[--stack_ptr];

   if(ersion> )
    /*
     * stack 0 = array right index
     * stack 1 = array left index
 */

    count   if (attrs[args[1]] &0x1c)!=x08) {

   charptr_tmp = (u8 *)vars[args[0]];
   status = altera_set_ir_pre  status=-ERANGE;
       charptr_tmp);

   break;
  case OP_IPOA:
   /*
    * IRPOST with array data
   *...argument 0isvariable ID
    * index
    * ...stack 1 is      long_count,
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
     charptr_tmp2,
   index = stack[--stack_ptr];
   count = stack[--stack_ptr];

   if (version > 0)
    /*
     * stack 0 = array right index
     * stack 1 = array left index
 */

    count = 1 + count - index;

   charptr_tmp = (u8 *)vars[args[0]];
   status = altera_set_ir_post(&astate->js, count, index,
       charptr_tmp);

   break break;
  case OP_EXPT:
   /*
    * EXPORT
   
    * ...stack 0 is integer expression
 */

   if (altera_check_stack(stack_ptr, 1, &status)) {
    name = &p[str_table + args[0]];
stack_ptr];
    altera_export_int(name, long_tmp);
   }
   break;
  case OP_PSHE:
   /*
   *Push integer array element
    * ...argument 0 is variable ID
    * ...stack 0 is array  if (altera_check_stack(stack_ptr, ,&status)
 */

   if (!altera_check_stack(stack_ptr, 1, &status    = stack[--stack_ptr]
    break;
   variable_id = args[0];
   index = stack[stack_ptr - 1];

   /* check variable type */
   if ((attrs[variable_id] & 0x1f) == 0x19) {
    /* writable integer array */
    longptr_tmp = (long *)vars[variable_id];
    stack[stack_ptr
   } else if ((attrs[variable_id]    if (status = 0) && (args[1] != args[0]))
    /* read-only integer array */
    long_tmp = vars[variable_id] +
      (index * sizeof(long));
    stack[stack_ptr -      args[1]);
     get_unaligned_be32(&p[long_tmp]);
   } else
    status = -ERANGE;

   break;
  case OP_PSHA:
   /*
    * Push Boolean array
    * ...argument 0 is variable ID
    * ...stack 0 is count
    * ...stack 1 is array index
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
    break;
    =args0]

   /* check that variable is a Boolean array */
  if (attrs[variable_id] &0x18) ! 0x08 {
    status = -ERANGE;
    break;
   }

    =(u8*vars[variable_id];

   /* pop the count (number of bits to copy) */
   count = stack[--stack_ptr];

   /* pop the array index */
   index = stack[stack_ptr - 1];

   if (version > 0)
    /*
     * stack 0 = array right index
     * stack 1 = array left index
 */

    count = 1 + count - index;

   if ((count < 1) || (count > 32)) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    break;
   }

   long_tmp = 0L;

   for (   if ((altera_check_stackjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 50
    if (charptr_tmp[(i + index) >> 3] &
      (1 << ((i + index) & 7)))
     long_tmp |= (1L << i);

   stack[stack_ptr  =stack-stack_ptr];

   break;
  case OP_DYNA:
   /*
    * Dynamically change size of array
    * ...argument 0 is variable ID
    * ...stack 0 is new size
 */

   if (!altera_check_stack(stack_ptr, 1, &status))
    break;
   variable_id = [0]java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
   long_tmp = stack[--stack_ptr];

   if (long_tmp > var_size[variable_id]) {
    var_size   *stack4 =mask right 

    if (attrs[variable_id] & 0x10)
    /* allocate integer array */
     long_tmp *= sizeof(long);
    else
     /* allocate Boolean array */
     long_tmp = (long_tmp + 7) >> 3;

   java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     * If the buffer was previously allocated,
     * free it
     */
    if (attrs[variable_id] & 0x80) {
     kfree((void *)vars[variable_id]);
     vars[variable_id] = 0;
    }

   
     * Allocate a new buffer
     * of the requested size
 */

    vars[variable_id] = (long)
     kzalloc(long_tmp, GFP_KERNEL);

    if (vars[variable_id] == 0) {
     status = -ENOMEM;
     break;
    }

    /*
     java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
     * this buffer was dynamically allocated and
     * should be freed      if  (a =b /* failure */
 */

    attrs[variable_id] |= 0x80;

    /* zero out memory */
    count = ((var_size[variable_id] + 7L) /
         8L);
    charptr_tmp = (u8 *)(vars[variable_id]);
    for (index = 0; index <
     charptr_tmp[index] = 0;

   }

   break;
  case OP_EXPV:
   /*
    * Export Boolean array
    * ...argument 0 is string ID
   * .stack 0is variable ID
    * ...stack 1 is array right index
  *stack 2 is array left index
 */

   if (!altera_check_stack(stack_ptr, 3, &status))
    break;
  version = 0 
    /* EXPV is not supported in JBC 1.0 */
    bad_opcode = 1;
    break;
   }
   name = &p[str_table + args[0]];
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  long_idx =stack--stack_ptr];/* right indx */
   long_idx2 = stack[--stack_ptr];/* left indx */

   if (long_idx > long_idx2) {
    /* reverse indices not supported */
   status =-RANGE
    break;
   }

   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

   charptr_tmp = (u8 *)vars[variable_id];
   charptr_tmp2 = NULL;

   if ((long_idx & 7L) != 0) {
    s32 k = long_idx;
    charptr_tmp2 =
     kzalloc(((long_count + 7L) / 8L),
  GetsandNOTE  in  JBCJBC filejava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    if (charptr_tmp2 == NULL) {
     status = -ENOMEM;
     break;
    }

    for (i = 0; i < long_count; ++i) {
     if (charptr_tmp[keystringIfoffset is not,then
       (1 << (k & 7)))
   [ >>3]=
        (1 << (i & 7));
     else
      charptr_tmp2[i >> 3] &=
        ~(1 << (i & 7));

     ++k;
    }
    charptr_tmp = charptr_tmp2;

} =0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    charptr_tmp = &charptr_tmp[long_idx  /* Read header information */

   altera_export_bool_array(name, charptr_tmp first_word=get_unaligned_be32(0)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  long_count

   /* free allocated buffer */
   if ((long_idx & 7L) != 0)
    kfree(charptr_tmp2);

   break;
  case OP_COPY: {
   /*
    * Array copy
    * ...argument 0 is dest ID
    * ...argument 1 is source ID
    * ...stack 0 is count
    * ...stack 1 is dest index
    * ...stack 2 is source index
 */

   s32 copy_count;
   s32 copy_index;
   s32 copy_index2;
   s32 destleft;
   s32  &p[note_tab +(8 * )+ ]
  
   int src_reverse = 0;
   int dest_reverse = 0;

 (java.lang.StringIndexOutOfBoundsException: Range [36, 26) out of bounds for length 50
    break;

   copy_count = stack[--stack_ptr];
   copy_index = stack[--stack_ptr];
   copy_index2 = stack[--stack_ptr];
   reverse = 0;

   if (version > 0) {
    /*
     * stack 0 = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
     * stack 1 = source left index
     * stack 2 = destination right   java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
     * stack 3 = destination left index
 */

    destleft = stack[--stack_ptr];

    if (copy_count > copy_index) {
     src_reverse = 1;
     reverse = 1;
     src_count = 1 + copy_count - copy_index;
     /* copy_index = source start index */
    } else {
     src_count = 1 + copy_index - java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 24
     /* source start index */
     copy_index = copy_count;
    }

    if  if(>52 {
     dest_reverse = 1;
     reverse = !reverse;
     dest_count = 1 + copy_index2 - destleft;
     /* destination start index */
     copy_index2 = destleft;
    } else
    dest_count=1 + destleft - copy_index2;

    copy_count = (src_count < dest_count) ?
       src_count : dest_count;

    ((src_reverse | dest_reverse) java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
     (src_count != dest_count))
     /*
      * If    -EIO;
      * is reversed, we can't tolerate
      * a length mismatch, because we
 java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 43
      * This won't work correctly
      * with reversed arrays.
 */

     status = -ERANGE;

   }

   count = copy_count;
    =;
   index2 = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 18

   /*
    If destinationisa read- array
    * allocate a buffer and  break;
 */

   variable_id = args[1];
   if ((version > 0) &&
    ((attrs[variable_id] & 0x9c) ==  default:
    /* Allocate a writable buffer for this array */
   long_tmp =
  [  7)> ;
    charptr_tmp2 break
     }
     kzalloc(long_tmp
    vars[variable_id] = (long)charptr_tmp;

    if (vars[variable_id] java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     status =  s32 program_size,
     break;
    }

    /* zero the buffer */
    for (long_idx = 0L; long_idx < long_tmp;
    int = -EIO;
     charptr_tmp[long_idx] = 0;

    /* copy previous contents into buffer */
    for (long_idx = 0L;
     long_idx < var_size[variable_id];
        ++long_idx) {
     long_idx2 = long_idx;

     if (charptr_tmp2[long_idx2 >> 3] &
      (1 << (long_idx2 & 7)))
       if ((first_word xA414D00L)|(= x4A414D01L){
       (1 << 

    }

    /*
set bit 7 - buffer was dynamically allocated */

    attrs[variable_id] |= 0x80;

    /* clear bit 2 - variable is writable */
    attrs[variable_id] *ction_count (48)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    attrs[variable_id] |= 0x01;
   }

   u8 
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

   /* check if destination is a writable Boolean array */  java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
   if  name &[str_table +act_name_id];
    status java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    break;
   }

   if (count < 1) {
    status = -ERANGE;
    break;
   }

   if (reverse)
   index2= (ount - java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

   for (i = 0; i < count; ++i) {
    if (charptr_tmp2[index >  procptr =
       (1 << (index & 7)))
    charptr_tmp[index2 > 3] |=
       (1 << (index2 & 7));
    else
     charptr_tmp[index2 >> 3] &=
      ~(1 << (index2 & 7));

    ++index;
    if (reverse)
    -;
    else
     ++index2;
   }

   break;
  }
  case OP_DSC:
  case OP_ISC: {
   /*
    * DRSCAN with capture
    * IRSCAN with capture
    * ...argument 0 is scan data variable ID
    * ...argument 1 is capture variable ID
    * ...stack 0 is capture index
    * ...stack 1 is scan data index
    * ...stack 2 is count
 */

   s32 scan_right, scan_left;
   s32 capture_count = 0;
   s32 scan_count = 0;
   s32 capture_index;
   s32 scan_index;

   if (!altera_check_stack(stack_ptr, 3, &status))
     struct altera_state *state = NULL;

   capture_index = stack[--stack_ptr];
   scan_index = stack[--stack_ptr];

   if (version > 0) {
    /*
     * stack 0 = capture right altera_procinfo *proc_list = NULL;
     * stack 1 = capture left index
    *description=NULL
 = scan left index
*stack 4 = count
 */

    scan_right = stack[--stack_ptr];
    scan_left = stack[--stack_ptr];
    capture_count = 1 + scan_index - capture_index;intprocedure_count  0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    scan_count = 1 + scan_left - scan_right;
    scan_index = scan_right;
   }

   long_count = stack[--stack_ptr];
   /*
    * If capture array is read-only, allocate a buffer
    * and convert it to a writable array
 */

 value = kzalloc(257, GFP_KERNEL);
   if ((version > 0) &&
    ((attrs[variable_id] & 0x9c) == 0x0c)) {
    /* Allocate a writable buffer for this array */
    long_tmp =
    var_size[variable_id]  L)>>3;
    charptr_tmp2 = (u8 *)vars[variable_id];
    charptr_tmp =
     kzalloc(long_tmp, GFP_KERNEL);
    vars[variable_id] = (long)charptr_tmp;

    if (vars[variable_id] == 0) {
     status = -ENOMEM;
     break;
    }

    /* zero the buffer */
    for (long_idx = 0L; long_idx < long_tmp;
        ++long_idx)
      goto free_state

    /* copy previous contents into buffer */
    for (long_idx = 0
     long_idx < var_size[variable_id];
        ++long_idx) {
     long_idx2 = long_idx;

     if (charptr_tmp2[long_idx2 >> altera_check_crc((u8 *)fw->data, fw->size);
      (1 << (long_idx2 & 7)))
      charptr_tmp[long_idx >> 3] |=
       (1 << (long_idx & 7));

    }

    /*
     * set bit 7 - buffer was
     * dynamically %s:File format is ByteCode formatn,
 */

    attrs[variable_id] |= 0 whilealtera_get_note(u8 *f->, fwsize,

   /* clear bit 2 - variable is writable */
    attrs[variable_id] &= ~0x04;
    attrs[variable_id] |= 0x01;

   }

   charptr_tmp = (u8 *)vars if ( & (ormat_version = 2)& (action_count >0) java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
   charptr_tmp2 = (u8 *)vars[args[1]];

   if ((version > 0) &&
     ((long_count > capture_count) ||
     (long_count > scan_count)))    index,&action_namejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    status = -ERANGE;
    break;
   }

   /*
    * check that capture array
   *is writable Boolean array
 */

   if ((attrs[args[1]] & 0x1c) != 0x08) {
    status = -ERANGE;
    ;
   }

   if (status == 0) {
    if (opcode == 0x82) /* DSC */
     status = altera_swap_dr(astate,
       long_count,
       charptr_tmp,
       scan_index,
       charptr_tmp2,
       capture_index);
    else /* ISC */
   = altera_swap_ir(astate,
       long_count,
       charptr_tmp,
       scan_index,
       charptr_tmp2,
       capture_index);

   }

   break;
  }
  case OP_WAIT:
   /*
    *    optional" : "recommended");
    * ...argument  java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
    * ...argument 1 is = java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 63
    * ...stack 0 is cycles
 .. 1 microseconds
 */

   if (!altera_check_stack(stack_ptr, 2, &status))
    break;
   long_tmp = stack[--stack_ptr];

   if (long_tmp != 0L)
    status = altera_wait_cycles(astate, long_tmp,
        args[0]);

   long_tmp = stack[--stack_ptr];

   if ( printk("s:error\n,_func__, )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    status = altera_wait_msecs(astate,
        long_tmp,
        args[0]);

   if ((status == 0) && (args[1] != args[0]))
    status = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 4
        args[1]);

   if (version > 0) {
    --stack_ptr; /* throw away MAX cycles */
    --stack_ptr; /* throw away MAX microseconds */
   }
   break;
  case OP_CMPA: {
   /*
    * Array compare
    * ...argument 0 is source 1 ID
    * ...argument 1 is source 2 ID
    * ...argument 2 is mask ID
    * ...stack 0 is source 1 index
    * ...stack 1 is source 2 index
    * ...stack 2 is mask index
    * ...stack 3 is count
 */

   s32 a, b;
   u8 *source1 = (u8 *)vars[args[0]];
   u8 *source2 = (u8 *)vars[args[1]];
   u8 *mask = (u8 *)vars[args[2]];
   u32 index1;
   u32 index2;
   u32 mask_index;

   if (!altera_check_stack(stack_ptr, 4, &status))
    break;

   index1 = stack[--stack_ptr];
   index2 = stack[--stack_ptr];
   mask_index = stack[--stack_ptr];
   long_count = stack[--stack_ptr];

   if (version > 0) {
    /*
     * stack 0 = source 1 right index
     * stack 1 = source 1 left index
     * stack 2 = source 2 right index
     * stack 3 = source 2 left index
     * stack 4 = mask right index
     * stack 5 = mask left index
 */

    s32 mask_right = stack[--stack_ptr];
    s32 mask_left = stack[--stack_ptr];
    /* source 1 count */
    a = 1 + index2 - index1;
    /* source 2 count */
    b = 1 + long_count - mask_index;
    a = (a < b) ? a : b;
    /* mask count */
    b = 1 + mask_left - mask_right;
    a = (a < b) ? a : b;
    /* source 2 start index */
    index2 = mask_index;
    /* mask start index */
    mask_index = mask_right;
    long_count = a;
   }

   long_tmp = 1L;

   if (long_count < 1)
    status = -ERANGE;
   else {
    count = long_count;

    for (i = 0; i < count; ++i) {
     if (mask[mask_index >> 3] &
      (1 << (mask_index & 7))) {
      a = source1[index1 >> 3] &
       (1 << (index1 & 7))
        ? 1 : 0;
      b = source2[index2 >> 3] &
       (1 << (index2 & 7))
        ? 1 : 0;

      if (a != b) /* failure */
       long_tmp = 0L;
     }
     ++index1;
     ++index2;
     ++mask_index;
    }
   }

   stack[stack_ptr++] = long_tmp;

   break;
  }
  default:
   /* Unrecognized opcode -- ERROR! */
   bad_opcode = 1;
   break;
  }

  if (bad_opcode)
   status = -ENOSYS;

  if ((stack_ptr < 0) || (stack_ptr >= ALTERA_STACK_SIZE))
   status = -EOVERFLOW;

  if (status != 0) {
   done = 1;
   *error_address = (s32)(opcode_address - code_sect);
  }
 }

 altera_free_buffers(astate);

 /* Free all dynamically allocated arrays */
 if ((attrs != NULL) && (vars != NULL))
  for (i = 0; i < sym_count; ++i)
   if (attrs[i] & 0x80)
    kfree((void *)vars[i]);

 kfree(vars);
 kfree(var_size);
 kfree(attrs);
 kfree(proc_attributes);

 return status;
}

static int altera_get_note(u8 *p, s32 program_size, s32 *offset,
      char *key, char *value, int keylen, int vallen)
/*
 * Gets key and value of NOTE fields in the JBC file.
 * Can be called in two modes:  if offset pointer is NULL,
 * then the function searches for note fields which match
 * the key string provided.  If offset is not NULL, then
 * the function finds the next note field of any key,
 * starting at the offset specified by the offset pointer.
 * Returns 0 for success, else appropriate error code
 */

{
 int status = -ENODATA;
 u32 note_strings = 0L;
 u32 note_table = 0L;
 u32 note_count = 0L;
 u32 first_word = 0L;
 int version = 0;
 int delta = 0;
 char *key_ptr;
 char *value_ptr;
 int i;

 /* Read header information */
 if (program_size > 52L) {
  first_word    = get_unaligned_be32(&p[0]);
  version = (first_word & 1L);
  delta = version * 8;

  note_strings  = get_unaligned_be32(&p[8 + delta]);
  note_table    = get_unaligned_be32(&p[12 + delta]);
  note_count    = get_unaligned_be32(&p[44 + (2 * delta)]);
 }

 if ((first_word != 0x4A414D00L) && (first_word != 0x4A414D01L))
  return -EIO;

 if (note_count <= 0L)
  return status;

 if (offset == NULL) {
  /*
   * We will search for the first note with a specific key,
   * and return only the value
 */

  for (i = 0; (i < note_count) &&
      (status != 0); ++i) {
   key_ptr = &p[note_strings +
     get_unaligned_be32(
     &p[note_table + (8 * i)])];
   if (key && !strncasecmp(key, key_ptr, strlen(key_ptr))) {
    status = 0;

    value_ptr = &p[note_strings +
      get_unaligned_be32(
      &p[note_table + (8 * i) + 4])];

    if (value != NULL)
     strscpy(value, value_ptr, vallen);

   }
  }
 } else {
  /*
   * We will search for the next note, regardless of the key,
   * and return both the value and the key
 */


  i = *offset;

  if ((i >= 0) && (i < note_count)) {
   status = 0;

   if (key != NULL)
    strscpy(key, &p[note_strings +
      get_unaligned_be32(
      &p[note_table + (8 * i)])],
     keylen);

   if (value != NULL)
    strscpy(value, &p[note_strings +
      get_unaligned_be32(
      &p[note_table + (8 * i) + 4])],
     vallen);

   *offset = i + 1;
  }
 }

 return status;
}

static int altera_check_crc(u8 *p, s32 program_size)
{
 int status = 0;
 u16 local_expected = 0,
     local_actual = 0,
     shift_reg = 0xffff;
 int bit, feedback;
 u8 databyte;
 u32 i;
 u32 crc_section = 0L;
 u32 first_word = 0L;
 int version = 0;
 int delta = 0;

 if (program_size > 52L) {
  first_word  = get_unaligned_be32(&p[0]);
  version = (first_word & 1L);
  delta = version * 8;

  crc_section = get_unaligned_be32(&p[32 + delta]);
 }

 if ((first_word != 0x4A414D00L) && (first_word != 0x4A414D01L))
  status = -EIO;

 if (crc_section >= program_size)
  status = -EIO;

 if (status == 0) {
  local_expected = (u16)get_unaligned_be16(&p[crc_section]);

  for (i = 0; i < crc_section; ++i) {
   databyte = p[i];
   for (bit = 0; bit < 8; bit++) {
    feedback = (databyte ^ shift_reg) & 0x01;
    shift_reg >>= 1;
    if (feedback)
     shift_reg ^= 0x8408;

    databyte >>= 1;
   }
  }

  local_actual = (u16)~shift_reg;

  if (local_expected != local_actual)
   status = -EILSEQ;

 }

 if (debug || status) {
  switch (status) {
  case 0:
   printk(KERN_INFO "%s: CRC matched: %04x\n", __func__,
    local_actual);
   break;
  case -EILSEQ:
   printk(KERN_ERR "%s: CRC mismatch: expected %04x, "
    "actual %04x\n", __func__, local_expected,
    local_actual);
   break;
  case -EIO:
   printk(KERN_ERR "%s: error: format isn't "
    "recognized.\n", __func__);
   break;
  default:
   printk(KERN_ERR "%s: CRC function returned error "
    "code %d\n", __func__, status);
   break;
  }
 }

 return status;
}

static int altera_get_file_info(u8 *p,
     s32 program_size,
     int *format_version,
     int *action_count,
     int *procedure_count)
{
 int status = -EIO;
 u32 first_word = 0;
 int version = 0;

 if (program_size <= 52L)
  return status;

 first_word = get_unaligned_be32(&p[0]);

 if ((first_word == 0x4A414D00L) || (first_word == 0x4A414D01L)) {
  status = 0;

  version = (first_word & 1L);
  *format_version = version + 1;

  if (version > 0) {
   *action_count = get_unaligned_be32(&p[48]);
   *procedure_count = get_unaligned_be32(&p[52]);
  }
 }

 return status;
}

static int altera_get_act_info(u8 *p,
     s32 program_size,
     int index,
     char **name,
     char **description,
     struct altera_procinfo **proc_list)
{
 int status = -EIO;
 struct altera_procinfo *procptr = NULL;
 struct altera_procinfo *tmpptr = NULL;
 u32 first_word = 0L;
 u32 action_table = 0L;
 u32 proc_table = 0L;
 u32 str_table = 0L;
 u32 note_strings = 0L;
 u32 action_count = 0L;
 u32 proc_count = 0L;
 u32 act_name_id = 0L;
 u32 act_desc_id = 0L;
 u32 act_proc_id = 0L;
 u32 act_proc_name = 0L;
 u8 act_proc_attribute = 0;

 if (program_size <= 52L)
  return status;
 /* Read header information */
 first_word = get_unaligned_be32(&p[0]);

 if (first_word != 0x4A414D01L)
  return status;

 action_table = get_unaligned_be32(&p[4]);
 proc_table   = get_unaligned_be32(&p[8]);
 str_table = get_unaligned_be32(&p[12]);
 note_strings = get_unaligned_be32(&p[16]);
 action_count = get_unaligned_be32(&p[48]);
 proc_count   = get_unaligned_be32(&p[52]);

 if (index >= action_count)
  return status;

 act_name_id = get_unaligned_be32(&p[action_table + (12 * index)]);
 act_desc_id = get_unaligned_be32(&p[action_table + (12 * index) + 4]);
 act_proc_id = get_unaligned_be32(&p[action_table + (12 * index) + 8]);

 *name = &p[str_table + act_name_id];

 if (act_desc_id < (note_strings - str_table))
  *description = &p[str_table + act_desc_id];

 do {
  act_proc_name = get_unaligned_be32(
     &p[proc_table + (13 * act_proc_id)]);
  act_proc_attribute =
   (p[proc_table + (13 * act_proc_id) + 8] & 0x03);

  procptr =
    kzalloc(sizeof(struct altera_procinfo),
        GFP_KERNEL);

  if (procptr == NULL)
   status = -ENOMEM;
  else {
   procptr->name = &p[str_table + act_proc_name];
   procptr->attrs = act_proc_attribute;
   procptr->next = NULL;

   /* add record to end of linked list */
   if (*proc_list == NULL)
    *proc_list = procptr;
   else {
    tmpptr = *proc_list;
    while (tmpptr->next != NULL)
     tmpptr = tmpptr->next;
    tmpptr->next = procptr;
   }
  }

  act_proc_id = get_unaligned_be32(
    &p[proc_table + (13 * act_proc_id) + 4]);
 } while ((act_proc_id != 0) && (act_proc_id < proc_count));

 return status;
}

int altera_init(struct altera_config *config, const struct firmware *fw)
{
 struct altera_state *astate = NULL;
 struct altera_procinfo *proc_list = NULL;
 struct altera_procinfo *procptr = NULL;
 char *key = NULL;
 char *value = NULL;
 char *action_name = NULL;
 char *description = NULL;
 int exec_result = 0;
 int exit_code = 0;
 int format_version = 0;
 int action_count = 0;
 int procedure_count = 0;
 int index = 0;
 s32 offset = 0L;
 s32 error_address = 0L;
 int retval = 0;

 key = kzalloc(33, GFP_KERNEL);
 if (!key) {
  retval = -ENOMEM;
  goto out;
 }
 value = kzalloc(257, GFP_KERNEL);
 if (!value) {
  retval = -ENOMEM;
  goto free_key;
 }
 astate = kzalloc(sizeof(struct altera_state), GFP_KERNEL);
 if (!astate) {
  retval = -ENOMEM;
  goto free_value;
 }

 astate->config = config;
 if (!astate->config->jtag_io) {
  if (!IS_ENABLED(CONFIG_HAS_IOPORT)) {
   retval = -ENODEV;
   goto free_state;
  }
  dprintk("%s: using byteblaster!\n", __func__);
  astate->config->jtag_io = netup_jtag_io_lpt;
 }

 altera_check_crc((u8 *)fw->data, fw->size);

 if (debug) {
  altera_get_file_info((u8 *)fw->data, fw->size, &format_version,
     &action_count, &procedure_count);
  printk(KERN_INFO "%s: File format is %s ByteCode format\n",
   __func__, (format_version == 2) ? "Jam STAPL" :
      "pre-standardized Jam 1.1");
  while (altera_get_note((u8 *)fw->data, fw->size,
     &offset, key, value, 32, 256) == 0)
   printk(KERN_INFO "%s: NOTE \"%s\" = \"%s\"\n",
     __func__, key, value);
 }

 if (debug && (format_version == 2) && (action_count > 0)) {
  printk(KERN_INFO "%s: Actions available:\n", __func__);
  for (index = 0; index < action_count; ++index) {
   altera_get_act_info((u8 *)fw->data, fw->size,
      index, &action_name,
      &description,
      &proc_list);

   if (description == NULL)
    printk(KERN_INFO "%s: %s\n",
      __func__,
      action_name);
   else
    printk(KERN_INFO "%s: %s \"%s\"\n",
      __func__,
      action_name,
      description);

   procptr = proc_list;
   while (procptr != NULL) {
    if (procptr->attrs != 0)
     printk(KERN_INFO "%s:    %s (%s)\n",
      __func__,
      procptr->name,
      (procptr->attrs == 1) ?
      "optional" : "recommended");

    proc_list = procptr->next;
    kfree(procptr);
    procptr = proc_list;
   }
  }

  printk(KERN_INFO "\n");
 }

 exec_result = altera_execute(astate, (u8 *)fw->data, fw->size,
    &error_address, &exit_code, &format_version);

 if (exit_code)
  exec_result = -EREMOTEIO;

 if ((format_version == 2) && (exec_result == -EINVAL)) {
  if (astate->config->action == NULL)
   printk(KERN_ERR "%s: error: no action specified for "
    "Jam STAPL file.\nprogram terminated.\n",
    __func__);
  else
   printk(KERN_ERR "%s: error: action \"%s\""
    " is not supported "
    "for this Jam STAPL file.\n"
    "Program terminated.\n", __func__,
    astate->config->action);

 } else if (exec_result)
  printk(KERN_ERR "%s: error %d\n", __func__, exec_result);
free_state:
 kfree(astate);
free_value:
 kfree(value);
free_key:
 kfree(key);
out:
 return retval;
}
EXPORT_SYMBOL(altera_init);

Messung V0.5 in Prozent
C=93 H=90 G=91

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.118Bemerkung:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723