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

Unified Diff: test/cctest/test-assembler-mips.cc

Issue 1537973002: MIPS: Fix uninitialized upper word bits for Cvt_d_uw macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« src/mips/macro-assembler-mips.cc ('K') | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-mips.cc
diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc
index da83b7f3fcd227915b38f14380a630bb9779590b..16aa8efbee6a957c216fc4fecabea02921bc1182 100644
--- a/test/cctest/test-assembler-mips.cc
+++ b/test/cctest/test-assembler-mips.cc
@@ -1819,48 +1819,46 @@ TEST(rint_s) {
TEST(Cvt_d_uw) {
- if (IsMipsArchVariant(kMips32r2)) {
- CcTest::InitializeVM();
- Isolate* isolate = CcTest::i_isolate();
- HandleScope scope(isolate);
- MacroAssembler assm(isolate, NULL, 0,
- v8::internal::CodeObjectRequired::kYes);
+ CcTest::InitializeVM();
ivica.bogosavljevic 2015/12/18 15:07:56 Enable tests for both MIPS32R2 and MIPS32R6
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+ MacroAssembler assm(isolate, NULL, 0,
+ v8::internal::CodeObjectRequired::kYes);
- typedef struct test_struct {
- unsigned input;
- uint64_t output;
- } TestStruct;
+ typedef struct test_struct {
+ unsigned input;
+ uint64_t output;
+ } TestStruct;
- unsigned inputs[] = {
- 0x0, 0xffffffff, 0x80000000, 0x7fffffff
- };
+ unsigned inputs[] = {
+ 0x0, 0xffffffff, 0x80000000, 0x7fffffff
+ };
- uint64_t outputs[] = {
- 0x0, 0x41efffffffe00000,
- 0x41e0000000000000, 0x41dfffffffc00000
- };
+ uint64_t outputs[] = {
+ 0x0, 0x41efffffffe00000,
+ 0x41e0000000000000, 0x41dfffffffc00000
+ };
- int kTableLength = sizeof(inputs)/sizeof(inputs[0]);
+ int kTableLength = sizeof(inputs)/sizeof(inputs[0]);
- TestStruct test;
+ TestStruct test;
- __ lw(t1, MemOperand(a0, offsetof(TestStruct, input)));
- __ Cvt_d_uw(f4, t1, f6);
- __ sdc1(f4, MemOperand(a0, offsetof(TestStruct, output)));
- __ jr(ra);
- __ nop();
+ __ lw(t1, MemOperand(a0, offsetof(TestStruct, input)));
+ __ Cvt_d_uw(f4, t1, f6);
+ __ sdc1(f4, MemOperand(a0, offsetof(TestStruct, output)));
+ __ jr(ra);
+ __ nop();
- CodeDesc desc;
- assm.GetCode(&desc);
- Handle<Code> code = isolate->factory()->NewCode(
- desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
- F3 f = FUNCTION_CAST<F3>(code->entry());
- for (int i = 0; i < kTableLength; i++) {
- test.input = inputs[i];
- (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
- // Check outputs
- CHECK_EQ(test.output, outputs[i]);
- }
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ F3 f = FUNCTION_CAST<F3>(code->entry());
+ for (int i = 0; i < kTableLength; i++) {
+ test.input = inputs[i];
+ (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+ // Check outputs
+ CHECK_EQ(test.output, outputs[i]);
}
}
« src/mips/macro-assembler-mips.cc ('K') | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698