emitcode ("", "%05d$:", (tlbl->key + 100));
}
else
- werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
- "Bad rIdx in asmToBool");
- return;
+ {
+ werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
+ "Bad rIdx in asmToBool");
+ return;
+ }
+ break;
case AOP_EXT:
if (resultInA)
needpula = FALSE;
return;
}
- shCount &= 0x000f; // shCount : 0..7
+ shCount &= 0x000f; // shCount : 0..f
/* if we can beat 2n cycles or bytes for some special case, do it here */
switch (shCount)
}
-/*-----------------------------------------------------------------*/
-/* AccAXRsh1 - right shift 0->a:x->c by 1 */
-/*-----------------------------------------------------------------*/
-static void
-AccAXRsh1 (char *x)
-{
- emitcode ("lsra", "");
- emitcode ("ror", "%s", x);
-}
-
-
-/*-----------------------------------------------------------------*/
-/* AccAXRshS1 - signed right shift s->a:x->c by 1 */
-/*-----------------------------------------------------------------*/
-static void
-AccAXRshS1 (char *x)
-{
- emitcode ("asra", "");
- emitcode ("ror", "%s", x);
-}
-
-/*-----------------------------------------------------------------*/
-/* AccAXLrl1 - left rotate c<-a:x<-c by 1 */
-/*-----------------------------------------------------------------*/
-static void
-AccAXLrl1 (char *x)
-{
- emitcode ("rol", "%s", x);
- emitcode ("rola", "");
-}
-
-/*-----------------------------------------------------------------*/
-/* AccAXLsh1 - left shift a:x<-0 by 1 */
-/*-----------------------------------------------------------------*/
-static void
-AccAXLsh1 (char *x)
-{
- emitcode ("lsl", "%s", x);
- emitcode ("rola", "");
-}
-
-/*-----------------------------------------------------------------*/
-/* AccAXLsh - left shift a:x by known count (0..7) */
-/*-----------------------------------------------------------------*/
-static void
-AccAXLsh (char *x, int shCount)
-{
- int i;
-
- for (i=0;i<shCount;i++) {
- AccAXLsh1 (x);
- }
-}
-
-/*-----------------------------------------------------------------*/
-/* AccAXRsh - right shift a:x known count (0..7) */
-/*-----------------------------------------------------------------*/
-static void
-AccAXRsh (char *x, int shCount)
-{
- int i;
-
- for (i=0;i<shCount;i++) {
- AccAXRsh1 (x);
- }
-
-}
-
-/*-----------------------------------------------------------------*/
-/* AccAXRshS - right shift signed a:x known count (0..7) */
-/*-----------------------------------------------------------------*/
-static void
-AccAXRshS (char *x, int shCount)
-{
- int i;
-
- for (i=0;i<shCount;i++) {
- AccAXRshS1 (x);
- }
-}
-
/*-----------------------------------------------------------------*/
/* shiftL2Left2Result - shift left two bytes from left to result */
/*-----------------------------------------------------------------*/
D(emitcode ("; genlshTwo",""));
+
size = getDataSize (result);
/* if shCount >= 8 */
if (size > 1)
{
- if (shCount)
- shiftL1Left2Result (left, LSB, result, MSB16, shCount);
- else
- movLeft2Result (left, LSB, result, MSB16, 0);
+ loadRegFromAop (hc08_reg_a, AOP (left), 0);
+ AccLsh (shCount);
+ storeRegToAop (hc08_reg_a, AOP (result), 1);
}
storeConstToAop(zero, AOP (result), LSB);
}
/* 1 <= shCount <= 7 */
else
{
- if (size == 1)
- shiftL1Left2Result (left, LSB, result, LSB, shCount);
- else
- shiftL2Left2Result (left, LSB, result, LSB, shCount);
+ loadRegFromAop (hc08_reg_xa, AOP (left), 0);
+ XAccLsh (shCount);
+ storeRegToFullAop (hc08_reg_xa, AOP (result), 0);
}
}
freeAsmop (result, NULL, ic, TRUE);
}
+#if 0
/*-----------------------------------------------------------------*/
/* genNearPointerGet - emitcode for near pointer fetch */
/*-----------------------------------------------------------------*/
}
hc08_freeReg (hc08_reg_hx);
-
}
-
+#endif
/*-----------------------------------------------------------------*/
/* genFarPointerGet - get value from far space */
freeAsmop (NULL, derefaop, ic, TRUE);
}
+#if 0
/*-----------------------------------------------------------------*/
/* genNearPointerSet - emitcode for near pointer put */
/*-----------------------------------------------------------------*/
hc08_freeReg (hc08_reg_hx);
}
-
+#endif
/*-----------------------------------------------------------------*/
/* genFarPointerSet - set value from far space */