blob: 609d73b370d03296e325fc8673c230e11703105d [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
17
18/*
19 * Determine the initial instruction set to be used for this trace.
20 * Later components may decide to change this.
21 */
22OatInstructionSetType oatInstructionSet(void)
23{
24 return DALVIK_OAT_THUMB2;
25}
26
27/* Architecture-specific initializations and checks go here */
28bool oatArchVariantInit(void)
29{
30 return true;
31}
32
33int oatTargetOptHint(int key)
34{
35 int res = 0;
36 switch (key) {
37 case kMaxHoistDistance:
38 res = 7;
39 break;
40 default:
41 LOG(FATAL) << "Unknown target optimization hint key: " << key;
42 }
43 return res;
44}
45
46void oatGenMemBarrier(CompilationUnit* cUnit, int barrierKind)
47{
48#if ANDROID_SMP != 0
49 ArmLIR* dmb = newLIR1(cUnit, kThumb2Dmb, barrierKind);
50 dmb->defMask = ENCODE_ALL;
51#endif
52}