mirror of
https://github.com/cc65/cc65.git
synced 2025-02-09 17:33:00 +00:00
Inline shifts in g_asl as is already the case in g_scale.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3987 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
043acb1d98
commit
66391bfc25
@ -387,8 +387,8 @@ void g_defimport (const char* Name, int ZP)
|
|||||||
|
|
||||||
void g_importstartup (void)
|
void g_importstartup (void)
|
||||||
/* Forced import of the startup segment */
|
/* Forced import of the startup segment */
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
AddTextLine ("\t.forceimport\t__STARTUP_RUN__");
|
AddTextLine ("\t.forceimport\t__STARTUP_RUN__");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -3119,11 +3119,20 @@ void g_asl (unsigned flags, unsigned long val)
|
|||||||
/* Done */
|
/* Done */
|
||||||
return;
|
return;
|
||||||
} else if (val >= 1 && val <= 4) {
|
} else if (val >= 1 && val <= 4) {
|
||||||
if (flags & CF_UNSIGNED) {
|
if (IS_Get (&CodeSizeFactor) >= (long) (val+1)*130) {
|
||||||
AddCodeLine ("jsr shlax%ld", val);
|
AddCodeLine ("stx tmp1");
|
||||||
} else {
|
while (val--) {
|
||||||
AddCodeLine ("jsr aslax%ld", val);
|
AddCodeLine ("asl a");
|
||||||
}
|
AddCodeLine ("rol tmp1");
|
||||||
|
}
|
||||||
|
AddCodeLine ("ldx tmp1");
|
||||||
|
} else {
|
||||||
|
if (flags & CF_UNSIGNED) {
|
||||||
|
AddCodeLine ("jsr shlax%ld", val);
|
||||||
|
} else {
|
||||||
|
AddCodeLine ("jsr aslax%ld", val);
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user