/*
   Copyright (C) 2009-2013, 2018-2021,2023 Free Software Foundation, Inc.
   Written by Roger While, Ron Norman, Simon Sobisch, Edward Hart

   This file is part of GnuCOBOL.

   The GnuCOBOL compiler is free software: you can redistribute it
   and/or modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation, either version 3 of the
   License, or (at your option) any later version.

   GnuCOBOL is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GnuCOBOL.  If not, see <https://www.gnu.org/licenses/>.
*/

/* Optimization enumeration definitions */

CB_OPTIM_DEF (COB_SET_SCREEN)
CB_OPTIM_DEF (COB_SET_REPORT)
CB_OPTIM_DEF (COB_SET_ML_TREE)

CB_OPTIM_DEF (COB_CHK_LINKAGE)
CB_OPTIM_DEF (COB_CHK_BASED)
CB_OPTIM_DEF (COB_CHK_SUBSCRIPT)
CB_OPTIM_DEF (COB_CHK_ODO)
CB_OPTIM_DEF (COB_CHK_REFMOD_MIN)
CB_OPTIM_DEF (COB_CHK_REFMOD)
CB_OPTIM_DEF (COB_CHK_MEMORYFENCE)
CB_OPTIM_DEF (COB_NOP)

CB_OPTIM_DEF (COB_POINTER_MANIP)
CB_OPTIM_DEF (COB_GET_NUMDISP)
CB_OPTIM_DEF (COB_GET_NUMDISPS)
#if 0	/* libcob's optimized version is not slower, so drop that */
CB_OPTIM_DEF (COB_CMP_PACKED_INT)
CB_OPTIM_DEF (COB_GET_PACKED_INT)
CB_OPTIM_DEF (COB_GET_PACKED_INT64)
#endif

/* note: the additions are also used for substract by wrapping
         the second part in -(x) */
CB_OPTIM_DEF (COB_ADD_PACKED_INT)
CB_OPTIM_DEF (COB_ADD_PACKED_INT64)

CB_OPTIM_DEF (COB_CMP_ALIGN_U16)
CB_OPTIM_DEF (COB_CMP_ALIGN_S16)
CB_OPTIM_DEF (COB_CMP_ALIGN_U32)
CB_OPTIM_DEF (COB_CMP_ALIGN_S32)
CB_OPTIM_DEF (COB_CMP_ALIGN_U64)
CB_OPTIM_DEF (COB_CMP_ALIGN_S64)

CB_OPTIM_DEF (COB_ADD_ALIGN_U16)
CB_OPTIM_DEF (COB_ADD_ALIGN_S16)
CB_OPTIM_DEF (COB_ADD_ALIGN_U32)
CB_OPTIM_DEF (COB_ADD_ALIGN_S32)
CB_OPTIM_DEF (COB_ADD_ALIGN_U64)
CB_OPTIM_DEF (COB_ADD_ALIGN_S64)

CB_OPTIM_DEF (COB_SUB_ALIGN_U16)
CB_OPTIM_DEF (COB_SUB_ALIGN_S16)
CB_OPTIM_DEF (COB_SUB_ALIGN_U32)
CB_OPTIM_DEF (COB_SUB_ALIGN_S32)
CB_OPTIM_DEF (COB_SUB_ALIGN_U64)
CB_OPTIM_DEF (COB_SUB_ALIGN_S64)

CB_OPTIM_DEF (COB_CMPSWP_ALIGN_U16)
CB_OPTIM_DEF (COB_CMPSWP_ALIGN_S16)
CB_OPTIM_DEF (COB_CMPSWP_ALIGN_U32)
CB_OPTIM_DEF (COB_CMPSWP_ALIGN_S32)
CB_OPTIM_DEF (COB_CMPSWP_ALIGN_U64)
CB_OPTIM_DEF (COB_CMPSWP_ALIGN_S64)

CB_OPTIM_DEF (COB_CMP_U8)
CB_OPTIM_DEF (COB_CMP_S8)
CB_OPTIM_DEF (COB_CMP_U16)
CB_OPTIM_DEF (COB_CMP_S16)
CB_OPTIM_DEF (COB_CMP_U24)
CB_OPTIM_DEF (COB_CMP_S24)
CB_OPTIM_DEF (COB_CMP_U32)
CB_OPTIM_DEF (COB_CMP_S32)
CB_OPTIM_DEF (COB_CMP_U40)
CB_OPTIM_DEF (COB_CMP_S40)
CB_OPTIM_DEF (COB_CMP_U48)
CB_OPTIM_DEF (COB_CMP_S48)
CB_OPTIM_DEF (COB_CMP_U56)
CB_OPTIM_DEF (COB_CMP_S56)
CB_OPTIM_DEF (COB_CMP_U64)
CB_OPTIM_DEF (COB_CMP_S64)

CB_OPTIM_DEF (COB_ADD_U8)
CB_OPTIM_DEF (COB_ADD_S8)
CB_OPTIM_DEF (COB_ADD_U16)
CB_OPTIM_DEF (COB_ADD_S16)
CB_OPTIM_DEF (COB_ADD_U24)
CB_OPTIM_DEF (COB_ADD_S24)
CB_OPTIM_DEF (COB_ADD_U32)
CB_OPTIM_DEF (COB_ADD_S32)
CB_OPTIM_DEF (COB_ADD_U40)
CB_OPTIM_DEF (COB_ADD_S40)
CB_OPTIM_DEF (COB_ADD_U48)
CB_OPTIM_DEF (COB_ADD_S48)
CB_OPTIM_DEF (COB_ADD_U56)
CB_OPTIM_DEF (COB_ADD_S56)
CB_OPTIM_DEF (COB_ADD_U64)
CB_OPTIM_DEF (COB_ADD_S64)

CB_OPTIM_DEF (COB_SUB_U8)
CB_OPTIM_DEF (COB_SUB_S8)
CB_OPTIM_DEF (COB_SUB_U16)
CB_OPTIM_DEF (COB_SUB_S16)
CB_OPTIM_DEF (COB_SUB_U24)
CB_OPTIM_DEF (COB_SUB_S24)
CB_OPTIM_DEF (COB_SUB_U32)
CB_OPTIM_DEF (COB_SUB_S32)
CB_OPTIM_DEF (COB_SUB_U40)
CB_OPTIM_DEF (COB_SUB_S40)
CB_OPTIM_DEF (COB_SUB_U48)
CB_OPTIM_DEF (COB_SUB_S48)
CB_OPTIM_DEF (COB_SUB_U56)
CB_OPTIM_DEF (COB_SUB_S56)
CB_OPTIM_DEF (COB_SUB_U64)
CB_OPTIM_DEF (COB_SUB_S64)

CB_OPTIM_DEF (COB_CMPSWP_U16)
CB_OPTIM_DEF (COB_CMPSWP_S16)
CB_OPTIM_DEF (COB_CMPSWP_U24)
CB_OPTIM_DEF (COB_CMPSWP_S24)
CB_OPTIM_DEF (COB_CMPSWP_U32)
CB_OPTIM_DEF (COB_CMPSWP_S32)
CB_OPTIM_DEF (COB_CMPSWP_U40)
CB_OPTIM_DEF (COB_CMPSWP_S40)
CB_OPTIM_DEF (COB_CMPSWP_U48)
CB_OPTIM_DEF (COB_CMPSWP_S48)
CB_OPTIM_DEF (COB_CMPSWP_U56)
CB_OPTIM_DEF (COB_CMPSWP_S56)
CB_OPTIM_DEF (COB_CMPSWP_U64)
CB_OPTIM_DEF (COB_CMPSWP_S64)

CB_OPTIM_DEF (COB_ADDSWP_U16)
CB_OPTIM_DEF (COB_ADDSWP_S16)
CB_OPTIM_DEF (COB_ADDSWP_U24)
CB_OPTIM_DEF (COB_ADDSWP_S24)
CB_OPTIM_DEF (COB_ADDSWP_U32)
CB_OPTIM_DEF (COB_ADDSWP_S32)
CB_OPTIM_DEF (COB_ADDSWP_U40)
CB_OPTIM_DEF (COB_ADDSWP_S40)
CB_OPTIM_DEF (COB_ADDSWP_U48)
CB_OPTIM_DEF (COB_ADDSWP_S48)
CB_OPTIM_DEF (COB_ADDSWP_U56)
CB_OPTIM_DEF (COB_ADDSWP_S56)
CB_OPTIM_DEF (COB_ADDSWP_U64)
CB_OPTIM_DEF (COB_ADDSWP_S64)

CB_OPTIM_DEF (COB_SUBSWP_U16)
CB_OPTIM_DEF (COB_SUBSWP_S16)
CB_OPTIM_DEF (COB_SUBSWP_U24)
CB_OPTIM_DEF (COB_SUBSWP_S24)
CB_OPTIM_DEF (COB_SUBSWP_U32)
CB_OPTIM_DEF (COB_SUBSWP_S32)
CB_OPTIM_DEF (COB_SUBSWP_U40)
CB_OPTIM_DEF (COB_SUBSWP_S40)
CB_OPTIM_DEF (COB_SUBSWP_U48)
CB_OPTIM_DEF (COB_SUBSWP_S48)
CB_OPTIM_DEF (COB_SUBSWP_U56)
CB_OPTIM_DEF (COB_SUBSWP_S56)
CB_OPTIM_DEF (COB_SUBSWP_U64)
CB_OPTIM_DEF (COB_SUBSWP_S64)

CB_OPTIM_DEF (COB_SETSWP_U16)
CB_OPTIM_DEF (COB_SETSWP_S16)
CB_OPTIM_DEF (COB_SETSWP_U24)
CB_OPTIM_DEF (COB_SETSWP_S24)
CB_OPTIM_DEF (COB_SETSWP_U32)
CB_OPTIM_DEF (COB_SETSWP_S32)
CB_OPTIM_DEF (COB_SETSWP_U40)
CB_OPTIM_DEF (COB_SETSWP_S40)
CB_OPTIM_DEF (COB_SETSWP_U48)
CB_OPTIM_DEF (COB_SETSWP_S48)
CB_OPTIM_DEF (COB_SETSWP_U56)
CB_OPTIM_DEF (COB_SETSWP_S56)
CB_OPTIM_DEF (COB_SETSWP_U64)
CB_OPTIM_DEF (COB_SETSWP_S64)
