From e95d1e259e6a3a5c15da1a82d11c7ef6900124f1 Mon Sep 17 00:00:00 2001 From: Jiri Malak Date: Sat, 30 Sep 2023 19:29:09 +0200 Subject: [PATCH] cleanup cg code --- bld/cg/c/bldcall.c | 4 ++-- bld/cg/c/tree.c | 4 ++-- bld/cg/h/bgcall.h | 4 ++-- bld/cg/h/bldcall.h | 4 ++-- bld/cg/intel/c/x86call.c | 6 +++--- bld/cg/risc/axp/c/axpcall.c | 6 +++--- bld/cg/risc/mps/c/mpscall.c | 6 +++--- bld/cg/risc/mps/c/mpsreg.c | 8 ++++---- bld/cg/risc/ppc/c/ppccall.c | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bld/cg/c/bldcall.c b/bld/cg/c/bldcall.c index e645abbe9b..63316f13c1 100644 --- a/bld/cg/c/bldcall.c +++ b/bld/cg/c/bldcall.c @@ -805,7 +805,7 @@ static void SplitStructParms( pn *parm_list, call_state *state ) } #endif -bool AssgnParms( cn call, bool in_line ) +bool AssgnParms( cn call, bool aux_inline ) /******************************************************** * Decide what registers the parms should go in. * Assign registers to first parm first, etc. Also, assign a congolmeration @@ -833,7 +833,7 @@ bool AssgnParms( cn call, bool in_line ) parm = call->parms; #endif for( ; parm != NULL; parm = parm->next ) { - if( in_line ) { + if( aux_inline ) { parm->regs = ParmInLineReg( &state->parm ); if( HW_CEqual( parm->regs, HW_EMPTY ) ) { if( !HW_CEqual( *(state->parm.curr_entry), HW_EMPTY ) ) { diff --git a/bld/cg/c/tree.c b/bld/cg/c/tree.c index e25e962646..bef4b2a9a9 100644 --- a/bld/cg/c/tree.c +++ b/bld/cg/c/tree.c @@ -2304,8 +2304,8 @@ static an TNCall( tn callhandle, bool ignore_return ) an retv; an parman; type_def *tipe; - bool aux_inline; - bool call_inline; + bool aux_inline; /* ASM inline code */ + bool call_inline; /* C inline code */ name *base; call_class cclass; cg_sym_handle sym; diff --git a/bld/cg/h/bgcall.h b/bld/cg/h/bgcall.h index 4694fd7055..ea2c2b2c7d 100644 --- a/bld/cg/h/bgcall.h +++ b/bld/cg/h/bgcall.h @@ -2,7 +2,7 @@ * * Open Watcom Project * -* Copyright (c) 2002-2022 The Open Watcom Contributors. All Rights Reserved. +* Copyright (c) 2002-2023 The Open Watcom Contributors. All Rights Reserved. * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. * * ======================================================================== @@ -30,7 +30,7 @@ ****************************************************************************/ -extern an BGCall( cn call, bool use_return, bool in_line ); +extern an BGCall( cn call, bool use_return, bool aux_inline ); extern void BGProcDecl( cg_sym_handle sym, type_def *tipe ); extern name *StReturn( an retval, type_def *tipe, instruction **pins ); extern reg_set_index CallIPossible( instruction *ins ); diff --git a/bld/cg/h/bldcall.h b/bld/cg/h/bldcall.h index eecdd160b6..dc62441ccb 100644 --- a/bld/cg/h/bldcall.h +++ b/bld/cg/h/bldcall.h @@ -2,7 +2,7 @@ * * Open Watcom Project * -* Copyright (c) 2002-2018 The Open Watcom Contributors. All Rights Reserved. +* Copyright (c) 2002-2023 The Open Watcom Contributors. All Rights Reserved. * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. * * ======================================================================== @@ -44,6 +44,6 @@ extern void ReserveStack( call_state *state, instruction *prev, type extern void ParmIns( pn parm, call_state *state ); extern void BGZapBase( name *base, type_def *tipe ); extern void BGReturn( an retval, type_def *tipe ); -extern bool AssgnParms( cn call, bool in_line ); +extern bool AssgnParms( cn call, bool aux_inline ); extern hw_reg_set CallZap( call_state *state ); extern void UpdateReturn( call_state *, type_def *, type_class_def, aux_handle ); diff --git a/bld/cg/intel/c/x86call.c b/bld/cg/intel/c/x86call.c index af2b53b030..5c7ccf463d 100644 --- a/bld/cg/intel/c/x86call.c +++ b/bld/cg/intel/c/x86call.c @@ -137,8 +137,8 @@ static void Far16Parms( cn call ) #endif -an BGCall( cn call, bool use_return, bool in_line ) -/******************************************************/ +an BGCall( cn call, bool use_return, bool aux_inline ) +/*********************************************************/ { instruction *call_ins; call_state *state; @@ -189,7 +189,7 @@ an BGCall( cn call, bool use_return, bool in_line ) Far16Parms( call ); #endif } else { - if( AssgnParms( call, in_line ) ) { + if( AssgnParms( call, aux_inline ) ) { if( state->attr & ROUTINE_REMOVES_PARMS ) { call_ins->flags.call_flags |= CALL_POPS_PARMS; } diff --git a/bld/cg/risc/axp/c/axpcall.c b/bld/cg/risc/axp/c/axpcall.c index 640bc24fab..3446b9c19d 100644 --- a/bld/cg/risc/axp/c/axpcall.c +++ b/bld/cg/risc/axp/c/axpcall.c @@ -50,8 +50,8 @@ #include "bgcall.h" -an BGCall( cn call, bool use_return, bool in_line ) -/******************************************************/ +an BGCall( cn call, bool use_return, bool aux_inline ) +/*********************************************************/ { instruction *call_ins; instruction *conv_ins; @@ -86,7 +86,7 @@ an BGCall( cn call, bool use_return, bool in_line ) } else { call_ins->result = AllocRegName( state->return_reg ); } - AssgnParms( call, in_line ); + AssgnParms( call, aux_inline ); AddCallIns( call_ins, call ); if( use_return ) { if( call_ins->type_class != XX ) { diff --git a/bld/cg/risc/mps/c/mpscall.c b/bld/cg/risc/mps/c/mpscall.c index 2f2c5ff626..6c9444c90c 100644 --- a/bld/cg/risc/mps/c/mpscall.c +++ b/bld/cg/risc/mps/c/mpscall.c @@ -50,8 +50,8 @@ #include "bgcall.h" -an BGCall( cn call, bool use_return, bool in_line ) -/*************************************************/ +an BGCall( cn call, bool use_return, bool aux_inline ) +/****************************************************/ { instruction *call_ins; instruction *conv_ins; @@ -86,7 +86,7 @@ an BGCall( cn call, bool use_return, bool in_line ) } else { call_ins->result = AllocRegName( state->return_reg ); } - AssgnParms( call, in_line ); + AssgnParms( call, aux_inline ); AddCallIns( call_ins, call ); if( use_return ) { if( call_ins->type_class != XX ) { diff --git a/bld/cg/risc/mps/c/mpsreg.c b/bld/cg/risc/mps/c/mpsreg.c index 12db378c39..649393fd2c 100644 --- a/bld/cg/risc/mps/c/mpsreg.c +++ b/bld/cg/risc/mps/c/mpsreg.c @@ -86,7 +86,7 @@ type_class_def CallState( aux_handle aux, type_def *tipe, call_state *state ) hw_reg_set *pregs; call_class cclass; byte_seq *code; - bool have_aux_code = false; + bool aux_inline = false; state->unalterable = FixedRegs(); if( FEAttr( AskForLblSym( CurrProc->label ) ) & FE_VARARGS ) { @@ -100,13 +100,13 @@ type_class_def CallState( aux_handle aux, type_def *tipe, call_state *state ) if( !AskIfRTLabel( CurrProc->label ) ) { code = FEAuxInfo( aux, FEINF_CALL_BYTES ); if( code != NULL ) { - have_aux_code = true; + aux_inline = true; } } pregs = FEAuxInfo( aux, FEINF_SAVE_REGS ); HW_CAsgn( state->modify, HW_FULL ); - if( have_aux_code ) { + if( aux_inline ) { HW_TurnOff( state->modify, *pregs ); } else { HW_TurnOff( state->modify, SavedRegs() ); @@ -130,7 +130,7 @@ type_class_def CallState( aux_handle aux, type_def *tipe, call_state *state ) if( cclass & FECALL_GEN_NO_MEMORY_READ ) { state->attr |= ROUTINE_READS_NO_MEMORY; } - if( have_aux_code ) { + if( aux_inline ) { parm_src = FEAuxInfo( aux, FEINF_PARM_REGS ); } else { parm_src = ParmRegs(); diff --git a/bld/cg/risc/ppc/c/ppccall.c b/bld/cg/risc/ppc/c/ppccall.c index 709553d80e..4a92566679 100644 --- a/bld/cg/risc/ppc/c/ppccall.c +++ b/bld/cg/risc/ppc/c/ppccall.c @@ -51,8 +51,8 @@ #include "bgcall.h" -an BGCall( cn call, bool use_return, bool in_line ) -/******************************************************/ +an BGCall( cn call, bool use_return, bool aux_inline ) +/*********************************************************/ { instruction *call_ins; instruction *conv_ins; @@ -84,7 +84,7 @@ an BGCall( cn call, bool use_return, bool in_line ) } else { call_ins->result = AllocRegName( state->return_reg ); } - AssgnParms( call, in_line ); + AssgnParms( call, aux_inline ); AddCallIns( call_ins, call ); if( use_return ) { #if 1