reference on the operand stack
768442
private void charArray(char[] vals, int limit) {
        int len;
        char c;
        int left, right;
        String str;
        int instrsPerChunk = 6;
        int maxLen;
        int used;

        left = 0;
        len = vals.length;
        // len/CHUNK + 1 is conservative because len % CHUNK may be 0
        maxLen = 3 + (len / CHUNK + 1) * instrsPerChunk + 1;
        if (limit < maxLen) {
            pushMethod(char.class);
            if (limit < maxLen) {
                throw new IllegalStateException("array size ...");
            }
            charArray(vals, MAX_INSTRUCTIONS);
            popMethod();
            return;
        }

        dest.emit(LDC, len);
        ClassRef.CHAR.emitArrayNew(dest);
        dest.emit(ASTORE, buffer);  // store array reference
        while (left < len) {
            c = vals[left];
            if (c != 0) {
                right = Math.min(len, left + CHUNK);
                used = right - left;
                while (used > 0 && vals[left + used - 1] == 0) {
                    used--;
                }
                if (used > 0) {
                    str = String.copyValueOf(vals, left, used);
                    dest.emit(LDC, str);
                    dest.emit(LDC, 0);
                    dest.emit(LDC, used);
                    dest.emit(ALOAD, buffer);
                    dest.emit(LDC, left);
                    dest.emit(INVOKEVIRTUAL, GET_CHARS);
                    left = right;
                } else {
                    // empty chunk, don't save it
                }
            } else {
                left++;
            }
        }
        dest.emit(ALOAD, buffer);
    }
645029
def parse_operand(string, location, tokens):
    
    mod = " ".join(tokens.get("modifier", ""))

    if "immediate" in tokens:
        imm = parse_immediate("".join(tokens["immediate"]))
        size = modifier_size.get(mod, None)

        oprnd = X86ImmediateOperand(imm, size)

    if "register" in tokens:
        name = tokens["register"]
        size = arch_info.registers_size[tokens["register"]]

        oprnd = X86RegisterOperand(name, size)

    if "memory" in tokens:
        seg_reg = tokens.get("segment", None)
        base_reg = tokens.get("base", None)
        index_reg = tokens.get("index", None)
        scale_imm = int(tokens.get("scale", "0x1"), 16)
        displ_imm = int("".join(tokens.get("displacement", "0x0")), 16)

        oprnd = X86MemoryOperand(seg_reg, base_reg, index_reg, scale_imm, displ_imm)

    oprnd.modifier = mod

    if not oprnd.size and oprnd.modifier:
        oprnd.size = modifier_size[oprnd.modifier]

    return oprnd
73560
def exec(self, operand1, operand2):
		
		in1 = self.register_interface.read(operand1)
		in2 = self.register_interface.read(operand2)
		out = self.function(in1, in2)
		self.register_interface.write(operand2, out)
1180680
@Override
  public void visitIntInsn(int opcode, int operand) {
    if (opcode == Opcodes.NEWARRAY) {
      // instack: ... count
      // outstack: ... aref
      if (operand >= 4 && operand <= 11) {
        super.visitInsn(Opcodes.DUP); // -> stack: ... count count
        super.visitIntInsn(opcode, operand); // -> stack: ... count aref
        invokeRecordAllocation(primitiveTypeNames[operand]);
        // -> stack: ... aref
      } else {
        logger.severe(
            "NEWARRAY called with an invalid operand "
                + operand
                + ".  Not instrumenting this allocation!");
        super.visitIntInsn(opcode, operand);
      }
    } else {
      super.visitIntInsn(opcode, operand);
    }
  }
108949
def mulmod(computation: BaseComputation) -> None:
    
    left, right, mod = computation.stack_pop(num_items=3, type_hint=constants.UINT256)

    if mod == 0:
        result = 0
    else:
        result = (left * right) % mod
    computation.stack_push(result)
208078
def apply_operation(op_stack, out_stack):
    
    out_stack.append(calc(out_stack.pop(), out_stack.pop(), op_stack.pop()))
811846
def assemble(io)
      operand = 0
      raise "invalid operand argument #{inspect}" unless (@first.is_a?(Array))
      @first.each do |r|
        raise "nil register in push, index #{r}- #{inspect}" if r.nil?
        operand = operand | (1 << reg_code(r))
      end
      val = operand
      val = val | (reg_code(@rn) <<             16)
      val = val | (is_pop <<              16 + 4) #20
      val = val | (1          <<          16 + 4 + 1)
      val = val | (@attributes[:update_status] <<  16 + 4 + 1 + 1)
      val = val | (up_down <<             16 + 4 + 1 + 1 + 1)
      val = val | (pre_post_index <<      16 + 4 + 1 + 1 + 1 + 1)#24
      val = val | instruction_code
      val = val | (cond <<                16 + 4 + 1 + 1 + 1 + 1 + 2 + 2)
      io.write_unsigned_int_32 val
    end
379246
def _do_stack(self, cmd, args):
        
        if not args:
            self.__dump_stack()
            return
        if len(args) > 1:
            self.stderr.write('stack: too many arguments: {}\n'.format(args))
            return
        try:
            depth = int(args[0])
        except ValueError:
            self.stderr.write("stack: depth is not an integer: '{}'\n".format(args[0]))
            return
        if depth < 0:
            self.stderr.write('stack: negative depth: {}\n'.format(depth))
            return
        return depth
1053923
function stackAlloc(size) {
  size = size|0;
  var ret = 0;
  ret = STACKTOP;
  STACKTOP = (STACKTOP + size)|0;
  STACKTOP = (STACKTOP + 15)&-16;

  return ret|0;
}
325800
def _mulf16(ins):
    
    op1, op2 = tuple(ins.quad[2:])

    if _f_ops(op1, op2) is not None:
        op1, op2 = _f_ops(op1, op2)

        if op2 == 1:  # A * 1 => A
            output = _f16_oper(op1)
            output.append('push de')
            output.append('push hl')
            return output

        if op2 == -1:
            return _neg32(ins)

        output = _f16_oper(op1)
        if op2 == 0:
            output.append('ld hl, 0')
            output.append('ld e, h')
            output.append('ld d, l')
            output.append('push de')
            output.append('push hl')
            return output

    output = _f16_oper(op1, str(op2))
    output.append('call __MULF16')
    output.append('push de')
    output.append('push hl')
    REQUIRES.add('mulf16.asm')
    return output
275807
def arithmetic(self, operation, operand1, operand2, operand3 = None):
        
        if isinstance(operand1, int):
            output_type = self.symtab.get_type(operand1)
            self.free_if_register(operand1)
        else:
            output_type = None
        if isinstance(operand2, int):
            output_type = self.symtab.get_type(operand2) if output_type == None else output_type
            self.free_if_register(operand2)
        else:
            output_type = SharedData.TYPES.NO_TYPE if output_type == None else output_type
        #if operand3 is not defined, reserve one free register for it
        output = self.take_register(output_type) if operand3 == None else operand3
        mnemonic = self.arithmetic_mnemonic(operation, output_type)
        self.newline_text("{0}\t{1},{2},{3}".format(mnemonic, self.symbol(operand1), self.symbol(operand2), self.symbol(output)), True)
        return output
1301375
def stackclimber(height=0):           # http://stackoverflow.com/a/900404/48251
    
    caller = inspect.stack()[height+1]
    scope = caller[0].f_globals
    path = scope['__name__'].split('__main__')[0].strip('.')
    if path == '':
        if scope['__package__']:
            path = scope['__package__']
        else:
            path = os.path.basename(sys.argv[0]).split('.')[0]
    return path
1018770
public String stack() {
    if (d1 <= 0) {
      // No stack, detail or sequence is present
      return null;
    } else if (d2 < 0) {
      // Stack, but no detail is present
      return substr(asg, d1 + 1, dN);
    } else {
      // Stack and at least one of detail or sequence is present
      return substr(asg, d1 + 1, d2);
    }
  }
750966
def stack_2_eqn(self,p):
        """"""
        stack_eqn = []
        if p: # if stack is not empty
            for n in p.stack:
                self.eval_eqn(n,stack_eqn)
            return stack_eqn[-1]
        return []
477658
function( obj, type, stack ) {
                    stack = stack || [];
                    var inStack, res,
                        parser = this.parsers[ type || this.typeOf( obj ) ];

                    type = typeof parser;
                    inStack = inArray( obj, stack );

                    if ( inStack !== -1 ) {
                        return "recursion(" + ( inStack - stack.length ) + ")";
                    }
                    if ( type === "function" ) {
                        stack.push( obj );
                        res = parser.call( this, obj, stack );
                        stack.pop();
                        return res;
                    }
                    return ( type === "string" ) ? parser : this.parsers.error;
                }
492656
def _translate_src_register_oprnd(self, operand):
        
        reg_info = self._arch_alias_mapper.get(operand.name, None)

        if reg_info:
            var_base_name, offset = reg_info

            var_size = self._arch_regs_size[var_base_name]
        else:
            var_base_name = operand.name
            var_size = operand.size

        var_name = self._get_var_name(var_base_name)
        ret_val = self.make_bitvec(var_size, var_name)

        if reg_info:
            ret_val = smtfunction.extract(ret_val, offset, operand.size)

        return ret_val
219162
def _modf(ins):
    ''' 
    '''
    op1, op2 = tuple(ins.quad[2:])
    output = _float_oper(op1, op2)
    output.append('call __MODF')
    output.extend(_fpush())
    REQUIRES.add('modf.asm')
    return output