Some more opcodes.
authorDavid Given <dg@cowlark.com>
Sat, 15 Oct 2016 09:22:40 +0000 (11:22 +0200)
committerDavid Given <dg@cowlark.com>
Sat, 15 Oct 2016 09:22:40 +0000 (11:22 +0200)
mach/proto/mcg/treebuilder.c

index 4060b20..c2083b8 100644 (file)
@@ -504,6 +504,23 @@ static void insn_ivalue(int opcode, arith value)
             );
             break;
 
+        case op_lof:
+        {
+            struct ir* ptr = pop(EM_pointersize);
+
+            push(
+                new_ir1(
+                    IR_LOAD, EM_wordsize,
+                    new_ir2(
+                        IR_ADD, EM_pointersize,
+                        ptr,
+                        new_wordir(value)
+                    )
+                )
+            );
+            break;
+        }
+
         case op_sti:
         {
             struct ir* ptr = pop(EM_pointersize);
@@ -518,6 +535,25 @@ static void insn_ivalue(int opcode, arith value)
             break;
         }
 
+        case op_stf:
+        {
+            struct ir* ptr = pop(EM_pointersize);
+            struct ir* val = pop(value);
+
+            appendir(
+                new_ir2(
+                    IR_STORE, EM_wordsize,
+                    new_ir2(
+                        IR_ADD, EM_pointersize,
+                        ptr,
+                        new_wordir(value)
+                    ),
+                    val
+                )
+            );
+            break;
+        }
+
         case op_cmi:
             push(
                 tristate_compare(value, IR_COMPARES)