OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 __ mov(r0, Operand(0)); // Success. | 215 __ mov(r0, Operand(0)); // Success. |
216 __ bind(&exit); | 216 __ bind(&exit); |
217 __ add(sp, sp, Operand(1 * kPointerSize)); | 217 __ add(sp, sp, Operand(1 * kPointerSize)); |
218 __ bx(lr); | 218 __ bx(lr); |
219 | 219 |
220 CodeDesc desc; | 220 CodeDesc desc; |
221 masm->GetCode(&desc); | 221 masm->GetCode(&desc); |
222 // Call the function from C++. | 222 // Call the function from C++. |
223 | 223 |
224 F0 f = FUNCTION_CAST<F0>(buffer); | 224 F0 f = FUNCTION_CAST<F0>(buffer); |
225 int32_t result = Simulator::current(Isolate::Current())->Call( | 225 intptr_t result = reinterpret_cast<intptr_t>( |
226 FUNCTION_ADDR(f), 4, 0, 0, 0, 0); | 226 CALL_GENERATED_CODE(FUNCTION_ADDR(f), 4, 0, 0, 0, 0)); |
| 227 |
227 CHECK_EQ(0, result); | 228 CHECK_EQ(0, result); |
228 } | 229 } |
229 | 230 |
230 #undef __ | 231 #undef __ |
OLD | NEW |