15ff7258cSRichard Henderson /* 25ff7258cSRichard Henderson * Internal declarations for Tiny Code Generator for QEMU 35ff7258cSRichard Henderson * 45ff7258cSRichard Henderson * Copyright (c) 2008 Fabrice Bellard 55ff7258cSRichard Henderson * 65ff7258cSRichard Henderson * Permission is hereby granted, free of charge, to any person obtaining a copy 75ff7258cSRichard Henderson * of this software and associated documentation files (the "Software"), to deal 85ff7258cSRichard Henderson * in the Software without restriction, including without limitation the rights 95ff7258cSRichard Henderson * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 105ff7258cSRichard Henderson * copies of the Software, and to permit persons to whom the Software is 115ff7258cSRichard Henderson * furnished to do so, subject to the following conditions: 125ff7258cSRichard Henderson * 135ff7258cSRichard Henderson * The above copyright notice and this permission notice shall be included in 145ff7258cSRichard Henderson * all copies or substantial portions of the Software. 155ff7258cSRichard Henderson * 165ff7258cSRichard Henderson * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 175ff7258cSRichard Henderson * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 185ff7258cSRichard Henderson * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 195ff7258cSRichard Henderson * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 205ff7258cSRichard Henderson * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 215ff7258cSRichard Henderson * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 225ff7258cSRichard Henderson * THE SOFTWARE. 235ff7258cSRichard Henderson */ 245ff7258cSRichard Henderson 255ff7258cSRichard Henderson #ifndef TCG_INTERNAL_H 265ff7258cSRichard Henderson #define TCG_INTERNAL_H 1 275ff7258cSRichard Henderson 285ff7258cSRichard Henderson #define TCG_HIGHWATER 1024 295ff7258cSRichard Henderson 3042eb6dfcSRichard Henderson extern TCGContext tcg_init_ctx; 315ff7258cSRichard Henderson extern TCGContext **tcg_ctxs; 320e2d61cfSRichard Henderson extern unsigned int tcg_cur_ctxs; 330e2d61cfSRichard Henderson extern unsigned int tcg_max_ctxs; 345ff7258cSRichard Henderson 3543b972b7SRichard Henderson void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus); 365ff7258cSRichard Henderson bool tcg_region_alloc(TCGContext *s); 375ff7258cSRichard Henderson void tcg_region_initial_alloc(TCGContext *s); 385ff7258cSRichard Henderson void tcg_region_prologue_set(TCGContext *s); 395ff7258cSRichard Henderson 40*90163900SRichard Henderson static inline unsigned tcg_call_flags(TCGOp *op) 41*90163900SRichard Henderson { 42*90163900SRichard Henderson return op->args[TCGOP_CALLO(op) + TCGOP_CALLI(op) + 1]; 43*90163900SRichard Henderson } 44*90163900SRichard Henderson 455ff7258cSRichard Henderson #endif /* TCG_INTERNAL_H */ 46