1
/* IBM_PROLOG_BEGIN_TAG */
2
/* This is an automatically generated prolog. */
4
/* $Source: src/usr/hwpf/hwp/include/fapi_sbe_common.H $ */
6
/* OpenPOWER HostBoot Project */
8
/* COPYRIGHT International Business Machines Corp. 2012,2014 */
10
/* Licensed under the Apache License, Version 2.0 (the "License"); */
11
/* you may not use this file except in compliance with the License. */
12
/* You may obtain a copy of the License at */
14
/* http://www.apache.org/licenses/LICENSE-2.0 */
16
/* Unless required by applicable law or agreed to in writing, software */
17
/* distributed under the License is distributed on an "AS IS" BASIS, */
18
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
19
/* implied. See the License for the specific language governing */
20
/* permissions and limitations under the License. */
22
/* IBM_PROLOG_END_TAG */
23
#ifndef __FAPI_SBE_COMMON_H
24
#define __FAPI_SBE_COMMON_H
26
// $Id: fapi_sbe_common.H,v 1.1 2012/04/16 23:55:37 bcbrock Exp $
27
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/fapi_sbe_common.H,v $
28
//------------------------------------------------------------------------------
29
// *! (C) Copyright International Business Machines Corp. 2011
30
// *! All Rights Reserved -- Property of IBM
31
// *! *** IBM Confidential ***
32
//------------------------------------------------------------------------------
33
// *! OWNER NAME : Email:
35
/// \file fapi_sbe_common.H
36
/// \brief Definitions common to FAPI and SBE procedures
38
/// Several preprocessor macros are required to have different definitions in
39
/// C, C++ and SBE assembly procedures. These common forms are collected here.
41
#if defined __ASSEMBLER__
43
#define CONST_UINT8_T(name, expr) .set name, (expr)
44
#define CONST_UINT32_T(name, expr) .set name, (expr)
45
#define CONST_UINT64_T(name, expr) .set name, (expr)
49
#elif defined __cplusplus
53
#define CONST_UINT8_T(name, expr) const uint8_t name = (expr);
54
#define CONST_UINT32_T(name, expr) const uint32_t name = (expr);
55
#define CONST_UINT64_T(name, expr) const uint64_t name = (expr);
61
// CONST_UINT[8,3,64]_T() can't be used in C code/headers; Use
63
// #define <symbol> <value> [ or ULL(<value>) for 64-bit constants
67
#endif // __ASSEMBLER__
69
#endif // __FAPI_SBE_COMMON_H