1 /* |
1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "asm/macroAssembler.hpp" |
26 #include "asm/macroAssembler.hpp" |
27 #include "interpreter/interpreter.hpp" |
27 #include "interpreter/interpreter.hpp" |
28 #include "interpreter/interpreterGenerator.hpp" |
|
29 #include "interpreter/interpreterRuntime.hpp" |
28 #include "interpreter/interpreterRuntime.hpp" |
30 #include "interpreter/interp_masm.hpp" |
29 #include "interpreter/interp_masm.hpp" |
|
30 #include "interpreter/templateInterpreterGenerator.hpp" |
31 |
31 |
32 #define __ _masm-> |
32 #define __ _masm-> |
33 |
33 |
34 // Abstract method entry |
34 // Abstract method entry |
35 // Attempt to execute abstract method. Throw exception |
35 // Attempt to execute abstract method. Throw exception |
36 address InterpreterGenerator::generate_abstract_entry(void) { |
36 address TemplateInterpreterGenerator::generate_abstract_entry(void) { |
37 |
37 |
38 address entry_point = __ pc(); |
38 address entry_point = __ pc(); |
39 |
39 |
40 // abstract method entry |
40 // abstract method entry |
41 |
41 |
42 #ifndef CC_INTERP |
|
43 // pop return address, reset last_sp to NULL |
42 // pop return address, reset last_sp to NULL |
44 __ empty_expression_stack(); |
43 __ empty_expression_stack(); |
45 __ restore_bcp(); // rsi must be correct for exception handler (was destroyed) |
44 __ restore_bcp(); // rsi must be correct for exception handler (was destroyed) |
46 __ restore_locals(); // make sure locals pointer is correct as well (was destroyed) |
45 __ restore_locals(); // make sure locals pointer is correct as well (was destroyed) |
47 #endif |
|
48 |
46 |
49 // throw exception |
47 // throw exception |
50 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError)); |
48 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError)); |
51 // the call_VM checks for exception, so we should never return here. |
49 // the call_VM checks for exception, so we should never return here. |
52 __ should_not_reach_here(); |
50 __ should_not_reach_here(); |