Fixing warnings under the new VC++.
This commit is contained in:
@@ -114,7 +114,7 @@ uint32_t AllocDynamicRegister(TranslationContext& ctx, Value* value) {
|
||||
} else {
|
||||
value->flags |= VALUE_IS_ALLOCATED;
|
||||
auto reg = ctx.register_count++;
|
||||
value->tag = reinterpret_cast<void*>(reg);
|
||||
value->tag = reinterpret_cast<void*>(static_cast<uintptr_t>(reg));
|
||||
return (uint32_t)reg;
|
||||
}
|
||||
}
|
||||
@@ -3179,8 +3179,8 @@ uint32_t IntCode_NEG_F64(IntCodeState& ics, const IntCode* i) {
|
||||
uint32_t IntCode_NEG_V128(IntCodeState& ics, const IntCode* i) {
|
||||
const vec128_t& src1 = ics.rf[i->src1_reg].v128;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.f32[i] = -src1.f32[i];
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.f32[j] = -src1.f32[j];
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
@@ -3219,8 +3219,8 @@ uint32_t IntCode_ABS_F64(IntCodeState& ics, const IntCode* i) {
|
||||
uint32_t IntCode_ABS_V128(IntCodeState& ics, const IntCode* i) {
|
||||
const vec128_t& src1 = ics.rf[i->src1_reg].v128;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.f32[i] = abs(src1.f32[i]);
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.f32[j] = abs(src1.f32[j]);
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
@@ -3275,8 +3275,8 @@ uint32_t IntCode_SQRT_F64(IntCodeState& ics, const IntCode* i) {
|
||||
uint32_t IntCode_SQRT_V128(IntCodeState& ics, const IntCode* i) {
|
||||
const vec128_t& src1 = ics.rf[i->src1_reg].v128;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.f32[i] = sqrt(src1.f32[i]);
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.f32[j] = sqrt(src1.f32[j]);
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
@@ -3317,8 +3317,8 @@ uint32_t IntCode_POW2_F64(IntCodeState& ics, const IntCode* i) {
|
||||
uint32_t IntCode_POW2_V128(IntCodeState& ics, const IntCode* i) {
|
||||
const vec128_t& src1 = ics.rf[i->src1_reg].v128;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.f32[i] = (float)pow(2, src1.f32[i]);
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.f32[j] = (float)pow(2, src1.f32[j]);
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
@@ -3342,8 +3342,8 @@ uint32_t IntCode_LOG2_F64(IntCodeState& ics, const IntCode* i) {
|
||||
uint32_t IntCode_LOG2_V128(IntCodeState& ics, const IntCode* i) {
|
||||
const vec128_t& src1 = ics.rf[i->src1_reg].v128;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.f32[i] = log2(src1.f32[i]);
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.f32[j] = log2(src1.f32[j]);
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
@@ -3911,32 +3911,32 @@ int Translate_INSERT(TranslationContext& ctx, Instr* i) {
|
||||
uint32_t IntCode_SPLAT_V128_INT8(IntCodeState& ics, const IntCode* i) {
|
||||
int8_t src1 = ics.rf[i->src1_reg].i8;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
dest.u8[i] = src1;
|
||||
for (size_t j = 0; j < 16; j++) {
|
||||
dest.u8[j] = src1;
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
uint32_t IntCode_SPLAT_V128_INT16(IntCodeState& ics, const IntCode* i) {
|
||||
int16_t src1 = ics.rf[i->src1_reg].i16;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 8; i++) {
|
||||
dest.u16[i] = src1;
|
||||
for (size_t j = 0; j < 8; j++) {
|
||||
dest.u16[j] = src1;
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
uint32_t IntCode_SPLAT_V128_INT32(IntCodeState& ics, const IntCode* i) {
|
||||
int32_t src1 = ics.rf[i->src1_reg].i32;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.u32[i] = src1;
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.u32[j] = src1;
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
uint32_t IntCode_SPLAT_V128_FLOAT32(IntCodeState& ics, const IntCode* i) {
|
||||
float src1 = ics.rf[i->src1_reg].f32;
|
||||
vec128_t& dest = ics.rf[i->dest_reg].v128;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
dest.f32[i] = src1;
|
||||
for (size_t j = 0; j < 4; j++) {
|
||||
dest.f32[j] = src1;
|
||||
}
|
||||
return IA_NEXT;
|
||||
}
|
||||
|
||||
@@ -1548,7 +1548,7 @@ EMITTER(STORE_I8, MATCH(I<OPCODE_STORE, VoidOp, I64<>, I8<>>)) {
|
||||
e.mov(e.byte[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.mov(e.r8b, e.byte[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreI8));
|
||||
@@ -1564,7 +1564,7 @@ EMITTER(STORE_I16, MATCH(I<OPCODE_STORE, VoidOp, I64<>, I16<>>)) {
|
||||
e.mov(e.word[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.mov(e.r8w, e.word[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreI16));
|
||||
@@ -1580,7 +1580,7 @@ EMITTER(STORE_I32, MATCH(I<OPCODE_STORE, VoidOp, I64<>, I32<>>)) {
|
||||
e.mov(e.dword[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.mov(e.r8d, e.dword[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreI32));
|
||||
@@ -1596,7 +1596,7 @@ EMITTER(STORE_I64, MATCH(I<OPCODE_STORE, VoidOp, I64<>, I64<>>)) {
|
||||
e.mov(e.qword[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.mov(e.r8, e.qword[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreI64));
|
||||
@@ -1612,7 +1612,7 @@ EMITTER(STORE_F32, MATCH(I<OPCODE_STORE, VoidOp, I64<>, F32<>>)) {
|
||||
e.vmovss(e.dword[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.lea(e.r8, e.ptr[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreF32));
|
||||
@@ -1628,7 +1628,7 @@ EMITTER(STORE_F64, MATCH(I<OPCODE_STORE, VoidOp, I64<>, F64<>>)) {
|
||||
e.vmovsd(e.qword[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.lea(e.r8, e.ptr[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreF64));
|
||||
@@ -1645,7 +1645,7 @@ EMITTER(STORE_V128, MATCH(I<OPCODE_STORE, VoidOp, I64<>, V128<>>)) {
|
||||
e.vmovaps(e.ptr[addr], i.src2);
|
||||
}
|
||||
if (IsTracingData()) {
|
||||
auto addr = ComputeMemoryAddress(e, i.src1);
|
||||
addr = ComputeMemoryAddress(e, i.src1);
|
||||
e.lea(e.r8, e.ptr[addr]);
|
||||
e.lea(e.rdx, e.ptr[addr]);
|
||||
e.CallNative(reinterpret_cast<void*>(TraceMemoryStoreV128));
|
||||
|
||||
@@ -114,7 +114,7 @@ int DeadCodeEliminationPass::Run(HIRBuilder* builder) {
|
||||
|
||||
// Remove all nops.
|
||||
if (any_instr_removed) {
|
||||
auto block = builder->first_block();
|
||||
block = builder->first_block();
|
||||
while (block) {
|
||||
Instr* i = block->instr_head;
|
||||
while (i) {
|
||||
|
||||
@@ -421,9 +421,9 @@ bool RunTests(const std::wstring& test_name) {
|
||||
int failed_count = 0;
|
||||
int passed_count = 0;
|
||||
|
||||
auto test_path = poly::fix_path_separators(poly::to_wstring(FLAGS_test_path));
|
||||
auto test_path_root = poly::fix_path_separators(poly::to_wstring(FLAGS_test_path));
|
||||
std::vector<std::wstring> test_files;
|
||||
if (!DiscoverTests(test_path, test_files)) {
|
||||
if (!DiscoverTests(test_path_root, test_files)) {
|
||||
return false;
|
||||
}
|
||||
if (!test_files.size()) {
|
||||
|
||||
Reference in New Issue
Block a user