blob: 8d65aaaacfd9dc20b105176ac2ade0d7b681728f [file] [log] [blame]
buzbee54330722011-08-23 16:46:55 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
3#ifndef ART_SRC_RUNTIME_SUPPORT_H_
4#define ART_SRC_RUNTIME_SUPPORT_H_
5
6#if defined(__arm__)
buzbee7b1b86d2011-08-26 18:59:10 -07007 /* Compiler helpers */
buzbee54330722011-08-23 16:46:55 -07008 extern "C" uint64_t art_shl_long(uint64_t, uint32_t);
9 extern "C" uint64_t art_shr_long(uint64_t, uint32_t);
10 extern "C" uint64_t art_ushr_long(uint64_t, uint32_t);
buzbee7b1b86d2011-08-26 18:59:10 -070011
12 /* Conversions */
13 extern "C" float __aeabi_i2f(int op1); // OP_INT_TO_FLOAT
14 extern "C" int __aeabi_f2iz(float op1); // OP_FLOAT_TO_INT
15 extern "C" float __aeabi_d2f(double op1); // OP_DOUBLE_TO_FLOAT
16 extern "C" double __aeabi_f2d(float op1); // OP_FLOAT_TO_DOUBLE
17 extern "C" double __aeabi_i2d(int op1); // OP_INT_TO_DOUBLE
18 extern "C" int __aeabi_d2iz(double op1); // OP_DOUBLE_TO_INT
19 extern "C" float __aeabi_l2f(long op1); // OP_LONG_TO_FLOAT
20 extern "C" double __aeabi_l2d(long op1); // OP_LONG_TO_DOUBLE
21
22 /* Single-precision FP arithmetics */
23 extern "C" float __aeabi_fadd(float a, float b); // OP_ADD_FLOAT[_2ADDR]
24 extern "C" float __aeabi_fsub(float a, float b); // OP_SUB_FLOAT[_2ADDR]
25 extern "C" float __aeabi_fdiv(float a, float b); // OP_DIV_FLOAT[_2ADDR]
26 extern "C" float __aeabi_fmul(float a, float b); // OP_MUL_FLOAT[_2ADDR]
27 extern "C" float fmodf(float a, float b); // OP_REM_FLOAT[_2ADDR]
28
29 /* Double-precision FP arithmetics */
30 extern "C" double __aeabi_dadd(double a, double b); // OP_ADD_DOUBLE[_2ADDR]
31 extern "C" double __aeabi_dsub(double a, double b); // OP_SUB_DOUBLE[_2ADDR]
32 extern "C" double __aeabi_ddiv(double a, double b); // OP_DIV_DOUBLE[_2ADDR]
33 extern "C" double __aeabi_dmul(double a, double b); // OP_MUL_DOUBLE[_2ADDR]
34 extern "C" double fmod(double a, double b); // OP_REM_DOUBLE[_2ADDR]
35
36 /* Integer arithmetics */
37 extern "C" int __aeabi_idivmod(int op1, int op2); // OP_REM_INT[_2ADDR|_LIT8|_LIT16]
38 extern "C" int __aeabi_idiv(int op1, int op2); // OP_DIV_INT[_2ADDR|_LIT8|_LIT16]
39
40/* Long long arithmetics - OP_REM_LONG[_2ADDR] & OP_DIV_LONG[_2ADDR] */
41extern "C" long long __aeabi_ldivmod(long long op1, long long op2);
buzbee439c4fa2011-08-27 15:59:07 -070042extern "C" long long __aeabi_lmul(long long op1, long long op2);
buzbee7b1b86d2011-08-26 18:59:10 -070043
buzbee54330722011-08-23 16:46:55 -070044#endif
45
buzbee1b4c8592011-08-31 10:43:51 -070046namespace art {
47 int64_t D2L(double);
48 int64_t F2L(float);
49 void HandleFillArrayDataFromCode(art::Array*, const uint16_t*);
50}
buzbeee6d61962011-08-27 11:58:19 -070051
buzbee54330722011-08-23 16:46:55 -070052#endif // ART_SRC_RUNTIME_SUPPORT_H_