Mercurial > hg > truffle
comparison src/cpu/x86/vm/assembler_x86.cpp @ 1503:c640000b7cc1
6829193: JSR 292 needs to support SPARC
Summary: There are unimplemented portions of the hotspot code for method handles and invokedynamic specific to SPARC.
Reviewed-by: kvn, never, jrose
author | twisti |
---|---|
date | Thu, 29 Apr 2010 06:30:25 -0700 |
parents | 0a43776437b6 |
children | 2338d41fbd81 |
comparison
equal
deleted
inserted
replaced
1399:90acda19b80f | 1503:c640000b7cc1 |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
6490 } | 6490 } |
6491 return off; | 6491 return off; |
6492 } | 6492 } |
6493 | 6493 |
6494 void MacroAssembler::load_sized_value(Register dst, Address src, | 6494 void MacroAssembler::load_sized_value(Register dst, Address src, |
6495 int size_in_bytes, bool is_signed) { | 6495 size_t size_in_bytes, bool is_signed) { |
6496 switch (size_in_bytes ^ (is_signed ? -1 : 0)) { | 6496 switch (size_in_bytes) { |
6497 #ifndef _LP64 | 6497 #ifndef _LP64 |
6498 // For case 8, caller is responsible for manually loading | 6498 // For case 8, caller is responsible for manually loading |
6499 // the second word into another register. | 6499 // the second word into another register. |
6500 case ~8: // fall through: | 6500 case 8: movl(dst, src); break; |
6501 case 8: movl( dst, src ); break; | |
6502 #else | 6501 #else |
6503 case ~8: // fall through: | 6502 case 8: movq(dst, src); break; |
6504 case 8: movq( dst, src ); break; | |
6505 #endif | 6503 #endif |
6506 case ~4: // fall through: | 6504 case 4: movl(dst, src); break; |
6507 case 4: movl( dst, src ); break; | 6505 case 2: is_signed ? load_signed_short(dst, src) : load_unsigned_short(dst, src); break; |
6508 case ~2: load_signed_short( dst, src ); break; | 6506 case 1: is_signed ? load_signed_byte( dst, src) : load_unsigned_byte( dst, src); break; |
6509 case 2: load_unsigned_short( dst, src ); break; | 6507 default: ShouldNotReachHere(); |
6510 case ~1: load_signed_byte( dst, src ); break; | |
6511 case 1: load_unsigned_byte( dst, src ); break; | |
6512 default: ShouldNotReachHere(); | |
6513 } | 6508 } |
6514 } | 6509 } |
6515 | 6510 |
6516 void MacroAssembler::mov32(AddressLiteral dst, Register src) { | 6511 void MacroAssembler::mov32(AddressLiteral dst, Register src) { |
6517 if (reachable(dst)) { | 6512 if (reachable(dst)) { |
7704 // argument list in JVM stack slots. This field is either located directly | 7699 // argument list in JVM stack slots. This field is either located directly |
7705 // in every method handle, or else is indirectly accessed through the | 7700 // in every method handle, or else is indirectly accessed through the |
7706 // method handle's MethodType. This macro hides the distinction. | 7701 // method handle's MethodType. This macro hides the distinction. |
7707 void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg, | 7702 void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg, |
7708 Register temp_reg) { | 7703 Register temp_reg) { |
7704 assert_different_registers(vmslots_reg, mh_reg, temp_reg); | |
7709 if (UseCompressedOops) unimplemented(); // field accesses must decode | 7705 if (UseCompressedOops) unimplemented(); // field accesses must decode |
7710 // load mh.type.form.vmslots | 7706 // load mh.type.form.vmslots |
7711 if (java_dyn_MethodHandle::vmslots_offset_in_bytes() != 0) { | 7707 if (java_dyn_MethodHandle::vmslots_offset_in_bytes() != 0) { |
7712 // hoist vmslots into every mh to avoid dependent load chain | 7708 // hoist vmslots into every mh to avoid dependent load chain |
7713 movl(vmslots_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::vmslots_offset_in_bytes, temp_reg))); | 7709 movl(vmslots_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::vmslots_offset_in_bytes, temp_reg))); |