annotate src/os_cpu/windows_x86/vm/assembler_windows_x86_64.cpp @ 196:d1605aabd0a1

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents 7793bd37a336
children 1fdb98a17101
rev   line source
duke@0 1 /*
xdono@196 2 * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
duke@0 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 20 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 21 * have any questions.
duke@0 22 *
duke@0 23 */
duke@0 24
duke@0 25 #include "incls/_precompiled.incl"
duke@0 26 #include "incls/_assembler_windows_x86_64.cpp.incl"
duke@0 27
duke@0 28
duke@0 29 void MacroAssembler::int3() {
duke@0 30 emit_byte(0xCC);
duke@0 31 }
duke@0 32
duke@0 33 // call (Thread*)TlsGetValue(thread_index());
duke@0 34 void MacroAssembler::get_thread(Register thread) {
duke@0 35 if (thread != rax) {
duke@0 36 pushq(rax);
duke@0 37 }
duke@0 38 pushq(rdi);
duke@0 39 pushq(rsi);
duke@0 40 pushq(rdx);
duke@0 41 pushq(rcx);
duke@0 42 pushq(r8);
duke@0 43 pushq(r9);
duke@0 44 pushq(r10);
duke@0 45 // XXX
duke@0 46 movq(r10, rsp);
duke@0 47 andq(rsp, -16);
duke@0 48 pushq(r10);
duke@0 49 pushq(r11);
duke@0 50
duke@0 51 movl(c_rarg0, ThreadLocalStorage::thread_index());
duke@0 52 call(RuntimeAddress((address)TlsGetValue));
duke@0 53
duke@0 54 popq(r11);
duke@0 55 popq(rsp);
duke@0 56 popq(r10);
duke@0 57 popq(r9);
duke@0 58 popq(r8);
duke@0 59 popq(rcx);
duke@0 60 popq(rdx);
duke@0 61 popq(rsi);
duke@0 62 popq(rdi);
duke@0 63 if (thread != rax) {
duke@0 64 movq(thread, rax);
duke@0 65 popq(rax);
duke@0 66 }
duke@0 67 }
duke@0 68
kvn@168 69 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
kvn@168 70 // Exception handler checks the nmethod's implicit null checks table
kvn@168 71 // only when this method returns false.
kvn@168 72 if (UseCompressedOops) {
kvn@168 73 // The first page after heap_base is unmapped and
kvn@168 74 // the 'offset' is equal to [heap_base + offset] for
kvn@168 75 // narrow oop implicit null checks.
kvn@168 76 uintptr_t heap_base = (uintptr_t)Universe::heap_base();
kvn@168 77 if ((uintptr_t)offset >= heap_base) {
kvn@168 78 // Normalize offset for the next check.
kvn@168 79 offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1));
kvn@168 80 }
kvn@168 81 }
kvn@168 82 return offset < 0 || os::vm_page_size() <= offset;
duke@0 83 }