UNPKG

m68kdecode

Version:

Port of deplinenoise/m68kdecode to Typescript

265 lines 9.08 kB
"use strict"; /* eslint-disable @typescript-eslint/ban-types */ Object.defineProperty(exports, "__esModule", { value: true }); exports.FloatFormat = exports.PackAdjustment = exports.FPCondition = exports.Condition = exports.Bitfield = exports.FPF_BYTE_INT = exports.FPF_DOUBLE = exports.FPF_WORD_INT = exports.FPF_PACKED_DECIMAL_REAL_DYNAMIC = exports.FPF_PACKED_DECIMAL_REAL_STATIC = exports.FPF_EXTENDED_REAL = exports.FPF_SINGLE = exports.FPF_LONG_INT = exports.FPConditionCode = exports.ConditionCode = exports.DYNAMIC = exports.STATIC = exports.CONTROLREG = exports.REGLIST = exports.FPAIR = exports.DPAIR = exports.DISP = exports.PCDISP = exports.ARDISP = exports.ARDEC = exports.ARINC = exports.ARIND = exports.FR = exports.AR = exports.DR = exports.ABS32 = exports.ABS16 = exports.IMM32 = exports.IMM16 = exports.IMM8 = exports.Implied = exports.ARIndexer = exports.DRIndexer = void 0; // Indexer factories const DRIndexer = (reg, scale) => ({ kind: "DR", reg, scale, }); exports.DRIndexer = DRIndexer; const ARIndexer = (reg, scale) => ({ kind: "AR", reg, scale, }); exports.ARIndexer = ARIndexer; // Operand factories const Implied = () => ({ kind: "Implied" }); exports.Implied = Implied; const IMM8 = (value) => ({ kind: "IMM8", value }); exports.IMM8 = IMM8; const IMM16 = (value) => ({ kind: "IMM16", value }); exports.IMM16 = IMM16; const IMM32 = (value) => ({ kind: "IMM32", value }); exports.IMM32 = IMM32; const ABS16 = (value) => ({ kind: "ABS16", value }); exports.ABS16 = ABS16; const ABS32 = (value) => ({ kind: "ABS32", value }); exports.ABS32 = ABS32; const DR = (reg) => ({ kind: "DR", reg }); exports.DR = DR; const AR = (reg) => ({ kind: "AR", reg }); exports.AR = AR; const FR = (reg) => ({ kind: "FR", reg }); exports.FR = FR; const ARIND = (reg) => ({ kind: "ARIND", reg, }); exports.ARIND = ARIND; const ARINC = (reg) => ({ kind: "ARINC", reg, }); exports.ARINC = ARINC; const ARDEC = (reg) => ({ kind: "ARDEC", reg, }); exports.ARDEC = ARDEC; const ARDISP = (reg, disp) => ({ kind: "ARDISP", reg, disp, }); exports.ARDISP = ARDISP; const PCDISP = (offset, disp) => ({ kind: "PCDISP", offset, disp, }); exports.PCDISP = PCDISP; const DISP = (disp) => ({ kind: "DISP", disp }); exports.DISP = DISP; const DPAIR = (reg1, reg2) => ({ kind: "DPAIR", reg1, reg2, }); exports.DPAIR = DPAIR; const FPAIR = (reg1, reg2) => ({ kind: "FPAIR", reg1, reg2, }); exports.FPAIR = FPAIR; const REGLIST = (bitmask) => ({ kind: "REGLIST", bitmask, }); exports.REGLIST = REGLIST; const CONTROLREG = (reg) => ({ kind: "CONTROLREG", reg, }); exports.CONTROLREG = CONTROLREG; // BitfieldData factories: const STATIC = (value) => ({ kind: "STATIC", value, }); exports.STATIC = STATIC; const DYNAMIC = (reg) => ({ kind: "DYNAMIC", reg, }); exports.DYNAMIC = DYNAMIC; /// A CPU condition code from the CCR var ConditionCode; (function (ConditionCode) { /// Always True ConditionCode[ConditionCode["CC_T"] = 0] = "CC_T"; /// Always False ConditionCode[ConditionCode["CC_F"] = 1] = "CC_F"; /// High ConditionCode[ConditionCode["CC_HI"] = 2] = "CC_HI"; /// Low or Same ConditionCode[ConditionCode["CC_LS"] = 3] = "CC_LS"; /// Carry Clear ConditionCode[ConditionCode["CC_CC"] = 4] = "CC_CC"; /// Carry Set ConditionCode[ConditionCode["CC_CS"] = 5] = "CC_CS"; /// Not Equal ConditionCode[ConditionCode["CC_NE"] = 6] = "CC_NE"; /// Equal ConditionCode[ConditionCode["CC_EQ"] = 7] = "CC_EQ"; /// Overflow Clear ConditionCode[ConditionCode["CC_VC"] = 8] = "CC_VC"; /// Overflow Set ConditionCode[ConditionCode["CC_VS"] = 9] = "CC_VS"; /// Plus ConditionCode[ConditionCode["CC_PL"] = 10] = "CC_PL"; /// Negative ConditionCode[ConditionCode["CC_MI"] = 11] = "CC_MI"; /// Greater or Equal ConditionCode[ConditionCode["CC_GE"] = 12] = "CC_GE"; /// Less ConditionCode[ConditionCode["CC_LT"] = 13] = "CC_LT"; /// Greater ConditionCode[ConditionCode["CC_GT"] = 14] = "CC_GT"; /// Less or Equal ConditionCode[ConditionCode["CC_LE"] = 15] = "CC_LE"; })(ConditionCode = exports.ConditionCode || (exports.ConditionCode = {})); /// A FPU condition code var FPConditionCode; (function (FPConditionCode) { /// False FPConditionCode[FPConditionCode["FPCC_F"] = 0] = "FPCC_F"; /// Equal FPConditionCode[FPConditionCode["FPCC_EQ"] = 1] = "FPCC_EQ"; /// Ordered Greater Than FPConditionCode[FPConditionCode["FPCC_OGT"] = 2] = "FPCC_OGT"; /// Ordered Greater Than or Equal FPConditionCode[FPConditionCode["FPCC_OGE"] = 3] = "FPCC_OGE"; /// Ordered Less Than FPConditionCode[FPConditionCode["FPCC_OLT"] = 4] = "FPCC_OLT"; /// Ordered Less Than or Equal FPConditionCode[FPConditionCode["FPCC_OLE"] = 5] = "FPCC_OLE"; /// Ordered Greater Than or Less Than FPConditionCode[FPConditionCode["FPCC_OGL"] = 6] = "FPCC_OGL"; /// Ordered FPConditionCode[FPConditionCode["FPCC_OR"] = 7] = "FPCC_OR"; /// Unordered FPConditionCode[FPConditionCode["FPCC_UN"] = 8] = "FPCC_UN"; /// Unordered or Equal FPConditionCode[FPConditionCode["FPCC_UEQ"] = 9] = "FPCC_UEQ"; /// Unordered or Greater Than FPConditionCode[FPConditionCode["FPCC_UGT"] = 10] = "FPCC_UGT"; /// Unordered or Greater Than or Equal FPConditionCode[FPConditionCode["FPCC_UGE"] = 11] = "FPCC_UGE"; /// Unordered or Less Than FPConditionCode[FPConditionCode["FPCC_ULT"] = 12] = "FPCC_ULT"; /// Unordered or Less Than or Equal FPConditionCode[FPConditionCode["FPCC_ULE"] = 13] = "FPCC_ULE"; /// Not Equal FPConditionCode[FPConditionCode["FPCC_NE"] = 14] = "FPCC_NE"; /// True FPConditionCode[FPConditionCode["FPCC_T"] = 15] = "FPCC_T"; /// Signaling False FPConditionCode[FPConditionCode["FPCC_SF"] = 16] = "FPCC_SF"; /// Signaling Equal FPConditionCode[FPConditionCode["FPCC_SEQ"] = 17] = "FPCC_SEQ"; /// Greater Than FPConditionCode[FPConditionCode["FPCC_GT"] = 18] = "FPCC_GT"; /// Greater Than or Equal FPConditionCode[FPConditionCode["FPCC_GE"] = 19] = "FPCC_GE"; /// Less Than FPConditionCode[FPConditionCode["FPCC_LT"] = 20] = "FPCC_LT"; /// Less Than or Equal FPConditionCode[FPConditionCode["FPCC_LE"] = 21] = "FPCC_LE"; /// Greater Than or Less Than FPConditionCode[FPConditionCode["FPCC_GL"] = 22] = "FPCC_GL"; /// Greater Than or Less Than or Equal FPConditionCode[FPConditionCode["FPCC_GLE"] = 23] = "FPCC_GLE"; /// Not (Greater Than or Less Than or Equal) FPConditionCode[FPConditionCode["FPCC_NGLE"] = 24] = "FPCC_NGLE"; /// Not (Greater Than or Less Than) FPConditionCode[FPConditionCode["FPCC_NGL"] = 25] = "FPCC_NGL"; /// Not (Less Than or Equal) FPConditionCode[FPConditionCode["FPCC_NLE"] = 26] = "FPCC_NLE"; /// Not (Less Than) FPConditionCode[FPConditionCode["FPCC_NLT"] = 27] = "FPCC_NLT"; /// Not (Greater Than or Equal) FPConditionCode[FPConditionCode["FPCC_NGE"] = 28] = "FPCC_NGE"; /// Not (Greater Than) FPConditionCode[FPConditionCode["FPCC_NGT"] = 29] = "FPCC_NGT"; /// Signaling Not Equal FPConditionCode[FPConditionCode["FPCC_SNE"] = 30] = "FPCC_SNE"; /// Signaling True FPConditionCode[FPConditionCode["FPCC_ST"] = 31] = "FPCC_ST"; })(FPConditionCode = exports.FPConditionCode || (exports.FPConditionCode = {})); // FPFormat factories const FPF_LONG_INT = () => ({ kind: "FPF_LONG_INT", }); exports.FPF_LONG_INT = FPF_LONG_INT; const FPF_SINGLE = () => ({ kind: "FPF_SINGLE", }); exports.FPF_SINGLE = FPF_SINGLE; const FPF_EXTENDED_REAL = () => ({ kind: "FPF_EXTENDED_REAL", }); exports.FPF_EXTENDED_REAL = FPF_EXTENDED_REAL; const FPF_PACKED_DECIMAL_REAL_STATIC = (fmove) => ({ kind: "FPF_PACKED_DECIMAL_REAL_STATIC", fmove, }); exports.FPF_PACKED_DECIMAL_REAL_STATIC = FPF_PACKED_DECIMAL_REAL_STATIC; const FPF_PACKED_DECIMAL_REAL_DYNAMIC = (fmove) => ({ kind: "FPF_PACKED_DECIMAL_REAL_DYNAMIC", fmove, }); exports.FPF_PACKED_DECIMAL_REAL_DYNAMIC = FPF_PACKED_DECIMAL_REAL_DYNAMIC; const FPF_WORD_INT = () => ({ kind: "FPF_WORD_INT", }); exports.FPF_WORD_INT = FPF_WORD_INT; const FPF_DOUBLE = () => ({ kind: "FPF_DOUBLE", }); exports.FPF_DOUBLE = FPF_DOUBLE; const FPF_BYTE_INT = () => ({ kind: "FPF_BYTE_INT", }); exports.FPF_BYTE_INT = FPF_BYTE_INT; // InstructionExtra factories const Bitfield = (offset, width) => ({ kind: "Bitfield", offset, width, }); exports.Bitfield = Bitfield; const Condition = (code) => ({ kind: "Condition", code, }); exports.Condition = Condition; const FPCondition = (code) => ({ kind: "FPCondition", code, }); exports.FPCondition = FPCondition; const PackAdjustment = (value) => ({ kind: "PackAdjustment", value, }); exports.PackAdjustment = PackAdjustment; const FloatFormat = (format) => ({ kind: "FloatFormat", format, }); exports.FloatFormat = FloatFormat; //# sourceMappingURL=types.js.map