More opcodes.
authorDavid Given <dg@cowlark.com>
Sat, 29 Oct 2016 11:32:09 +0000 (13:32 +0200)
committerDavid Given <dg@cowlark.com>
Sat, 29 Oct 2016 11:32:09 +0000 (13:32 +0200)
mach/proto/mcg/parse_em.c
mach/proto/mcg/treebuilder.c

index 26754b1..4644d3a 100644 (file)
@@ -249,6 +249,7 @@ static void parse_pseu(void)
                     break;
 
                 case sof_ptyp:
+                case pro_ptyp:
                     data_offset(strdup(em.em_dnam), em.em_off, ro);
                     break;
 
index 1d0c408..b0ef5ba 100644 (file)
@@ -806,6 +806,16 @@ static void insn_ivalue(int opcode, arith value)
             );
             break;
 
+        case op_lae:
+            push(
+                new_ir2(
+                    IR_ADD, EM_pointersize,
+                    new_labelir(".hol0"),
+                    new_wordir(value)
+                )
+            );
+            break;
+
         case op_ste:
             appendir(
                 store(
@@ -1013,6 +1023,15 @@ static void insn_ivalue(int opcode, arith value)
             break;
         }
 
+        case op_exg:
+        {
+            struct ir* v1 = pop(value);
+            struct ir* v2 = pop(value);
+            push(v1);
+            push(v2);
+            break;
+        }
+
         case op_asp:
         {
             switch (value)
@@ -1260,6 +1279,10 @@ static void insn_ivalue(int opcode, arith value)
                     );
                     break;
 
+                case 2:
+                    helper_function(".unimplemented_lor_2");
+                    break;
+
                 default:
                     fatal("'lor %d' not supported", value);
             }
@@ -1289,6 +1312,10 @@ static void insn_ivalue(int opcode, arith value)
                     );
                     break;
 
+                case 2:
+                    helper_function(".unimplemented_str_2");
+                    break;
+
                 default:
                     fatal("'str %d' not supported", value);
             }