+2007-02-07 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * src/mcs51/gen.c (aopPut): use direct name for pushing registers
+ * src/SDCCmain.c (parseCmdLine): dbuf_s path must be initialised
+
2007-02-07 Raphael Neider <rneider AT web.de>
* src/pic16/devices.inc,
{
struct dbuf_s path;
- if (*dstPath != '\0')
+ if (*dstPath != '\0')
{
+ dbuf_init(&path, 128);
dbuf_makePath (&path, dstPath, moduleNameBase);
dbuf_c_str (&path);
dstFileName = dbuf_detach (&path);
case AOP_STK:
if (strcmp (s, "a") == 0)
- emitcode ("push", "acc");
- else
- if (*s=='@') {
+ {
+ emitcode ("push", "acc");
+ }
+ else if (*s=='@')
+ {
MOVA(s);
emitcode ("push", "acc");
- } else {
+ }
+ else if (strcmp (s, "r0") == 0 ||
+ strcmp (s, "r1") == 0 ||
+ strcmp (s, "r2") == 0 ||
+ strcmp (s, "r3") == 0 ||
+ strcmp (s, "r4") == 0 ||
+ strcmp (s, "r5") == 0 ||
+ strcmp (s, "r6") == 0 ||
+ strcmp (s, "r7") == 0)
+ {
+ char buffer[10];
+ SNPRINTF (buffer, sizeof(buffer), "a%s", s);
+ emitcode ("push", buffer);
+ }
+ else
+ {
emitcode ("push", s);
}