diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/SDCCopt.c | 2 | ||||
-rw-r--r-- | src/ds390/gen.c | 2 | ||||
-rw-r--r-- | src/ds390/ralloc.c | 2 | ||||
-rw-r--r-- | src/f8/gen.c | 2 | ||||
-rw-r--r-- | src/f8/gen.h | 2 | ||||
-rw-r--r-- | src/hc08/gen.c | 2 | ||||
-rw-r--r-- | src/mcs51/gen.c | 2 | ||||
-rw-r--r-- | src/mos6502/gen.c | 2 | ||||
-rw-r--r-- | src/pic14/gen.c | 8 | ||||
-rw-r--r-- | src/pic14/ralloc.c | 2 | ||||
-rw-r--r-- | src/pic16/ralloc.c | 2 | ||||
-rw-r--r-- | src/stm8/gen.c | 10 | ||||
-rw-r--r-- | src/stm8/peep.c | 2 | ||||
-rw-r--r-- | src/z80/gen.c | 7 | ||||
-rw-r--r-- | src/z80/gen.h | 2 |
15 files changed, 25 insertions, 24 deletions
diff --git a/src/SDCCopt.c b/src/SDCCopt.c index 3f8c1276f..4595bbef0 100644 --- a/src/SDCCopt.c +++ b/src/SDCCopt.c @@ -2902,7 +2902,7 @@ optimizeFinalCast (ebbIndex *ebbi) // Some regression tests fail, including gcc-torture-execute-pr38236; // looking into that one for -mmcs51 --model-small , register allocation // puts the result of a 16-bit read from e generic pointer into dptr, - // which codegen can't handle (it genrated code where dpl is overwritten by + // which codegen can't handle (it generated code where dpl is overwritten by // the lower byte of the result, then used as pointer once more). // This also triggers a pic16 bug resulting in invalid asm code being generated. if (TARGET_MCS51_LIKE || TARGET_IS_PIC16) diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 213788c2a..1368b7518 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -4273,7 +4273,7 @@ genEndFunction (iCode * ic) return; /* If there were stack parameters, we cannot optimize without also */ - /* fixing all of the stack offsets; this is too dificult to consider. */ + /* fixing all of the stack offsets; this is too difficult to consider. */ if (FUNC_HASSTACKPARM (sym->type)) return; diff --git a/src/ds390/ralloc.c b/src/ds390/ralloc.c index 5d6d2b5c0..1938201d2 100644 --- a/src/ds390/ralloc.c +++ b/src/ds390/ralloc.c @@ -3280,7 +3280,7 @@ packRegisters (eBBlock ** ebpp, int blockno) packRegsDPTRuse (IC_LEFT (ic)); } - /* if this is a cast for intergral promotion then + /* if this is a cast for integral promotion then check if it's the only use of the definition of the operand being casted/ if yes then replace the result of that arithmetic operation with diff --git a/src/f8/gen.c b/src/f8/gen.c index e1625b54e..69ee46011 100644 --- a/src/f8/gen.c +++ b/src/f8/gen.c @@ -7662,7 +7662,7 @@ f8IsReturned (const char *what) } // Check if what is part of the ith argument (counting from 1) to a function of type ftype. -// If what is 0, just check if hte ith argument is in registers. +// If what is 0, just check if the ith argument is in registers. bool f8IsRegArg (struct sym_link *ftype, int i, const char *what) { diff --git a/src/f8/gen.h b/src/f8/gen.h index 8066f2738..9a772f9dd 100644 --- a/src/f8/gen.h +++ b/src/f8/gen.h @@ -86,7 +86,7 @@ void f8_emitDebuggerSymbol (const char *); bool f8IsReturned(const char *what); // Check if what is part of the ith argument (counting from 1) to a function of type ftype. -// If what is 0, just check if hte ith argument is in registers. +// If what is 0, just check if the ith argument is in registers. bool f8IsRegArg(struct sym_link *ftype, int i, const char *what); // Check if what is part of the any argument (counting from 1) to a function of type ftype. diff --git a/src/hc08/gen.c b/src/hc08/gen.c index 8d8e6dfa3..fdbe720bb 100644 --- a/src/hc08/gen.c +++ b/src/hc08/gen.c @@ -3919,7 +3919,7 @@ genSend (set *sendSet) } else { - /* otherwise perfer to load x last (lsb to msb order) */ + /* otherwise prefer to load x last (lsb to msb order) */ loadRegFromAop (hc08_reg_a, AOP (IC_LEFT (send1)), 0); loadRegFromAop (hc08_reg_x, AOP (IC_LEFT (send1)), 1); } diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 1b1ab3e31..d184bffe4 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -5057,7 +5057,7 @@ genEndFunction (iCode * ic) return; /* If there were stack parameters, we cannot optimize without also */ - /* fixing all of the stack offsets; this is too dificult to consider. */ + /* fixing all of the stack offsets; this is too difficult to consider. */ if (FUNC_HASSTACKPARM (ftype)) return; diff --git a/src/mos6502/gen.c b/src/mos6502/gen.c index a3e2350ad..c26350e45 100644 --- a/src/mos6502/gen.c +++ b/src/mos6502/gen.c @@ -8584,7 +8584,7 @@ drym6502iCode (iCode *ic) } /************************************************************************** - * genm6502Code - generate code for for a block of instructions + * genm6502Code - generate code for a block of instructions *************************************************************************/ void genm6502Code (iCode *lic) diff --git a/src/pic14/gen.c b/src/pic14/gen.c index 6b56bc594..33d245e2f 100644 --- a/src/pic14/gen.c +++ b/src/pic14/gen.c @@ -62,7 +62,7 @@ static void genEndCritical (iCode * ic); (!IS_ITEMP (op) /* --> iTemps never reside in __code */ \ && IS_SYMOP (op) /* --> must be an immediate (otherwise we would be in genConstPointerGet) */ \ && !IS_FUNC (OP_SYM_TYPE (op)) /* --> we would want its address instead of the first instruction */ \ - && !IS_CODEPTR (OP_SYM_TYPE (op)) /* --> get symbols address instread */ \ + && !IS_CODEPTR (OP_SYM_TYPE (op)) /* --> get symbols address instead */ \ && IN_CODESPACE (SPEC_OCLS (getSpec (OP_SYM_TYPE (op))))) /* @@ -210,7 +210,7 @@ emitpLabel (int key) /* gen.h defines a macro emitpcode that should be used to call emitpcode * as this allows for easy debugging (ever asked the question: where was - * this instruction geenrated? Here is the answer... */ + * this instruction generated? Here is the answer... */ void emitpcode_real (PIC_OPCODE poc, pCodeOp * pcop) { @@ -1942,7 +1942,7 @@ assignResultValue (iCode *ic) /*-----------------------------------------------------------------*/ -/* genIpush - genrate code for pushing this gets a little complex */ +/* genIpush - generate code for pushing this gets a little complex */ /*-----------------------------------------------------------------*/ static void genIpush (iCode * ic) @@ -2037,7 +2037,7 @@ genIpop (iCode * ic) } /*-----------------------------------------------------------------*/ -/* unsaverbank - restores the resgister bank from stack */ +/* unsaverbank - restores the register bank from stack */ /*-----------------------------------------------------------------*/ static void unsaverbank (int bank, iCode * ic, bool popPsw) diff --git a/src/pic14/ralloc.c b/src/pic14/ralloc.c index be825c46f..cead5f051 100644 --- a/src/pic14/ralloc.c +++ b/src/pic14/ralloc.c @@ -3668,7 +3668,7 @@ packRegisters (eBBlock * ebp) packRegsForOneuse (ic, IC_LEFT (ic), ebp); - /* if this is cast for intergral promotion then + /* if this is cast for integral promotion then check if only use of the definition of the operand being casted/ if yes then replace the result of that arithmetic operation with diff --git a/src/pic16/ralloc.c b/src/pic16/ralloc.c index d3b86ede2..09c320ddb 100644 --- a/src/pic16/ralloc.c +++ b/src/pic16/ralloc.c @@ -4241,7 +4241,7 @@ pic16_packRegisters (eBBlock * ebp) #endif #ifndef NO_cast_peep - /* if this is cast for intergral promotion then + /* if this is cast for integral promotion then check if only use of the definition of the operand being casted/ if yes then replace the result of that arithmetic operation with diff --git a/src/stm8/gen.c b/src/stm8/gen.c index 67fe8d429..19d1adab0 100644 --- a/src/stm8/gen.c +++ b/src/stm8/gen.c @@ -1786,12 +1786,12 @@ genCopyStack (asmop *result, int roffset, asmop *source, int soffset, int n, boo { wassert_bt (*size >= 2); - // Using ldw results in substancially shorter, but somewhat slower code. + // Using ldw results in substantially shorter, but somewhat slower code. if (!x_free && !y_free && really_do_it_now && (optimize.codeSize || !a_free && !optimize.codeSpeed)) { push (ASMOP_X, 0, 2); - pushed_x = TRUE; - x_free = TRUE; + pushed_x = true; + x_free = true; } if (y_free) // Unlike with other operations, loading between y and stk is as efficient as for x, so we try y first here. @@ -7659,7 +7659,7 @@ genLeftShift (const iCode *ic) else shiftop = result->aop; - iterations = (right->aop->type == AOP_LIT ? byteOfVal (right->aop->aopu.aop_lit, 0) : 2); // Use 2 as a guess for estimating hte cycle count. + iterations = (right->aop->type == AOP_LIT ? byteOfVal (right->aop->aopu.aop_lit, 0) : 2); // Use 2 as a guess for estimating the cycle count. // Avoid overwriting shift count on stack when moving to shiftop. if (aopOnStack (right->aop, 0, 1) && aopRS (shiftop)) @@ -10086,7 +10086,7 @@ stm8IsReturned(const char *what) } // Check if what is part of the ith argument (counting from 1) to a function of type ftype. -// If what is 0, just check if hte ith argument is in registers. +// If what is 0, just check if the ith argument is in registers. bool stm8IsRegArg (struct sym_link *ftype, int i, const char *what) { diff --git a/src/stm8/peep.c b/src/stm8/peep.c index 0bc8debcf..9e69e907f 100644 --- a/src/stm8/peep.c +++ b/src/stm8/peep.c @@ -366,7 +366,7 @@ stm8instructionSize(lineNode *pl) int i = 0; wassert (op1start); - if(!strcmp(op1start, "a") || !strcmp(op1start, "(x)")) + if(!STRCASECMP(op1start, "a") || !STRCASECMP(op1start, "(x)")) return(1); if(!strcmp(op1start, "(y)")) return(2); diff --git a/src/z80/gen.c b/src/z80/gen.c index 188357e2c..392b44427 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -5911,7 +5911,7 @@ _saveRegsForCall (const iCode *ic, bool saveHLifused, bool dontsaveIY) } /*-----------------------------------------------------------------*/ -/* genIpush - genrate code for pushing this gets a little complex */ +/* genIpush - generate code for pushing this gets a little complex */ /*-----------------------------------------------------------------*/ static void genIpush (const iCode *ic) @@ -7938,7 +7938,8 @@ setupToPreserveCarry (asmop *result, asmop *left, asmop *right) } else if (couldDestroyCarry (result)) { - shiftIntoPair (PAIR_HL, result); + if (!requiresHL (left)) + shiftIntoPair (PAIR_HL, result); } } } @@ -8331,7 +8332,7 @@ genPlus (iCode * ic) if (couldDestroyCarry (IC_RESULT (ic)->aop) && (IC_RESULT (ic)->aop == leftop || IC_RESULT (ic)->aop == rightop)) shiftIntoPair (PAIR_HL, IC_RESULT (ic)->aop); - else if (couldDestroyCarry (rightop)) + else if (couldDestroyCarry (rightop) && !requiresHL (leftop)) shiftIntoPair (PAIR_HL, rightop); } diff --git a/src/z80/gen.h b/src/z80/gen.h index ea22520e2..67734b39d 100644 --- a/src/z80/gen.h +++ b/src/z80/gen.h @@ -87,7 +87,7 @@ void z80_emitDebuggerSymbol (const char *); bool z80IsReturned(const char *what); // Check if what is part of the ith argument (counting from 1) to a function of type ftype. -// If what is 0, just check if hte ith argument is in registers. +// If what is 0, just check if the ith argument is in registers. bool z80IsRegArg(struct sym_link *ftype, int i, const char *what); // Check if what is part of the any argument (counting from 1) to a function of type ftype. |