* src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through...
[fw/sdcc] / src / z80 / mappings.i
index f8bc23864643a0e093f2580fcf2cdbccabe3c24f..319afdd1190fe44d3e1a0878911cc15601fc7d86 100644 (file)
@@ -15,10 +15,20 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
     { "enter", "" },
     { "enterx", 
       "lda sp,-%d(sp)" },
+    { "enterxl",
+                "ld hl,#-%d\n"
+                "\tadd\thl,sp\n"
+                "\tld\tsp,hl"
+    },
     { "leave", ""
     },
     { "leavex", "lda sp,%d(sp)"
     },
+    { "leavexl",
+                "ld hl,#%d\n"
+                "\tadd\thl,sp\n"
+                "\tld\tsp,hl"
+    },
     { "pusha", 
       "push af\n"
       "\tpush bc\n"
@@ -27,6 +37,14 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
     },
     { "adjustsp", "lda sp,-%d(sp)" },
     { "fileprelude", "" },
+    { "profileenter",
+                "ld a,#3\n"
+                "\trst\t0x08"
+    },
+    { "profileexit",
+                "ld a,#4\n"
+                "\trst\t0x08"
+    },
     { NULL, NULL }
 };
 
@@ -62,7 +80,8 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
                "\tadd\tix,sp\n"
                "\tld\thl,#-%d\n"
                "\tadd\thl,sp\n"
-               "\tld\tsp,hl" },
+               "\tld\tsp,hl\n" 
+        },
     { "leave", 
                "pop\tix\n"
     },
@@ -77,6 +96,14 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
                "\tpush\thl"
     },
     { "adjustsp", "lda sp,-%d(sp)" },
+    { "profileenter",
+                "ld a,#3\n"
+                "\trst\t0x08"
+    },
+    { "profileexit",
+                "ld a,#4\n"
+                "\trst\t0x08"
+    },
     { NULL, NULL }
 };