# Copyright (C) 2009 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.

#
# Configuration for ARMv7-A targets.
#
# This target includes Thumb-2 and Thumb2-EE support, as well as VFPLite.
#
# The difference in performance between this and ARMv5TE appears to be
# negligible on a Cortex-A8 CPU, so this is really just an experiment.
#

handler-size 64

# source for the instruction table stub
asm-stub armv5te/stub.S

# file header and basic definitions
import c/header.c
import armv5te/header.S

# C pre-processor defines for stub C instructions
import cstubs/stubdefs.c

# highly-platform-specific defs
import armv5te/platform.S

# common defs for the C helpers; include this before the instruction handlers
import c/opcommon.c

# arch-specific entry point to interpreter
import armv5te/entry.S

# opcode list; argument to op-start is default directory
op-start armv5te
    # handlers that take advantage of >= ARMv6T2 instructions
    op OP_ADD_DOUBLE_2ADDR armv6t2
    op OP_ADD_FLOAT_2ADDR armv6t2
    op OP_ADD_INT_2ADDR armv6t2
    op OP_ADD_INT_LIT16 armv6t2
    op OP_ADD_LONG_2ADDR armv6t2
    op OP_AND_INT_2ADDR armv6t2
    op OP_AND_INT_LIT16 armv6t2
    op OP_AND_LONG_2ADDR armv6t2
    op OP_ARRAY_LENGTH armv6t2
    op OP_CONST_4 armv6t2
    op OP_DIV_DOUBLE_2ADDR armv6t2
    op OP_DIV_FLOAT_2ADDR armv6t2
    op OP_DIV_INT_2ADDR armv6t2
    op OP_DIV_INT_LIT16 armv6t2
    op OP_DIV_LONG_2ADDR armv6t2
    op OP_DOUBLE_TO_FLOAT armv6t2
    op OP_DOUBLE_TO_INT armv6t2
    op OP_DOUBLE_TO_LONG armv6t2
    op OP_FLOAT_TO_DOUBLE armv6t2
    op OP_FLOAT_TO_INT armv6t2
    op OP_FLOAT_TO_LONG armv6t2
    op OP_IF_EQ armv6t2
    op OP_IF_GE armv6t2
    op OP_IF_GT armv6t2
    op OP_IF_LE armv6t2
    op OP_IF_LT armv6t2
    op OP_IF_NE armv6t2
    op OP_IGET armv6t2
    op OP_IGET_QUICK armv6t2
    op OP_IGET_WIDE armv6t2
    op OP_IGET_WIDE_QUICK armv6t2
    op OP_INT_TO_BYTE armv6t2
    op OP_INT_TO_CHAR armv6t2
    op OP_INT_TO_DOUBLE armv6t2
    op OP_INT_TO_FLOAT armv6t2
    op OP_INT_TO_LONG armv6t2
    op OP_INT_TO_SHORT armv6t2
    op OP_IPUT armv6t2
    op OP_IPUT_QUICK armv6t2
    op OP_IPUT_WIDE armv6t2
    op OP_IPUT_WIDE_QUICK armv6t2
    op OP_LONG_TO_DOUBLE armv6t2
    op OP_LONG_TO_FLOAT armv6t2
    op OP_MOVE armv6t2
    op OP_MOVE_WIDE armv6t2
    op OP_MUL_DOUBLE_2ADDR armv6t2
    op OP_MUL_FLOAT_2ADDR armv6t2
    op OP_MUL_INT_2ADDR armv6t2
    op OP_MUL_INT_LIT16 armv6t2
    op OP_MUL_LONG_2ADDR armv6t2
    op OP_NEG_DOUBLE armv6t2
    op OP_NEG_FLOAT armv6t2
    op OP_NEG_INT armv6t2
    op OP_NEG_LONG armv6t2
    op OP_NOT_INT armv6t2
    op OP_NOT_LONG armv6t2
    op OP_OR_INT_2ADDR armv6t2
    op OP_OR_INT_LIT16 armv6t2
    op OP_OR_LONG_2ADDR armv6t2
    op OP_REM_DOUBLE_2ADDR armv6t2
    op OP_REM_FLOAT_2ADDR armv6t2
    op OP_REM_INT_2ADDR armv6t2
    op OP_REM_INT_LIT16 armv6t2
    op OP_REM_LONG_2ADDR armv6t2
    op OP_RSUB_INT armv6t2
    op OP_SHL_INT_2ADDR armv6t2
    op OP_SHL_LONG_2ADDR armv6t2
    op OP_SHR_INT_2ADDR armv6t2
    op OP_SHR_LONG_2ADDR armv6t2
    op OP_SUB_DOUBLE_2ADDR armv6t2
    op OP_SUB_FLOAT_2ADDR armv6t2
    op OP_SUB_INT_2ADDR armv6t2
    op OP_SUB_LONG_2ADDR armv6t2
    op OP_USHR_INT_2ADDR armv6t2
    op OP_USHR_LONG_2ADDR armv6t2
    op OP_XOR_INT_2ADDR armv6t2
    op OP_XOR_INT_LIT16 armv6t2
    op OP_XOR_LONG_2ADDR armv6t2

    # floating point handlers that use VFP
    # these override the handlers specified earlier
    op OP_ADD_DOUBLE arm-vfp
    op OP_ADD_DOUBLE_2ADDR arm-vfp
    op OP_ADD_FLOAT arm-vfp
    op OP_ADD_FLOAT_2ADDR arm-vfp
    op OP_CMPG_DOUBLE arm-vfp
    op OP_CMPG_FLOAT arm-vfp
    op OP_CMPL_DOUBLE arm-vfp
    op OP_CMPL_FLOAT arm-vfp
    op OP_DIV_DOUBLE arm-vfp
    op OP_DIV_DOUBLE_2ADDR arm-vfp
    op OP_DIV_FLOAT arm-vfp
    op OP_DIV_FLOAT_2ADDR arm-vfp
    op OP_DOUBLE_TO_FLOAT arm-vfp
    op OP_DOUBLE_TO_INT arm-vfp
    op OP_FLOAT_TO_DOUBLE arm-vfp
    op OP_FLOAT_TO_INT arm-vfp
    op OP_INT_TO_DOUBLE arm-vfp
    op OP_INT_TO_FLOAT arm-vfp
    op OP_MUL_DOUBLE arm-vfp
    op OP_MUL_DOUBLE_2ADDR arm-vfp
    op OP_MUL_FLOAT arm-vfp
    op OP_MUL_FLOAT_2ADDR arm-vfp
    op OP_SUB_DOUBLE arm-vfp
    op OP_SUB_DOUBLE_2ADDR arm-vfp
    op OP_SUB_FLOAT arm-vfp
    op OP_SUB_FLOAT_2ADDR arm-vfp
op-end

# "helper" code for C; include if you use any of the C stubs (this generates
# object code, so it's normally excluded)
##import c/gotoTargets.c

# end of defs; include this when cstubs/stubdefs.c is included
import cstubs/enddefs.c

# common subroutines for asm
import armv5te/footer.S
import armv5te/debug.c