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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_library_call.cpp.incl" 27 28 class LibraryIntrinsic : public InlineCallGenerator { 29 // Extend the set of intrinsics known to the runtime: 30 public: 31 private: 32 bool _is_virtual; 33 vmIntrinsics::ID _intrinsic_id; 34 35 public: 36 LibraryIntrinsic(ciMethod* m, bool is_virtual, vmIntrinsics::ID id) 37 : InlineCallGenerator(m), 38 _is_virtual(is_virtual), 39 _intrinsic_id(id) 40 { 41 } 42 virtual bool is_intrinsic() const { return true; } 43 virtual bool is_virtual() const { return _is_virtual; } 44 virtual JVMState* generate(JVMState* jvms); 45 vmIntrinsics::ID intrinsic_id() const { return _intrinsic_id; } 46 }; | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "classfile/systemDictionary.hpp" 27 #include "classfile/vmSymbols.hpp" 28 #include "compiler/compileLog.hpp" 29 #include "oops/objArrayKlass.hpp" 30 #include "opto/addnode.hpp" 31 #include "opto/callGenerator.hpp" 32 #include "opto/cfgnode.hpp" 33 #include "opto/idealKit.hpp" 34 #include "opto/mulnode.hpp" 35 #include "opto/parse.hpp" 36 #include "opto/runtime.hpp" 37 #include "opto/subnode.hpp" 38 #include "prims/nativeLookup.hpp" 39 #include "runtime/sharedRuntime.hpp" 40 41 class LibraryIntrinsic : public InlineCallGenerator { 42 // Extend the set of intrinsics known to the runtime: 43 public: 44 private: 45 bool _is_virtual; 46 vmIntrinsics::ID _intrinsic_id; 47 48 public: 49 LibraryIntrinsic(ciMethod* m, bool is_virtual, vmIntrinsics::ID id) 50 : InlineCallGenerator(m), 51 _is_virtual(is_virtual), 52 _intrinsic_id(id) 53 { 54 } 55 virtual bool is_intrinsic() const { return true; } 56 virtual bool is_virtual() const { return _is_virtual; } 57 virtual JVMState* generate(JVMState* jvms); 58 vmIntrinsics::ID intrinsic_id() const { return _intrinsic_id; } 59 }; |