* device/lib/Makefile.in: remove abspath for PORTDIR, introduced in
[fw/sdcc] / src / z80 / mappings.i
index ed734cecbf7988eda43beb4bc71c09fdb9559c5a..43d29afbb726fe089754411a2395c5ca127c33c1 100644 (file)
@@ -7,6 +7,7 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
     { "functionlabeldef", "%s:" },
     { "*hl", "(hl)" },
     { "di", "di" },
+    { "ei", "ei" },
     { "ldahli", "ld a,(hl+)" },
     { "ldahlsp", "lda hl,%d(sp)" },
     { "ldaspsp", "lda sp,%d(sp)" },
@@ -35,6 +36,12 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
       "\tpush de\n"
       "\tpush hl"
     },
+    { "popa", 
+      "pop hl\n"
+      "\tpop de\n"
+      "\tpop bc\n"
+      "\tpop af"
+    },
     { "adjustsp", "lda sp,-%d(sp)" },
     { "fileprelude", "" },
     { "profileenter",
@@ -54,10 +61,11 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
     { "areacode", ".area _%s" },
     { "areadata", ".area _%s" },
     { "areahome", ".area _%s" },
-    { "*ixx", "%d(ix)" },
-    { "*iyx", "%d(iy)" },
+    { "*ixx", "%d (ix)" },
+    { "*iyx", "%d (iy)" },
     { "*hl", "(hl)" },
     { "di", "di" },
+    { "ei", "ei" },
     { "ldahli", 
                "ld a,(hl)\n"
                "\tinc\thl" },
@@ -93,7 +101,15 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
                "push af\n"
                "\tpush\tbc\n"
                "\tpush\tde\n"
-               "\tpush\thl"
+               "\tpush\thl\n"
+               "\tpush\tiy"
+    },
+    { "popa",
+               "pop iy\n"
+               "\tpop\thl\n"
+               "\tpop\tde\n"
+               "\tpop\tbc\n"
+               "\tpop\taf"
     },
     { "adjustsp", "lda sp,-%d(sp)" },
     { "profileenter",
@@ -119,8 +135,7 @@ static const ASM_MAPPING _rgbds_mapping[] = {
       "\t; We have to define these here as sdcc dosnt make them global by default\n"
       "\tGLOBAL __mulschar\n"
       "\tGLOBAL __muluchar\n"
-      "\tGLOBAL __mulsint\n"
-      "\tGLOBAL __muluint\n"
+      "\tGLOBAL __mulint\n"
       "\tGLOBAL __divschar\n"
       "\tGLOBAL __divuchar\n"
       "\tGLOBAL __divsint\n"
@@ -129,7 +144,7 @@ static const ASM_MAPPING _rgbds_mapping[] = {
       "\tGLOBAL __moduchar\n"
       "\tGLOBAL __modsint\n"
       "\tGLOBAL __moduint\n"
-      "\tGLOBAL __mulslong\n"  
+      "\tGLOBAL __mullong\n"  
       "\tGLOBAL __modslong\n"  
       "\tGLOBAL __divslong\n"  
       "\tGLOBAL banked_call\n"
@@ -173,7 +188,14 @@ static const ASM_MAPPING _rgbds_gb_mapping[] = {
       "\tpush de\n"
       "\tpush hl"
     },
+    { "popa", 
+      "pop hl\n"
+      "\tpop de\n"
+      "\tpop bc\n"
+      "\tpop af"
+    },
     { "di", "di" },
+    { "ei", "ei" },
     { "adjustsp", "add sp,-%d" },
     { "enter", "" },
     { "enterx", "add sp,-%d"
@@ -205,11 +227,10 @@ static const ASM_MAPPING _isas_mapping[] = {
       "\tCAPSOFF      ; Case sensitive\n"
       "\tISDMG        ; Gameboy mode\n"
       "_CODE\tGROUP\n"
-      "\t; We have to define these here as sdcc dosnt make them global by default\n"
+      "\t; We have to define these here as sdcc doesnt make them global by default\n"
       "\tGLOBAL __mulschar\n"
       "\tGLOBAL __muluchar\n"
-      "\tGLOBAL __mulsint\n"
-      "\tGLOBAL __muluint\n"
+      "\tGLOBAL __mulint\n"
       "\tGLOBAL __divschar\n"
       "\tGLOBAL __divuchar\n"
       "\tGLOBAL __divsint\n"
@@ -259,7 +280,14 @@ static const ASM_MAPPING _isas_gb_mapping[] = {
       "\tpush de\n"
       "\tpush hl"
     },
+    { "popa", 
+      "pop hl\n"
+      "\tpop de\n"
+      "\tpop bc\n"
+      "\tpop af"
+    },
     { "di", "di" },
+    { "ei", "ei" },
     { "adjustsp", "add sp,-%d" },
     { "enter", "" },
     { "enterx", "add sp,-%d"
@@ -287,10 +315,8 @@ static const ASM_MAPPING _z80asm_mapping[] = {
         "; Generated using the z80asm/z88 tokens.\n"
         "\tXREF __muluchar_rrx_s\n"
         "\tXREF __mulschar_rrx_s\n"
-        "\tXREF __mulsint_rrx_s\n"
-        "\tXREF __muluint_rrx_s\n"
-        "\tXREF __mululong_rrx_s\n"
-        "\tXREF __mulslong_rrx_s\n"
+        "\tXREF __mulint_rrx_s\n"
+        "\tXREF __mullong_rrx_s\n"
         "\tXREF __divuchar_rrx_s\n"
         "\tXREF __divschar_rrx_s\n"
         "\tXREF __divsint_rrx_s\n"
@@ -339,6 +365,7 @@ static const ASM_MAPPING _z80asm_z80_mapping[] = {
     { "*iyx", "(iy%+d)" },
     { "*hl", "(hl)" },
     { "di", "di" },
+    { "ei", "ei" },
     { "ldahli", 
                "ld a,(hl)\n"
                "\tinc\thl" },
@@ -374,7 +401,15 @@ static const ASM_MAPPING _z80asm_z80_mapping[] = {
                "push af\n"
                "\tpush\tbc\n"
                "\tpush\tde\n"
-               "\tpush\thl"
+               "\tpush\thl\n"
+               "\tpush\tiy"
+    },
+    { "popa", 
+               "pop\tiy\n"
+               "\tpop\thl\n"
+               "\tpop\tde\n"
+               "\tpop\tbc\n"
+               "\tpop\taf"
     },
     { "adjustsp", "lda sp,(sp%+d)" },
     { "profileenter",