blob: dcf3a995f3990ebd21fd36d54e92319f4d15f48f [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 {
buzbee67bf8852011-08-17 17:51:35 -070018
19/*
20 * Determine the initial instruction set to be used for this trace.
21 * Later components may decide to change this.
22 */
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080023InstructionSet oatInstructionSet()
buzbee67bf8852011-08-17 17:51:35 -070024{
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080025 return kThumb2;
buzbee67bf8852011-08-17 17:51:35 -070026}
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
buzbee31a4a6f2012-02-28 15:36:15 -080050 LIR* dmb = newLIR1(cUnit, kThumb2Dmb, barrierKind);
buzbee67bf8852011-08-17 17:51:35 -070051 dmb->defMask = ENCODE_ALL;
52#endif
53}
Elliott Hughes11d1b0c2012-01-23 16:57:47 -080054
55} // namespace art