1879N/A * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Inline interpreter functions for sparc 0N/A // x86 can do unaligned copies but not 64bits at a time 0N/A// The long operations depend on compiler support for "long long" on x86 0N/A // QQQ what about check and throw... 0N/A // CVM did this 0x3f mask, is the really needed??? QQQ 0N/A return ((
unsigned long long)
op1) >> (
op2 &
0x3F);
0N/A // Divide by zero... QQQ 0N/A// Double Conversions 0N/A// Integer Arithmetic 0N/A /* it's possible we could catch this special case implicitly */ 0N/A /* it's possible we could catch this special case implicitly */ 0N/A if (
op1 ==
0x80000000 &&
op2 == -
1)
return 0;
0N/A// The implementations are platform dependent. We have to worry about alignment 0N/A// issues on some machines which can change on the same platform depending on 0N/A// whether it is an LP64 machine also. 0N/A// We know that on LP32 mode that longs/doubles are the only thing that gives 0N/A// us alignment headaches. We also know that the worst we have is 32bit alignment 0N/A// so thing are not really too bad. 0N/A// (Also sparcworks compiler does the right thing for free if we don't use -arch.. 0N/A// switches. Only gcc gives us a hard time. In LP64 mode I think we have no issue 0N/A#
endif /* _GNU_SOURCE */ 0N/A#
endif /* ALIGN_CONVERTER */ 1879N/A#
endif // CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_INLINE_HPP