1
0
mirror of https://github.com/cc65/cc65.git synced 2024-05-28 00:48:27 +00:00

Removed trailing whitespaces.

This commit is contained in:
acqn 2021-02-15 18:37:01 +08:00 committed by Oliver Schmidt
parent 3caceb8174
commit 2aad72af90
18 changed files with 30 additions and 34 deletions

View File

@ -169,7 +169,7 @@ void Assignment (ExprDesc* Expr)
/* cc65 does not have full support for handling structs or unions. Since
** assigning structs is one of the more useful operations from this family,
** allow it here.
** Note: IsClassStruct() is also true for union types.
** Note: IsClassStruct() is also true for union types.
*/
if (IsClassStruct (ltype)) {
/* Copy the struct or union by value */

View File

@ -380,7 +380,7 @@ void ListOptSteps (FILE* F)
/* List all optimization steps */
{
unsigned I;
fprintf (F, "any\n");
for (I = 0; I < OPTFUNC_COUNT; ++I) {
if (OptFuncs[I]->Func != 0) {

View File

@ -678,7 +678,7 @@ void SetDontRemoveEntryFlag (LoadRegInfo* LRI)
if (LRI->Flags & LI_DONT_REMOVE) {
if (LRI->LoadEntry != 0) {
LRI->LoadEntry->Flags |= CEF_DONT_REMOVE;
/* If the load requires Y, then Y shouldn't be removed either */
if (LRI->LoadYEntry != 0) {
LRI->LoadYEntry->Flags |= CEF_DONT_REMOVE;
@ -2562,7 +2562,7 @@ int BackupArgAfter (CodeSeg* S, BackupInfo* B, int Idx, const CodeEntry* E, Coll
static int LoadAAt (CodeSeg* S, int Idx, const LoadRegInfo* LRI, Collection* Indices, int After)
/* Reload into A the same arg according to LoadRegInfo before or after Idx
** depending on the After param.
** depending on the After param.
*/
{
CodeEntry* E;
@ -2582,7 +2582,7 @@ static int LoadAAt (CodeSeg* S, int Idx, const LoadRegInfo* LRI, Collection* Ind
CHECK (E != 0);
O = CS_GetEntry (S, OldIdx);
/* We only recognize opc with an arg for now, as well as a special case for ldaxysp */
if ((E->OPC != OP65_JSR || strcmp (E->Arg, "ldaxysp") == 0) &&
E->AM != AM65_BRA && E->AM != AM65_IMP) {
@ -2645,7 +2645,7 @@ static int LoadAAt (CodeSeg* S, int Idx, const LoadRegInfo* LRI, Collection* Ind
static int LoadXAt (CodeSeg* S, int Idx, const LoadRegInfo* LRI, Collection* Indices, int After)
/* Reload into X the same arg according to LoadRegInfo before or after Idx
** depending on the After param.
** depending on the After param.
*/
{
CodeEntry* E;
@ -2744,7 +2744,7 @@ static int LoadXAt (CodeSeg* S, int Idx, const LoadRegInfo* LRI, Collection* Ind
static int LoadYAt (CodeSeg* S, int Idx, const LoadRegInfo* LRI, Collection* Indices, int After)
/* Reload into Y the same arg according to LoadRegInfo before or after Idx
** depending on the After param.
** depending on the After param.
*/
{
CodeEntry* E;

View File

@ -990,7 +990,7 @@ unsigned OptTransfers4 (CodeSeg* S)
** isn't used later, and we have an address mode match, we can
** replace the transfer by a load and remove the initial load.
*/
if ((GetRegInfo (S, I, LoadEntry->Chg & REG_ALL) &
if ((GetRegInfo (S, I, LoadEntry->Chg & REG_ALL) &
LoadEntry->Chg & REG_ALL) == 0 &&
(LoadEntry->AM == AM65_ABS ||
LoadEntry->AM == AM65_ZP ||
@ -1252,7 +1252,7 @@ unsigned OptPushPop2 (CodeSeg* S)
/* Go into searching mode again */
State = Searching;
}
} else if ((E->Info & OF_BRA) == 0 &&
} else if ((E->Info & OF_BRA) == 0 &&
(E->Info & OF_STORE) == 0 &&
E->OPC != OP65_NOP &&
E->OPC != OP65_TSX) {
@ -1500,14 +1500,11 @@ unsigned OptShiftBack (CodeSeg* S)
(N->OPC == OP65_LSR ||
N->OPC == OP65_ROR) &&
!CE_HasLabel (N)) {
CheckStates = PSTATE_ZN;
if (N->OPC == OP65_LSR &&
!PStatesAreClear (E->RI->Out.PFlags, PSTATE_C)) {
CheckStates |= REG_A;
}
if ((GetRegInfo (S, I+2, CheckStates) & CheckStates) == 0) {
/* Remove the shifts */

View File

@ -233,7 +233,7 @@ unsigned OptPtrLoad11 (CodeSeg* S);
*/
unsigned OptPtrLoad12 (CodeSeg* S);
/* Search for the sequence:
/* Search for the sequence:
**
** lda regbank+n
** ldx regbank+n+1

View File

@ -1522,7 +1522,7 @@ static Type* ParamTypeCvt (Type* T)
} else if (IsTypeFunc (T)) {
Tmp = PointerTo (T);
}
if (Tmp != 0) {
/* Do several fixes on qualifiers */
FixQualifiers (Tmp);
@ -1786,7 +1786,7 @@ static FuncDesc* ParseFuncDecl (void)
** won't always get to know the parameter sizes here and may do that later.
*/
F->Flags |= FD_INCOMPLETE_PARAM;
/* Leave the lexical level remembering the symbol tables */
RememberFunctionLevel (F);

View File

@ -73,7 +73,7 @@ enum {
** - ref-load doesn't change the rval/lval category of the expression,
** while rval-load converts it to an rvalue if it wasn't.
** - In practice, ref-load is unimplemented, and can be simulated with
** adding E_ADDRESS_OF temporaily through LoadExpr + FinalizeLoad,
** adding E_ADDRESS_OF temporaily through LoadExpr + FinalizeLoad,
** whilst val-load is done with LoadExpr + FinalizeRValLoad.
**
** E_LOC_NONE -- ref-load -> + E_LOADED (int rvalue)
@ -142,7 +142,7 @@ enum {
** than it are usually consided "side-effects" in this regard.
** - The compiler front end cannot know things determined by the linker,
** such as the actual address of an object with static storage. What it
** can know is categorized as "compiler-known" here.
** can know is categorized as "compiler-known" here.
** - The concept "immutable" here means that once something is determined
** (not necessarily by the compiler), it will never change. This is not
** the same meaning as the "constant" word in the C standard.
@ -299,7 +299,7 @@ INLINE int ED_IsLocExpr (const ExprDesc* Expr)
#if defined(HAVE_INLINE)
INLINE int ED_IsLocLiteral (const ExprDesc* Expr)
/* Return true if the expression is a string from the literal pool */
{
{
return (Expr->Flags & E_MASK_LOC) == E_LOC_LITERAL;
}
#else

View File

@ -45,7 +45,7 @@
unsigned HexVal (int C);
/* Convert a hex digit into a value. The function will emit an error for
/* Convert a hex digit into a value. The function will emit an error for
** invalid hex digits.
*/

View File

@ -35,7 +35,7 @@
/* common */
#include "chartype.h"
/* cc65 */
#include "ident.h"

View File

@ -37,7 +37,7 @@
#define LINEINFO_H
/* common */
#include "strbuf.h"
@ -50,7 +50,7 @@
/* Input file structure */
struct IFile;
struct IFile;

View File

@ -39,7 +39,7 @@
/* cc65 */
#include "error.h"
#include "loop.h"
#include "loop.h"
#include "stackptr.h"

View File

@ -460,7 +460,7 @@ static void SegNamePragma (StrBuf* B, segment_t Seg)
Warning ("Invalid address size for segment!");
}
}
/* Set the new name and optionally address size */
if (Push) {
PushSegName (Seg, Name);

View File

@ -102,7 +102,7 @@
#define ZNREG_A REG_A
#define ZNREG_X REG_X
#define ZNREG_Y REG_Y
#define ZNREG_TMP1 REG_TMP1
#define ZNREG_TMP1 REG_TMP1
#define ZNREG_PTR1_LO REG_PTR1_LO
#define ZNREG_PTR1_HI REG_PTR1_HI
#define ZNREG_PTR2_LO REG_PTR2_LO

View File

@ -185,7 +185,7 @@ int SB_GetSym (StrBuf* B, StrBuf* Ident, const char* SpecialChars)
SB_AppendChar (Ident, C);
SB_Skip (B);
C = SB_Peek (B);
} while (IsIdent (C) || IsDigit (C) ||
} while (IsIdent (C) || IsDigit (C) ||
(C != '\0' && strchr (SpecialChars, C) != 0));
SB_Terminate (Ident);
return 1;

View File

@ -193,7 +193,7 @@ void ShiftExpr (struct ExprDesc* Expr)
ED_IsLocQuasiConst (Expr) &&
Expr2.IVal >= 8) {
Type* OldType;
Type* OldType;
/* Increase the address by one and decrease the shift count */
++Expr->IVal;

View File

@ -518,7 +518,7 @@ SymEntry FindStructField (const Type* T, const char* Name)
*/
if (Struct->V.S.SymTab) {
Entry = FindSymInTable (Struct->V.S.SymTab, Name, HashStr (Name));
if (Entry != 0) {
Offs = Entry->V.Offs;
}
@ -732,7 +732,7 @@ SymEntry* AddEnumSym (const char* Name, unsigned Flags, const Type* Type, SymTab
CurTagTab = FailSafeTab;
}
}
if (Entry == 0) {
/* Create a new entry */
@ -817,7 +817,7 @@ SymEntry* AddStructSym (const char* Name, unsigned Flags, unsigned Size, SymTabl
CurTagTab = FailSafeTab;
}
}
if (Entry == 0) {
/* Create a new entry */
@ -1116,7 +1116,7 @@ SymEntry* AddLocalSym (const char* Name, const Type* T, unsigned Flags, int Offs
}
}
}
if (Entry == 0) {
/* Create a new entry */
Entry = NewSymEntry (Name, Flags);
@ -1221,7 +1221,6 @@ SymEntry* AddGlobalSym (const char* Name, const Type* T, unsigned Flags)
/* Add the new declaration to the global symbol table instead */
Tab = SymTab0;
}
if (Entry == 0 || Entry->Owner != Tab) {
/* Create a new entry */

View File

@ -32,7 +32,7 @@
/*****************************************************************************/
/* cc65 */
#include "codegen.h"
#include "error.h"

View File

@ -228,7 +228,7 @@ static void DoCompare (const Type* lhs, const Type* rhs, typecmp_t* Result)
return;
}
}
}
}
}
}