Skip to content

Commit

Permalink
i forgot
Browse files Browse the repository at this point in the history
  • Loading branch information
cetio committed Jun 20, 2024
1 parent 1f86208 commit ac30a53
Show file tree
Hide file tree
Showing 2 changed files with 649 additions and 199 deletions.
16 changes: 10 additions & 6 deletions source/fnc/emission/ir.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module fnc.emission.ir;
import gallinule.x86;
import fnc.symbols;
import std.traits;
import tern.meta;

public enum OpCode : ushort
{
Expand Down Expand Up @@ -237,6 +238,7 @@ public enum OpCode : ushort
ANDN,
//
ECREATE,
EADD,
EINIT,
EREMOVE,
EDBGRD,
Expand All @@ -259,6 +261,7 @@ public enum OpCode : ushort
EREPORT,
EGETKEY,
EENTER,
ERESUME,
EEXIT,
EACCEPT,
EMODPE,
Expand Down Expand Up @@ -647,8 +650,6 @@ public enum OpCode : ushort
PAUSE,
SWAPGS,

LOCK,

WAIT,
FWAIT,

Expand Down Expand Up @@ -821,7 +822,8 @@ public enum Details
ZERO = 1 << 20,
NZERO = 1 << 21,
TAKEN = 1 << 22,
NOT_TAKEN = 1 << 23
NOT_TAKEN = 1 << 23,
LOCK = 1 << 24,
}

public enum Kind : ubyte
Expand Down Expand Up @@ -940,7 +942,7 @@ final:
Marker second() => operands[1];
Marker third() => operands[2];

bool markFormat(FMT...)()
bool format(FMT...)()
{
if (FMT.length != operands.length)
return false;
Expand Down Expand Up @@ -1078,7 +1080,7 @@ final:
// TODO: Floats, add more flags??
case AAD:
case AAM:
if (markFormat!(Literal))
if (format!(Literal))
details = detail("ra");
else
details = detail("a");
Expand All @@ -1087,7 +1089,7 @@ final:
case JCC:
case LOOPCC:
case CALL:
if (markFormat!(RM))
if (format!(RM))
details = detail("r");
break;
case ADD:
Expand Down Expand Up @@ -1270,6 +1272,7 @@ final:
case CRIDVME:
case CRIDVMXE:
case ECREATE:
case EADD:
case EINIT:
case EREMOVE:
case EDBGRD:
Expand All @@ -1291,6 +1294,7 @@ final:
case EREPORT:
case EGETKEY:
case EENTER:
case ERESUME:
case EEXIT:
case EACCEPT:
case EMODPE:
Expand Down
Loading

0 comments on commit ac30a53

Please sign in to comment.