Skip to content

Commit

Permalink
MSVC tooling updates (capstone-engine#1651)
Browse files Browse the repository at this point in the history
* Update solution, remove non-existent test_basic

* Add property sheet to set platform toolset correctly

* use property sheet in all projects

* cast explicitly to avoid warnings

* make property sheet optional

* Conflcting options "Edit and continue" and "optref" caused warnings

Co-authored-by: Hauke Mönck <>
  • Loading branch information
hmoenck authored Mar 7, 2021
1 parent 63accbd commit c59d62f
Show file tree
Hide file tree
Showing 21 changed files with 3,316 additions and 3,270 deletions.
10 changes: 5 additions & 5 deletions arch/Sparc/SparcInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static void printOperand(MCInst *MI, int opNum, SStream *O)
case SP_BPFCCA:
case SP_BPFCCANT:
case SP_BPFCCNT:
Imm = SignExtend32(Imm, 19);
Imm = SignExtend32((uint32_t)Imm, 19);
Imm = MI->address + Imm * 4;
break;

Expand All @@ -229,7 +229,7 @@ static void printOperand(MCInst *MI, int opNum, SStream *O)
case SP_BCONDA:
case SP_FBCOND:
case SP_FBCONDA:
Imm = SignExtend32(Imm, 22);
Imm = SignExtend32((uint32_t)Imm, 22);
Imm = MI->address + Imm * 4;
break;

Expand Down Expand Up @@ -258,16 +258,16 @@ static void printOperand(MCInst *MI, int opNum, SStream *O)
case SP_BPZapt:
case SP_BPZnapn:
case SP_BPZnapt:
Imm = SignExtend32(Imm, 16);
Imm = SignExtend32((uint32_t)Imm, 16);
Imm = MI->address + Imm * 4;
break;
}

printInt64(O, Imm);

if (MI->csh->detail) {
if (MI->csh->doing_mem) {
MI->flat_insn->detail->sparc.operands[MI->flat_insn->detail->sparc.op_count].mem.disp = Imm;
MI->flat_insn->detail->sparc.operands[MI->flat_insn->detail->sparc.op_count].mem.disp = (uint32_t)Imm;
} else {
MI->flat_insn->detail->sparc.operands[MI->flat_insn->detail->sparc.op_count].type = SPARC_OP_IMM;
MI->flat_insn->detail->sparc.operands[MI->flat_insn->detail->sparc.op_count].imm = Imm;
Expand Down
6 changes: 3 additions & 3 deletions arch/SystemZ/SystemZInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,16 @@ static void printBDRAddrOperand(MCInst *MI, int OpNum, SStream *O)
SStream_concat(O, "%"PRIu64, Disp);

SStream_concat0(O, "(");
SStream_concat(O, "%%%s", getRegisterName(Length));
SStream_concat(O, "%%%s", getRegisterName((unsigned int)Length));

if (Base)
SStream_concat(O, ", %%%s", getRegisterName(Base));
SStream_concat0(O, ")");

if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_MEM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register(Base);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.length = (uint8_t)SystemZ_map_register(Length);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register((unsigned int)Base);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.length = (uint8_t)SystemZ_map_register((unsigned int)Length);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.disp = (int64_t)Disp;
MI->flat_insn->detail->sysz.op_count++;
}
Expand Down
484 changes: 238 additions & 246 deletions msvc/capstone.sln

Large diffs are not rendered by default.

423 changes: 213 additions & 210 deletions msvc/capstone_dll/capstone_dll.vcxproj

Large diffs are not rendered by default.

401 changes: 202 additions & 199 deletions msvc/capstone_static/capstone_static.vcxproj

Large diffs are not rendered by default.

353 changes: 178 additions & 175 deletions msvc/capstone_static_winkernel/capstone_static_winkernel.vcxproj

Large diffs are not rendered by default.

349 changes: 176 additions & 173 deletions msvc/cstool/cstool.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_arm/test_arm.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_arm64/test_arm64.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_customized_mnem/test_customized_mnem.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_detail/test_detail.vcxproj

Large diffs are not rendered by default.

331 changes: 167 additions & 164 deletions msvc/test_iter/test_iter.vcxproj

Large diffs are not rendered by default.

331 changes: 167 additions & 164 deletions msvc/test_m68k/test_m68k.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_mips/test_mips.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_ppc/test_ppc.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_skipdata/test_skipdata.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_sparc/test_sparc.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_systemz/test_systemz.vcxproj

Large diffs are not rendered by default.

279 changes: 141 additions & 138 deletions msvc/test_winkernel/test_winkernel.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_x86/test_x86.vcxproj

Large diffs are not rendered by default.

329 changes: 166 additions & 163 deletions msvc/test_xcore/test_xcore.vcxproj

Large diffs are not rendered by default.

0 comments on commit c59d62f

Please sign in to comment.