Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: test/cctest/test-run-wasm-relocation-x64.cc

Issue 2492793005: [wasm] Fix more -Wsign-compare warnings. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-run-wasm-relocation-arm64.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 int64_t ret_value = runnable.Call(); 45 int64_t ret_value = runnable.Call();
46 CHECK_EQ(ret_value, imm); 46 CHECK_EQ(ret_value, imm);
47 47
48 #ifdef OBJECT_PRINT 48 #ifdef OBJECT_PRINT
49 OFStream os(stdout); 49 OFStream os(stdout);
50 code->Print(os); 50 code->Print(os);
51 byte* begin = code->instruction_start(); 51 byte* begin = code->instruction_start();
52 byte* end = begin + code->instruction_size(); 52 byte* end = begin + code->instruction_size();
53 disasm::Disassembler::Disassemble(stdout, begin, end); 53 disasm::Disassembler::Disassemble(stdout, begin, end);
54 #endif 54 #endif
55 size_t offset = 1234; 55 int offset = 1234;
56 56
57 // Relocating references by offset 57 // Relocating references by offset
58 int mode_mask = (1 << RelocInfo::WASM_MEMORY_REFERENCE); 58 int mode_mask = (1 << RelocInfo::WASM_MEMORY_REFERENCE);
59 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) { 59 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
60 RelocInfo::Mode mode = it.rinfo()->rmode(); 60 RelocInfo::Mode mode = it.rinfo()->rmode();
61 if (RelocInfo::IsWasmMemoryReference(mode)) { 61 if (RelocInfo::IsWasmMemoryReference(mode)) {
62 // Dummy values of size used here as the objective of the test is to 62 // Dummy values of size used here as the objective of the test is to
63 // verify that the immediate is patched correctly 63 // verify that the immediate is patched correctly
64 it.rinfo()->update_wasm_memory_reference( 64 it.rinfo()->update_wasm_memory_reference(
65 it.rinfo()->wasm_memory_reference(), 65 it.rinfo()->wasm_memory_reference(),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 CHECK_NE(ret_value, bit_cast<uint32_t>(0xdeadbeef)); 133 CHECK_NE(ret_value, bit_cast<uint32_t>(0xdeadbeef));
134 134
135 #ifdef OBJECT_PRINT 135 #ifdef OBJECT_PRINT
136 code->Print(os); 136 code->Print(os);
137 begin = code->instruction_start(); 137 begin = code->instruction_start();
138 end = begin + code->instruction_size(); 138 end = begin + code->instruction_size();
139 disasm::Disassembler::Disassemble(stdout, begin, end); 139 disasm::Disassembler::Disassemble(stdout, begin, end);
140 #endif 140 #endif
141 } 141 }
142 #undef __ 142 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-run-wasm-relocation-arm64.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698