Codebase list asmjit / cce0ab3
New upstream version 0.0~git20221210.5b5b0b3 Andrius Merkys 1 year, 4 months ago
6 changed file(s) with 36 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
9999 - { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
100100 - { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
101101
102 - { title: "macos-11.0" , os: "macos-11.0" , cc: "gcc-10" , arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
103 - { title: "macos-11.0" , os: "macos-11.0" , cc: "gcc-10" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
104 - { title: "macos-11.0" , os: "macos-11.0" , cc: "clang" , arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
105 - { title: "macos-11.0" , os: "macos-11.0" , cc: "clang" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
102 - { title: "macos-11.0" , os: "macos-11.0" , cc: "gcc-10" , arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
103 - { title: "macos-11.0" , os: "macos-11.0" , cc: "gcc-10" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
104 - { title: "macos-11.0" , os: "macos-11.0" , cc: "clang" , arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
105 - { title: "macos-11.0" , os: "macos-11.0" , cc: "clang" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
106106
107107 - { title: "windows" , os: "windows-2019" , cc: "vs2019" , arch: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
108108 - { title: "windows" , os: "windows-2019" , cc: "vs2019" , arch: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
119119
120120 steps:
121121 - name: "Checkout"
122 uses: actions/checkout@v2
122 uses: actions/checkout@v3
123123 with:
124124 path: "source"
125125
126 - name: "Checkout build-actions"
127 run: git clone https://github.com/build-actions/build-actions.git build-actions --depth=1
126 - name: "Checkout Build Actions"
127 uses: actions/checkout@v3
128 with:
129 repository: build-actions/build-actions
130 path: "build-actions"
128131
129132 - name: "Python"
130 uses: actions/setup-python@v2
133 uses: actions/setup-python@v4
131134 with:
132135 python-version: "3.x"
133136
299299 INST(Ldurh , BaseRM_SImm9 , (0b0111100001000000000000, 0b0000000000000000000000, kW , kZR, 0 , 0) , kRWI_W , 0 , 9 , 2153), // #230
300300 INST(Ldursb , BaseRM_SImm9 , (0b0011100011000000000000, 0b0000000000000000000000, kWX, kZR, 22, 0) , kRWI_W , 0 , 10 , 2159), // #231
301301 INST(Ldursh , BaseRM_SImm9 , (0b0111100011000000000000, 0b0000000000000000000000, kWX, kZR, 22, 0) , kRWI_W , 0 , 11 , 2166), // #232
302 INST(Ldursw , BaseRM_SImm9 , (0b1011100010000000000000, 0b0000000000000000000000, kWX, kZR, 0 , 0) , kRWI_W , 0 , 12 , 2173), // #233
302 INST(Ldursw , BaseRM_SImm9 , (0b1011100010000000000000, 0b0000000000000000000000, kX, kZR, 0 , 0) , kRWI_W , 0 , 12 , 2173), // #233
303303 INST(Ldxp , BaseLdxp , (0b1000100001111111000000, kWX, 30) , kRWI_WW , 0 , 1 , 2180), // #234
304304 INST(Ldxr , BaseRM_NoImm , (0b1000100001011111011111, kWX, kZR, 30) , kRWI_W , 0 , 10 , 2185), // #235
305305 INST(Ldxrb , BaseRM_NoImm , (0b0000100001011111011111, kW , kZR, 0 ) , kRWI_W , 0 , 11 , 2190), // #236
12741274 { 0b0111100001000000000000, 0b0000000000000000000000, kW , kZR, 0 , 0 }, // ldurh
12751275 { 0b0011100011000000000000, 0b0000000000000000000000, kWX, kZR, 22, 0 }, // ldursb
12761276 { 0b0111100011000000000000, 0b0000000000000000000000, kWX, kZR, 22, 0 }, // ldursh
1277 { 0b1011100010000000000000, 0b0000000000000000000000, kWX, kZR, 0 , 0 }, // ldursw
1277 { 0b1011100010000000000000, 0b0000000000000000000000, kX, kZR, 0 , 0 }, // ldursw
12781278 { 0b1101100110100000000010, 0b1101100110100000000001, kX, kSP, 0, 4 }, // st2g
12791279 { 0b1101100100100000000010, 0b1101100100100000000001, kX, kSP, 0, 4 }, // stg
12801280 { 0b1011100000000000000010, 0b0000000000000000000000, kWX, kZR, 30, 0 }, // sttr
485485 //! Clones the memory operand and makes it post-index.
486486 inline Mem post() const noexcept {
487487 Mem result(*this);
488 result.setPredicate(kOffsetPreIndex);
488 result.setPredicate(kOffsetPostIndex);
489489 return result;
490490 }
491491
10811081 struct RegTraits<REG_TYPE> { \
10821082 typedef REG RegT; \
10831083 \
1084 enum : uint32_t { \
1085 kValid = uint32_t(true), \
1086 kCount = uint32_t(COUNT), \
1087 kType = uint32_t(REG_TYPE), \
1088 kGroup = uint32_t(GROUP), \
1089 kSize = uint32_t(SIZE), \
1090 kTypeId = uint32_t(TYPE_ID), \
1084 static constexpr uint32_t kValid = 1; \
1085 static constexpr uint32_t kCount = COUNT; \
1086 static constexpr RegType kType = REG_TYPE; \
1087 static constexpr RegGroup kGroup = GROUP; \
1088 static constexpr uint32_t kSize = SIZE; \
1089 static constexpr TypeId kTypeId = TYPE_ID; \
10911090 \
1092 kSignature = (OperandSignature::fromOpType(OperandType::kReg) | \
1093 OperandSignature::fromRegType(REG_TYPE) | \
1094 OperandSignature::fromRegGroup(GROUP) | \
1095 OperandSignature::fromSize(kSize)).bits(), \
1096 }; \
1091 static constexpr uint32_t kSignature = \
1092 (OperandSignature::fromOpType(OperandType::kReg) | \
1093 OperandSignature::fromRegType(kType) | \
1094 OperandSignature::fromRegGroup(kGroup) | \
1095 OperandSignature::fromSize(kSize)).bits(); \
1096 \
10971097 }
10981098
10991099 //! Adds constructors and member functions to a class that implements abstract register. Abstract register is register
11341134 //! signature.
11351135 #define ASMJIT_DEFINE_FINAL_REG(REG, BASE, TRAITS) \
11361136 public: \
1137 enum : uint32_t { \
1138 kThisType = TRAITS::kType, \
1139 kThisGroup = TRAITS::kGroup, \
1140 kThisSize = TRAITS::kSize, \
1141 kSignature = TRAITS::kSignature \
1142 }; \
1137 static constexpr RegType kThisType = TRAITS::kType; \
1138 static constexpr RegGroup kThisGroup = TRAITS::kGroup; \
1139 static constexpr uint32_t kThisSize = TRAITS::kSize; \
1140 static constexpr uint32_t kSignature = TRAITS::kSignature; \
11431141 \
11441142 ASMJIT_DEFINE_ABSTRACT_REG(REG, BASE) \
11451143 \
492492 static ASMJIT_FORCE_INLINE bool x86ShouldUseMovabs(Assembler* self, X86BufferWriter& writer, uint32_t regSize, InstOptions options, const Mem& rmRel) noexcept {
493493 if (self->is32Bit()) {
494494 // There is no relative addressing, just decide whether to use MOV encoded with MOD R/M or absolute.
495 return !Support::test(options, InstOptions::kX86_ModMR | InstOptions::kX86_ModMR);
495 return !Support::test(options, InstOptions::kX86_ModMR | InstOptions::kX86_ModRM);
496496 }
497497 else {
498498 // If the addressing type is REL or MOD R/M was specified then absolute mov won't be used.
499 if (rmRel.addrType() == Mem::AddrType::kRel || Support::test(options, InstOptions::kX86_ModMR))
499 if (rmRel.addrType() == Mem::AddrType::kRel || Support::test(options, InstOptions::kX86_ModMR | InstOptions::kX86_ModRM))
500500 return false;
501501
502502 int64_t addrValue = rmRel.offset();
745745 TEST_INSTRUCTION("411088B8", ldursw(x1, ptr(x2, 129)));
746746 TEST_INSTRUCTION("E10380B8", ldursw(x1, ptr(sp)));
747747 TEST_INSTRUCTION("E11388B8", ldursw(x1, ptr(sp, 129)));
748 TEST_INSTRUCTION("420080B8", ldursw(x2, ptr(x2)));
749 TEST_INSTRUCTION("421088B8", ldursw(x2, ptr(x2, 129)));
750 TEST_INSTRUCTION("E20380B8", ldursw(x2, ptr(sp)));
751 TEST_INSTRUCTION("E21388B8", ldursw(x2, ptr(sp, 129)));
748752 TEST_INSTRUCTION("61087F88", ldxp(w1, w2, ptr(x3)));
749753 TEST_INSTRUCTION("E10B7F88", ldxp(w1, w2, ptr(sp)));
750754 TEST_INSTRUCTION("61087FC8", ldxp(x1, x2, ptr(x3)));