src/cpu/x86/vm/assembler_x86.cpp

changeset 1868
df736661d0c8
parent 1844
cff162798819
parent 1861
2338d41fbd81
child 1907
c18cbe5936b8
child 1926
2d127394260e
     1.1 --- a/src/cpu/x86/vm/assembler_x86.cpp	Mon May 10 14:58:38 2010 -0700
     1.2 +++ b/src/cpu/x86/vm/assembler_x86.cpp	Tue May 11 15:19:19 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1997-2010 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 @@ -6492,24 +6492,19 @@
    1.11  }
    1.12  
    1.13  void MacroAssembler::load_sized_value(Register dst, Address src,
    1.14 -                                      int size_in_bytes, bool is_signed) {
    1.15 -  switch (size_in_bytes ^ (is_signed ? -1 : 0)) {
    1.16 +                                      size_t size_in_bytes, bool is_signed) {
    1.17 +  switch (size_in_bytes) {
    1.18  #ifndef _LP64
    1.19    // For case 8, caller is responsible for manually loading
    1.20    // the second word into another register.
    1.21 -  case ~8:  // fall through:
    1.22 -  case  8:  movl(                dst, src ); break;
    1.23 +  case  8: movl(dst, src); break;
    1.24  #else
    1.25 -  case ~8:  // fall through:
    1.26 -  case  8:  movq(                dst, src ); break;
    1.27 +  case  8: movq(dst, src); break;
    1.28  #endif
    1.29 -  case ~4:  // fall through:
    1.30 -  case  4:  movl(                dst, src ); break;
    1.31 -  case ~2:  load_signed_short(   dst, src ); break;
    1.32 -  case  2:  load_unsigned_short( dst, src ); break;
    1.33 -  case ~1:  load_signed_byte(    dst, src ); break;
    1.34 -  case  1:  load_unsigned_byte(  dst, src ); break;
    1.35 -  default:  ShouldNotReachHere();
    1.36 +  case  4: movl(dst, src); break;
    1.37 +  case  2: is_signed ? load_signed_short(dst, src) : load_unsigned_short(dst, src); break;
    1.38 +  case  1: is_signed ? load_signed_byte( dst, src) : load_unsigned_byte( dst, src); break;
    1.39 +  default: ShouldNotReachHere();
    1.40    }
    1.41  }
    1.42  
    1.43 @@ -7706,6 +7701,7 @@
    1.44  // method handle's MethodType.  This macro hides the distinction.
    1.45  void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg,
    1.46                                                  Register temp_reg) {
    1.47 +  assert_different_registers(vmslots_reg, mh_reg, temp_reg);
    1.48    if (UseCompressedOops)  unimplemented();  // field accesses must decode
    1.49    // load mh.type.form.vmslots
    1.50    if (java_dyn_MethodHandle::vmslots_offset_in_bytes() != 0) {
    1.51 @@ -7744,7 +7740,7 @@
    1.52  Address MacroAssembler::argument_address(RegisterOrConstant arg_slot,
    1.53                                           int extra_slot_offset) {
    1.54    // cf. TemplateTable::prepare_invoke(), if (load_receiver).
    1.55 -  int stackElementSize = Interpreter::stackElementSize();
    1.56 +  int stackElementSize = Interpreter::stackElementSize;
    1.57    int offset = Interpreter::expr_offset_in_bytes(extra_slot_offset+0);
    1.58  #ifdef ASSERT
    1.59    int offset1 = Interpreter::expr_offset_in_bytes(extra_slot_offset+1);

mercurial