* Optimised many of the library functions
[fw/sdcc] / src / z80 / mappings.i
index f8bc23864643a0e093f2580fcf2cdbccabe3c24f..d2887dc19a6f42205bc416525cd217368248b029 100644 (file)
@@ -27,6 +27,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 +70,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 +86,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 }
 };