src/share/vm/adlc/formsopt.cpp

changeset 1038
dbbe28fc66b5
parent 435
a61af66fc99e
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/adlc/formsopt.cpp	Thu Feb 26 16:57:21 2009 -0800
     1.2 +++ b/src/share/vm/adlc/formsopt.cpp	Fri Feb 27 03:35:40 2009 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1998-2009 Sun Microsystems, Inc.  All Rights Reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -273,13 +273,13 @@
    1.11    for(_regDefs.reset(); (name = _regDefs.iter()) != NULL;) {
    1.12      int rnum = ((RegDef*)_regDef[name])->register_num();
    1.13      if( (rnum >> 5) == wordnum )
    1.14 -      word |= (1L<<(rnum&31));
    1.15 +      word |= (1 << (rnum & 31));
    1.16    }
    1.17    if( stack_also ) {
    1.18      // Now also collect stack bits
    1.19      for( int i = 0; i < 32; i++ )
    1.20        if( wordnum*32+i >= RegisterForm::_reg_ctr )
    1.21 -        word |= (1L<<i);
    1.22 +        word |= (1 << i);
    1.23    }
    1.24  
    1.25    return word;
    1.26 @@ -592,10 +592,10 @@
    1.27                                   int input) {
    1.28    if( position > _max_position ) _max_position = position;
    1.29  
    1.30 -  _parent.addName((char *)parent);
    1.31 -  _position.addName((char *)position);
    1.32 +  _parent.addName((char*) (intptr_t) parent);
    1.33 +  _position.addName((char*) (intptr_t) position);
    1.34    _instrs.addName(name);
    1.35 -  _input.addName((char *)input);
    1.36 +  _input.addName((char*) (intptr_t) input);
    1.37  }
    1.38  
    1.39  // Access info about instructions in the peep-match rule
    1.40 @@ -603,7 +603,7 @@
    1.41    return _max_position;
    1.42  }
    1.43  
    1.44 -const char *PeepMatch::instruction_name(intptr_t position) {
    1.45 +const char *PeepMatch::instruction_name(int position) {
    1.46    return _instrs.name(position);
    1.47  }
    1.48  
    1.49 @@ -615,11 +615,11 @@
    1.50    _input.reset();
    1.51  }
    1.52  
    1.53 -void  PeepMatch::next_instruction( intptr_t &parent, intptr_t &position, const char * &name, intptr_t &input ){
    1.54 -  parent   = (intptr_t)_parent.iter();
    1.55 -  position = (intptr_t)_position.iter();
    1.56 +void  PeepMatch::next_instruction(int &parent, int &position, const char* &name, int &input) {
    1.57 +  parent   = (int) (intptr_t) _parent.iter();
    1.58 +  position = (int) (intptr_t) _position.iter();
    1.59    name     = _instrs.iter();
    1.60 -  input    = (intptr_t)_input.iter();
    1.61 +  input    = (int) (intptr_t) _input.iter();
    1.62  }
    1.63  
    1.64  // 'true' if current position in iteration is a placeholder, not matched.
    1.65 @@ -637,15 +637,15 @@
    1.66  }
    1.67  
    1.68  //------------------------------PeepConstraint---------------------------------
    1.69 -PeepConstraint::PeepConstraint(intptr_t  left_inst,  char *left_op, char *relation,
    1.70 -                               intptr_t  right_inst, char *right_op)
    1.71 +PeepConstraint::PeepConstraint(int left_inst,  char* left_op, char* relation,
    1.72 +                               int right_inst, char* right_op)
    1.73    : _left_inst(left_inst), _left_op(left_op), _relation(relation),
    1.74      _right_inst(right_inst), _right_op(right_op), _next(NULL) {}
    1.75  PeepConstraint::~PeepConstraint() {
    1.76  }
    1.77  
    1.78  // Check if constraints use instruction at position
    1.79 -bool PeepConstraint::constrains_instruction(intptr_t position) {
    1.80 +bool PeepConstraint::constrains_instruction(int position) {
    1.81    // Check local instruction constraints
    1.82    if( _left_inst  == position ) return true;
    1.83    if( _right_inst == position ) return true;
    1.84 @@ -692,7 +692,7 @@
    1.85  }
    1.86  void  PeepReplace::add_operand( int inst_num, char *inst_operand ) {
    1.87    _instruction.add_signal();
    1.88 -  _operand_inst_num.addName((char*)inst_num);
    1.89 +  _operand_inst_num.addName((char*) (intptr_t) inst_num);
    1.90    _operand_op_name.addName(inst_operand);
    1.91  }
    1.92  
    1.93 @@ -702,15 +702,15 @@
    1.94    _operand_inst_num.reset();
    1.95    _operand_op_name.reset();
    1.96  }
    1.97 -void  PeepReplace::next_instruction(const char * &inst){
    1.98 +void  PeepReplace::next_instruction(const char* &inst){
    1.99    inst                     = _instruction.iter();
   1.100 -  intptr_t   inst_num      = (intptr_t)_operand_inst_num.iter();
   1.101 -  const char *inst_operand = _operand_op_name.iter();
   1.102 +  int         inst_num     = (int) (intptr_t) _operand_inst_num.iter();
   1.103 +  const char* inst_operand = _operand_op_name.iter();
   1.104  }
   1.105 -void  PeepReplace::next_operand( intptr_t &inst_num, const char * &inst_operand ) {
   1.106 -  const char *inst   = _instruction.iter();
   1.107 -  inst_num           = (intptr_t)_operand_inst_num.iter();
   1.108 -  inst_operand       = _operand_op_name.iter();
   1.109 +void  PeepReplace::next_operand(int &inst_num, const char* &inst_operand) {
   1.110 +  const char* inst = _instruction.iter();
   1.111 +  inst_num         = (int) (intptr_t) _operand_inst_num.iter();
   1.112 +  inst_operand     = _operand_op_name.iter();
   1.113  }
   1.114  
   1.115  

mercurial