From e3acd07f28d5625062b599c2817cb5f7a53f54a9 Mon Sep 17 00:00:00 2001 From: buzbee Date: Sat, 25 Feb 2012 17:03:10 -0800 Subject: Multi-target support This CL represents a step towards splitting out the target dependent and target independent portions of the compiler, and also adds in the beginning of a MIPS compiler based on the MIPS AOSP Jit submission. More polish is clearly needed, but the split is here probably pretty close. The MIPS code will not compile at this point (and there is no makefile target at present), but it's pretty close. There should be no changes in functionality of the Arm compiler in this CL - just moved stuff around. Change-Id: Ia66b2847e22644a1ec63e66bf5f2fee722f963d4 --- src/compiler/codegen/mips/Codegen.h | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/compiler/codegen/mips/Codegen.h (limited to 'src/compiler/codegen/mips/Codegen.h') diff --git a/src/compiler/codegen/mips/Codegen.h b/src/compiler/codegen/mips/Codegen.h new file mode 100644 index 0000000000..b350dae035 --- /dev/null +++ b/src/compiler/codegen/mips/Codegen.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file contains register alloction support and is intended to be + * included by: + * + * Codegen-$(TARGET_ARCH_VARIANT).c + * + */ + +#include "../../CompilerIR.h" + +namespace art { + +#if defined(_CODEGEN_C) +/* + * loadConstant() sometimes needs to add a small imm to a pre-existing constant + */ +STATIC MipsLIR *opRegImm(CompilationUnit* cUnit, OpKind op, int rDestSrc1, + int value); +STATIC MipsLIR *opRegReg(CompilationUnit* cUnit, OpKind op, int rDestSrc1, + int rSrc2); + +/* Forward decalraton the portable versions due to circular dependency */ +STATIC bool genArithOpFloatPortable(CompilationUnit* cUnit, MIR* mir, + RegLocation rlDest, RegLocation rlSrc1, + RegLocation rlSrc2); + +STATIC bool genArithOpDoublePortable(CompilationUnit* cUnit, MIR* mir, + RegLocation rlDest, RegLocation rlSrc1, + RegLocation rlSrc2); + +STATIC bool genConversionPortable(CompilationUnit* cUnit, MIR* mir); + +#endif + +extern void oatSetupResourceMasks(MipsLIR* lir); + +extern MipsLIR* oatRegCopyNoInsert(CompilationUnit* cUnit, int rDest, + int rSrc); + +} // namespace art -- cgit v1.2.3-59-g8ed1b