/* * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
frame os::current_frame() { // The only thing that calls this is the stack printing code in // VMError::report: // - Step 110 (printing stack bounds) uses the sp in the frame // to determine the amount of free space on the stack. We // set the sp to a close approximation of the real value in // order to allow this step to complete. // - Step 120 (printing native stack) tries to walk the stack. // The frame we create has a NULL pc, which is ignored as an // invalid frame.
frame dummy = frame();
dummy.set_sp((intptr_t *) current_stack_pointer()); return dummy;
}
char* os::non_memory_address_word() { // Must never look like an address returned by reserve_memory, // even in its subfields (as defined by the CPU immediate fields, // if the CPU splits constants across multiple instructions). // This is the value for x86; works pretty well for PPC too. return (char *) -1;
}
// jni_fast_Get<Primitive>Field can trap at certain pc's if a GC // kicks in and the heap gets shrunk before the field access. /*if (sig == SIGSEGV || sig == SIGBUS) { address addr = JNI_FastGetField::find_slowcase_pc(pc); if (addr != (address)-1) { stub = addr; }
}*/
}
returnfalse;
}
void os::Bsd::init_thread_fpu_state(void) { // Nothing to do
}
///////////////////////////////////////////////////////////////////////////// // Stubs for things that would be in bsd_zero.s if it existed. // You probably want to disassemble these monkeys to check they're ok.
extern"C" { int SpinPause() { return 1;
}
void _Copy_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) { if (from > to) { const jshort *end = from + count; while (from < end)
*(to++) = *(from++);
} elseif (from < to) { const jshort *end = from;
from += count - 1;
to += count - 1; while (from >= end)
*(to--) = *(from--);
}
} void _Copy_conjoint_jints_atomic(const jint* from, jint* to, size_t count) { if (from > to) { const jint *end = from + count; while (from < end)
*(to++) = *(from++);
} elseif (from < to) { const jint *end = from;
from += count - 1;
to += count - 1; while (from >= end)
*(to--) = *(from--);
}
} void _Copy_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) { if (from > to) { const jlong *end = from + count; while (from < end)
atomic_copy64(from++, to++);
} elseif (from < to) { const jlong *end = from;
from += count - 1;
to += count - 1; while (from >= end)
atomic_copy64(from--, to--);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.