blob: eafe5edb2cec73e76637c966fcf3f8c397ea589b [file] [log] [blame]
buzbee67bf8852011-08-17 17:51:35 -07001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Elliott Hughes11d1b0c2012-01-23 16:57:47 -080017namespace art {
18
buzbee67bf8852011-08-17 17:51:35 -070019/*
20 * Determine the initial instruction set to be used for this trace.
21 * Later components may decide to change this.
22 */
23OatInstructionSetType oatInstructionSet(void)
24{
25 return DALVIK_OAT_THUMB2;
26}
27
28/* Architecture-specific initializations and checks go here */
29bool oatArchVariantInit(void)
30{
31 return true;
32}
33
34int oatTargetOptHint(int key)
35{
36 int res = 0;
37 switch (key) {
38 case kMaxHoistDistance:
39 res = 7;
40 break;
41 default:
42 LOG(FATAL) << "Unknown target optimization hint key: " << key;
43 }
44 return res;
45}
46
47void oatGenMemBarrier(CompilationUnit* cUnit, int barrierKind)
48{
49#if ANDROID_SMP != 0
50 ArmLIR* dmb = newLIR1(cUnit, kThumb2Dmb, barrierKind);
51 dmb->defMask = ENCODE_ALL;
52#endif
53}
Elliott Hughes11d1b0c2012-01-23 16:57:47 -080054
55} // namespace art