这篇教程C++ CGCall函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CGCall函数的典型用法代码示例。如果您正苦于以下问题:C++ CGCall函数的具体用法?C++ CGCall怎么用?C++ CGCall使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CGCall函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DoCmplxOpvoid DoCmplxOp( RTCODE rtn_id, cg_name a, cg_name b, cg_name c, cg_name d ) {//===========================================================================// Do a complex operation. call_handle handle; cg_type typ; cg_type r_typ; typ = ResCGType( CGType( a ), CGType( c ) ); if( typ == TY_DOUBLE ) { rtn_id += RT_C_DOUBLE; r_typ = TY_DCOMPLEX; } else if( typ == TY_LONGDOUBLE ) { rtn_id += RT_C_EXTENDED; r_typ = TY_XCOMPLEX; } else { r_typ = TY_COMPLEX; } handle = InitCall( rtn_id ); CGAddParm( handle, a, typ ); CGAddParm( handle, b, typ ); CGAddParm( handle, c, typ ); CGAddParm( handle, d, typ ); SplitCmplx( CGCall( handle ), r_typ );}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:26,
示例2: DbSubscriptstatic void DbSubscript( sym_id arr ) {//=========================================// Generate call to debugging subscript routine. act_dim_list *dim_ptr; int dims_no; int i; call_handle call; cg_name offset; cg_name subscripts[MAX_DIM]; dim_ptr = arr->u.ns.si.va.u.dim_ext; dims_no = _DimCount( dim_ptr->dim_flags ); call = InitCall( RT_SUBSCRIPT ); for( i = 0; i < dims_no; ++i ) { subscripts[ i ] = GetTypedValue(); } for( i = 1; i <= dims_no; ++i ) { CGAddParm( call, subscripts[ dims_no - i ], TY_INT_4 ); } CGAddParm( call, GetAdv( arr ), TY_LOCAL_POINTER ); CGAddParm( call, CGInteger( _DimCount( dim_ptr->dim_flags ), TY_INTEGER ), TY_INTEGER ); offset = CGUnary( O_POINTS, CGCall( call ), TY_INT_4 ); Index( arr, offset );}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:26,
示例3: DoCmplxScalarOpstatic void DoCmplxScalarOp( RTCODE rtn_id, cg_name a, cg_name b, cg_name s ) {//=========================================================================// Do a complex operation. call_handle handle; cg_type typ; cg_type r_typ; typ = CGType( a ); if( typ == TY_DOUBLE ) { rtn_id += RT_C_DOUBLE; r_typ = TY_DCOMPLEX; } else if( typ == TY_LONGDOUBLE ) { rtn_id += RT_C_EXTENDED; r_typ = TY_XCOMPLEX; } else { r_typ = TY_COMPLEX; } handle = InitCall( rtn_id ); CGAddParm( handle, a, typ ); CGAddParm( handle, b, typ ); CGAddParm( handle, s, PromoteIntType( CGType( s ) ) ); SplitCmplx( CGCall( handle ), r_typ );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:25,
示例4: Concatcg_name Concat( uint num_args, cg_name dest ) {//=============================================// Do concatenation operation. int count; call_handle call; cg_name dest_1; cg_name dest_2; if( num_args & CAT_TEMP ) { call = InitCall( RT_TCAT ); num_args &= ~CAT_TEMP; } else if( num_args == 1 ) { call = InitCall( RT_MOVE ); } else { call = InitCall( RT_CAT ); } count = num_args; while( count > 0 ) { CGAddParm( call, StkElement( count ), TY_LOCAL_POINTER ); --count; } PopStkElements( num_args ); CloneCGName( dest, &dest_1, &dest_2 ); CGAddParm( call, dest_1, TY_LOCAL_POINTER ); if( num_args != 1 ) { CGAddParm( call, CGInteger( num_args, TY_UNSIGNED ), TY_UNSIGNED ); } return( CGBinary( O_COMMA, CGCall( call ), dest_2, TY_LOCAL_POINTER ) );}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:31,
示例5: FCSetFmtvoid FCSetFmt( void ) {//==================// Set format string from FORMAT statement. call_handle handle; handle = InitCall( RT_SET_FMT ); CGAddParm( handle, CGBackName( (back_handle)GetStmtLabel( GetPtr() ), TY_POINTER ), TY_POINTER ); CGDone( CGCall( handle ) );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,
示例6: FCPassLabelvoid FCPassLabel( void ) {//=====================// Pass label to run-time routine. call_handle handle; handle = InitCall( GetU16() ); CGAddParm( handle, CGBackName( (back_handle)GetLabel( GetU16() ), TY_POINTER ), TY_POINTER ); CGDone( CGCall( handle ) );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,
示例7: FCFmtAssignvoid FCFmtAssign( void ) {//=====================// Set FORMAT string for:// ASSIGN 10 TO I// PRINT I, ...// 10 FORMAT( ... ) call_handle handle; handle = InitCall( RT_SET_FMT ); CGAddParm( handle, CGUnary( O_POINTS, SymAddr( GetPtr() ), TY_POINTER ), TY_POINTER ); CGDone( CGCall( handle ) );}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:14,
示例8: FCSetLinevoid FCSetLine( void ) {//===================// Generate run-time call to ISN routine. call_handle handle; unsigned_16 line_num; line_num = GetU16(); if( ( SubProgId->ns.flags & SY_SUBPROG_TYPE ) == SY_BLOCK_DATA ) return; handle = InitCall( RT_SET_LINE ); CGAddParm( handle, CGInteger( line_num, TY_INTEGER ), TY_INTEGER ); CGDone( CGCall( handle ) );}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:14,
示例9: FCAdvFillHivoid FCAdvFillHi( void ) {//=====================// Fill hi bound of a dimension (actually computes # of elements in dimension). sym_id arr; act_dim_list *dim_ptr; uint lo_size; uint hi_size; int hi_offset; int ss; cg_name num_elts; cg_name hi; cg_name adv; call_handle call; arr = GetPtr(); dim_ptr = arr->u.ns.si.va.u.dim_ext; adv = GetAdv( arr ); hi_size = BETypeLength( TY_ADV_HI ); lo_size = BETypeLength( TY_ADV_LO ); ss = GetU16(); hi = GetTypedValue(); if( CGOpts & CGOPT_DI_CV ) { hi_offset = _DimCount( dim_ptr->dim_flags ) * BETypeLength( TY_ADV_ENTRY ); if( Options & OPT_BOUNDS ) { hi_offset += BETypeLength( TY_POINTER ); } hi_offset += (ss - 1) * (lo_size + BETypeLength( TY_ADV_HI_CV )) + lo_size; hi = CGAssign( StructRef( adv, hi_offset ), hi, TY_ADV_HI_CV ); adv = GetAdv( arr ); } if( Options & OPT_BOUNDS ) { call = InitCall( RT_ADV_FILL_HI ); CGAddParm( call, hi, TY_INT_4 ); CGAddParm( call, CGInteger( ss, TY_UNSIGNED ), TY_UNSIGNED ); CGAddParm( call, adv, TY_LOCAL_POINTER ); CGDone( CGUnary( O_POINTS, CGCall( call ), TY_INT_4 ) ); } else { hi_offset = (ss - 1) * ( lo_size + hi_size ) + lo_size; num_elts = CGBinary( O_PLUS, hi, CGBinary( O_MINUS, CGInteger( 1, TY_INTEGER ), LoBound( arr, ss - 1 ), TY_ADV_HI ), TY_ADV_HI ); CGDone( CGAssign( StructRef( adv, hi_offset ), num_elts, TY_ADV_HI ) ); }}
开发者ID:bhanug,项目名称:open-watcom-v2,代码行数:48,
示例10: Breakstatic void Break( RTCODE routine ) {//=======================================// Process PAUSE/STOP statement. call_handle handle; sym_id lit; cg_name arg; handle = InitCall( routine ); lit = GetPtr(); if( lit == NULL ) { arg = CGInteger( 0, TY_LOCAL_POINTER ); } else { arg = CGBackName( ConstBack( lit ), TY_LOCAL_POINTER ); } CGAddParm( handle, arg, TY_LOCAL_POINTER ); CGDone( CGCall( handle ) );}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:19,
注:本文中的CGCall函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CGColorSpaceRelease函数代码示例 C++ CGBitmapContextCreate函数代码示例 |