src/cpu/x86/vm/assembler_x86.cpp

changeset 4412
ffa87474d7a4
parent 4411
e2e6bf86682c
child 4413
038dd2875b94
     1.1 --- a/src/cpu/x86/vm/assembler_x86.cpp	Thu Jan 03 16:30:47 2013 -0800
     1.2 +++ b/src/cpu/x86/vm/assembler_x86.cpp	Mon Jan 07 14:08:28 2013 -0800
     1.3 @@ -182,7 +182,7 @@
     1.4  // make this go away someday
     1.5  void Assembler::emit_data(jint data, relocInfo::relocType rtype, int format) {
     1.6    if (rtype == relocInfo::none)
     1.7 -        emit_long(data);
     1.8 +        emit_int32(data);
     1.9    else  emit_data(data, Relocation::spec_simple(rtype), format);
    1.10  }
    1.11  
    1.12 @@ -202,7 +202,7 @@
    1.13      else
    1.14        code_section()->relocate(inst_mark(), rspec, format);
    1.15    }
    1.16 -  emit_long(data);
    1.17 +  emit_int32(data);
    1.18  }
    1.19  
    1.20  static int encode(Register r) {
    1.21 @@ -243,7 +243,7 @@
    1.22    } else {
    1.23      emit_int8(op1);
    1.24      emit_int8(op2 | encode(dst));
    1.25 -    emit_long(imm32);
    1.26 +    emit_int32(imm32);
    1.27    }
    1.28  }
    1.29  
    1.30 @@ -254,7 +254,7 @@
    1.31    assert((op1 & 0x02) == 0, "sign-extension bit should not be set");
    1.32    emit_int8(op1);
    1.33    emit_int8(op2 | encode(dst));
    1.34 -  emit_long(imm32);
    1.35 +  emit_int32(imm32);
    1.36  }
    1.37  
    1.38  // immediate-to-memory forms
    1.39 @@ -268,7 +268,7 @@
    1.40    } else {
    1.41      emit_int8(op1);
    1.42      emit_operand(rm, adr, 4);
    1.43 -    emit_long(imm32);
    1.44 +    emit_int32(imm32);
    1.45    }
    1.46  }
    1.47  
    1.48 @@ -976,7 +976,7 @@
    1.49    emit_int8(0x1F);
    1.50    emit_int8((unsigned char)0x80);
    1.51                     // emit_rm(cbuf, 0x2, EAX_enc, EAX_enc);
    1.52 -  emit_long(0);    // 32-bits offset (4 bytes)
    1.53 +  emit_int32(0);   // 32-bits offset (4 bytes)
    1.54  }
    1.55  
    1.56  void Assembler::addr_nop_8() {
    1.57 @@ -987,7 +987,7 @@
    1.58    emit_int8((unsigned char)0x84);
    1.59                     // emit_rm(cbuf, 0x2, EAX_enc, 0x4);
    1.60    emit_int8(0x00); // emit_rm(cbuf, 0x0, EAX_enc, EAX_enc);
    1.61 -  emit_long(0);    // 32-bits offset (4 bytes)
    1.62 +  emit_int32(0);   // 32-bits offset (4 bytes)
    1.63  }
    1.64  
    1.65  void Assembler::addsd(XMMRegister dst, XMMRegister src) {
    1.66 @@ -1076,7 +1076,7 @@
    1.67    prefix(dst);
    1.68    emit_int8((unsigned char)0x81);
    1.69    emit_operand(rsp, dst, 4);
    1.70 -  emit_long(imm32);
    1.71 +  emit_int32(imm32);
    1.72  }
    1.73  
    1.74  void Assembler::andl(Register dst, int32_t imm32) {
    1.75 @@ -1204,7 +1204,7 @@
    1.76    prefix(dst);
    1.77    emit_int8((unsigned char)0x81);
    1.78    emit_operand(rdi, dst, 4);
    1.79 -  emit_long(imm32);
    1.80 +  emit_int32(imm32);
    1.81  }
    1.82  
    1.83  void Assembler::cmpl(Register dst, int32_t imm32) {
    1.84 @@ -1408,7 +1408,7 @@
    1.85    } else {
    1.86      emit_int8(0x69);
    1.87      emit_int8((unsigned char)(0xC0 | encode));
    1.88 -    emit_long(value);
    1.89 +    emit_int32(value);
    1.90    }
    1.91  }
    1.92  
    1.93 @@ -1440,7 +1440,7 @@
    1.94               "must be 32bit offset (call4)");
    1.95        emit_int8(0x0F);
    1.96        emit_int8((unsigned char)(0x80 | cc));
    1.97 -      emit_long(offs - long_size);
    1.98 +      emit_int32(offs - long_size);
    1.99      }
   1.100    } else {
   1.101      // Note: could eliminate cond. jumps to this jump if condition
   1.102 @@ -1450,7 +1450,7 @@
   1.103      L.add_patch_at(code(), locator());
   1.104      emit_int8(0x0F);
   1.105      emit_int8((unsigned char)(0x80 | cc));
   1.106 -    emit_long(0);
   1.107 +    emit_int32(0);
   1.108    }
   1.109  }
   1.110  
   1.111 @@ -1498,7 +1498,7 @@
   1.112        emit_int8((offs - short_size) & 0xFF);
   1.113      } else {
   1.114        emit_int8((unsigned char)0xE9);
   1.115 -      emit_long(offs - long_size);
   1.116 +      emit_int32(offs - long_size);
   1.117      }
   1.118    } else {
   1.119      // By default, forward jumps are always 32-bit displacements, since
   1.120 @@ -1508,7 +1508,7 @@
   1.121      InstructionMark im(this);
   1.122      L.add_patch_at(code(), locator());
   1.123      emit_int8((unsigned char)0xE9);
   1.124 -    emit_long(0);
   1.125 +    emit_int32(0);
   1.126    }
   1.127  }
   1.128  
   1.129 @@ -1732,7 +1732,7 @@
   1.130  void Assembler::movl(Register dst, int32_t imm32) {
   1.131    int encode = prefix_and_encode(dst->encoding());
   1.132    emit_int8((unsigned char)(0xB8 | encode));
   1.133 -  emit_long(imm32);
   1.134 +  emit_int32(imm32);
   1.135  }
   1.136  
   1.137  void Assembler::movl(Register dst, Register src) {
   1.138 @@ -1753,7 +1753,7 @@
   1.139    prefix(dst);
   1.140    emit_int8((unsigned char)0xC7);
   1.141    emit_operand(rax, dst, 4);
   1.142 -  emit_long(imm32);
   1.143 +  emit_int32(imm32);
   1.144  }
   1.145  
   1.146  void Assembler::movl(Address dst, Register src) {
   1.147 @@ -2499,7 +2499,7 @@
   1.148    // in 64bits we push 64bits onto the stack but only
   1.149    // take a 32bit immediate
   1.150    emit_int8(0x68);
   1.151 -  emit_long(imm32);
   1.152 +  emit_int32(imm32);
   1.153  }
   1.154  
   1.155  void Assembler::push(Register src) {
   1.156 @@ -2791,7 +2791,7 @@
   1.157      emit_int8((unsigned char)0xF7);
   1.158      emit_int8((unsigned char)(0xC0 | encode));
   1.159    }
   1.160 -  emit_long(imm32);
   1.161 +  emit_int32(imm32);
   1.162  }
   1.163  
   1.164  void Assembler::testl(Register dst, Register src) {
   1.165 @@ -4735,7 +4735,7 @@
   1.166    prefixq(dst);
   1.167    emit_int8((unsigned char)0x81);
   1.168    emit_operand(rsp, dst, 4);
   1.169 -  emit_long(imm32);
   1.170 +  emit_int32(imm32);
   1.171  }
   1.172  
   1.173  void Assembler::andq(Register dst, int32_t imm32) {
   1.174 @@ -4808,7 +4808,7 @@
   1.175    prefixq(dst);
   1.176    emit_int8((unsigned char)0x81);
   1.177    emit_operand(rdi, dst, 4);
   1.178 -  emit_long(imm32);
   1.179 +  emit_int32(imm32);
   1.180  }
   1.181  
   1.182  void Assembler::cmpq(Register dst, int32_t imm32) {
   1.183 @@ -4947,7 +4947,7 @@
   1.184    } else {
   1.185      emit_int8(0x69);
   1.186      emit_int8((unsigned char)(0xC0 | encode));
   1.187 -    emit_long(value);
   1.188 +    emit_int32(value);
   1.189    }
   1.190  }
   1.191  
   1.192 @@ -5100,7 +5100,7 @@
   1.193    InstructionMark im(this);
   1.194    int encode = prefixq_and_encode(dst->encoding());
   1.195    emit_int8((unsigned char)(0xC7 | encode));
   1.196 -  emit_long(imm32);
   1.197 +  emit_int32(imm32);
   1.198  }
   1.199  
   1.200  void Assembler::movslq(Address dst, int32_t imm32) {
   1.201 @@ -5109,7 +5109,7 @@
   1.202    prefixq(dst);
   1.203    emit_int8((unsigned char)0xC7);
   1.204    emit_operand(rax, dst, 4);
   1.205 -  emit_long(imm32);
   1.206 +  emit_int32(imm32);
   1.207  }
   1.208  
   1.209  void Assembler::movslq(Register dst, Address src) {
   1.210 @@ -5187,7 +5187,7 @@
   1.211    prefixq(dst);
   1.212    emit_int8((unsigned char)0x81);
   1.213    emit_operand(rcx, dst, 4);
   1.214 -  emit_long(imm32);
   1.215 +  emit_int32(imm32);
   1.216  }
   1.217  
   1.218  void Assembler::orq(Register dst, int32_t imm32) {
   1.219 @@ -5422,7 +5422,7 @@
   1.220      emit_int8((unsigned char)0xF7);
   1.221      emit_int8((unsigned char)(0xC0 | encode));
   1.222    }
   1.223 -  emit_long(imm32);
   1.224 +  emit_int32(imm32);
   1.225  }
   1.226  
   1.227  void Assembler::testq(Register dst, Register src) {

mercurial