Wed, 22 Jan 2014 17:42:23 -0800
Merge
never@1445 | 1 | /* |
mikael@6198 | 2 | * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
never@1445 | 3 | * Copyright 2007, 2008, 2009 Red Hat, Inc. |
never@1445 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
never@1445 | 5 | * |
never@1445 | 6 | * This code is free software; you can redistribute it and/or modify it |
never@1445 | 7 | * under the terms of the GNU General Public License version 2 only, as |
never@1445 | 8 | * published by the Free Software Foundation. |
never@1445 | 9 | * |
never@1445 | 10 | * This code is distributed in the hope that it will be useful, but WITHOUT |
never@1445 | 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
never@1445 | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
never@1445 | 13 | * version 2 for more details (a copy is included in the LICENSE file that |
never@1445 | 14 | * accompanied this code). |
never@1445 | 15 | * |
never@1445 | 16 | * You should have received a copy of the GNU General Public License version |
never@1445 | 17 | * 2 along with this work; if not, write to the Free Software Foundation, |
never@1445 | 18 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
never@1445 | 19 | * |
trims@1907 | 20 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 21 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 22 | * questions. |
never@1445 | 23 | * |
never@1445 | 24 | */ |
never@1445 | 25 | |
stefank@2314 | 26 | #include "precompiled.hpp" |
stefank@2314 | 27 | #include "assembler_zero.inline.hpp" |
stefank@2314 | 28 | #include "gc_interface/collectedHeap.inline.hpp" |
stefank@2314 | 29 | #include "interpreter/interpreter.hpp" |
stefank@2314 | 30 | #include "memory/cardTableModRefBS.hpp" |
stefank@2314 | 31 | #include "memory/resourceArea.hpp" |
stefank@2314 | 32 | #include "prims/methodHandles.hpp" |
stefank@2314 | 33 | #include "runtime/biasedLocking.hpp" |
stefank@2314 | 34 | #include "runtime/interfaceSupport.hpp" |
stefank@2314 | 35 | #include "runtime/objectMonitor.hpp" |
stefank@2314 | 36 | #include "runtime/os.hpp" |
stefank@2314 | 37 | #include "runtime/sharedRuntime.hpp" |
stefank@2314 | 38 | #include "runtime/stubRoutines.hpp" |
jprovino@4542 | 39 | #include "utilities/macros.hpp" |
jprovino@4542 | 40 | #if INCLUDE_ALL_GCS |
stefank@2314 | 41 | #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
stefank@2314 | 42 | #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" |
stefank@2314 | 43 | #include "gc_implementation/g1/heapRegion.hpp" |
jprovino@4542 | 44 | #endif // INCLUDE_ALL_GCS |
never@1445 | 45 | |
never@1445 | 46 | int AbstractAssembler::code_fill_byte() { |
never@1445 | 47 | return 0; |
never@1445 | 48 | } |
never@1445 | 49 | |
twisti@4323 | 50 | #ifdef ASSERT |
twisti@4323 | 51 | bool AbstractAssembler::pd_check_instruction_mark() { |
twisti@4323 | 52 | ShouldNotCallThis(); |
twisti@5545 | 53 | return false; |
twisti@4323 | 54 | } |
twisti@4323 | 55 | #endif |
twisti@4323 | 56 | |
never@1445 | 57 | void Assembler::pd_patch_instruction(address branch, address target) { |
never@1445 | 58 | ShouldNotCallThis(); |
never@1445 | 59 | } |
never@1445 | 60 | |
never@1445 | 61 | void MacroAssembler::align(int modulus) { |
never@1445 | 62 | while (offset() % modulus != 0) |
twisti@4366 | 63 | emit_int8(AbstractAssembler::code_fill_byte()); |
never@1445 | 64 | } |
never@1445 | 65 | |
never@1445 | 66 | void MacroAssembler::bang_stack_with_offset(int offset) { |
never@1445 | 67 | ShouldNotCallThis(); |
never@1445 | 68 | } |
never@1445 | 69 | |
never@1445 | 70 | void MacroAssembler::advance(int bytes) { |
bharadwaj@4351 | 71 | code_section()->set_end(code_section()->end() + bytes); |
never@1445 | 72 | } |
never@1445 | 73 | |
never@1445 | 74 | RegisterOrConstant MacroAssembler::delayed_value_impl( |
never@1445 | 75 | intptr_t* delayed_value_addr, Register tmpl, int offset) { |
never@1445 | 76 | ShouldNotCallThis(); |
twisti@5545 | 77 | return RegisterOrConstant(); |
never@1445 | 78 | } |
never@1445 | 79 | |
never@1445 | 80 | void MacroAssembler::store_oop(jobject obj) { |
never@1445 | 81 | code_section()->relocate(pc(), oop_Relocation::spec_for_immediate()); |
never@1445 | 82 | emit_address((address) obj); |
never@1445 | 83 | } |
never@1445 | 84 | |
twisti@4314 | 85 | void MacroAssembler::store_Metadata(Metadata* md) { |
twisti@4314 | 86 | code_section()->relocate(pc(), metadata_Relocation::spec_for_immediate()); |
twisti@4314 | 87 | emit_address((address) md); |
twisti@4314 | 88 | } |
twisti@4314 | 89 | |
never@1445 | 90 | static void should_not_call() { |
never@1445 | 91 | report_should_not_call(__FILE__, __LINE__); |
never@1445 | 92 | } |
never@1445 | 93 | |
never@1445 | 94 | address ShouldNotCallThisStub() { |
never@1445 | 95 | return (address) should_not_call; |
never@1445 | 96 | } |
never@1445 | 97 | |
never@1445 | 98 | address ShouldNotCallThisEntry() { |
never@1445 | 99 | return (address) should_not_call; |
never@1445 | 100 | } |