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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 12844005: MIPS: Fix test262 regression. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 uint32_t constant_abs = (constant + mask) ^ mask; 1261 uint32_t constant_abs = (constant + mask) ^ mask;
1262 1262
1263 if (IsPowerOf2(constant_abs) || 1263 if (IsPowerOf2(constant_abs) ||
1264 IsPowerOf2(constant_abs - 1) || 1264 IsPowerOf2(constant_abs - 1) ||
1265 IsPowerOf2(constant_abs + 1)) { 1265 IsPowerOf2(constant_abs + 1)) {
1266 if (IsPowerOf2(constant_abs)) { 1266 if (IsPowerOf2(constant_abs)) {
1267 int32_t shift = WhichPowerOf2(constant_abs); 1267 int32_t shift = WhichPowerOf2(constant_abs);
1268 __ sll(result, left, shift); 1268 __ sll(result, left, shift);
1269 } else if (IsPowerOf2(constant_abs - 1)) { 1269 } else if (IsPowerOf2(constant_abs - 1)) {
1270 int32_t shift = WhichPowerOf2(constant_abs - 1); 1270 int32_t shift = WhichPowerOf2(constant_abs - 1);
1271 __ sll(result, left, shift); 1271 __ sll(scratch, left, shift);
1272 __ Addu(result, result, left); 1272 __ Addu(result, scratch, left);
1273 } else if (IsPowerOf2(constant_abs + 1)) { 1273 } else if (IsPowerOf2(constant_abs + 1)) {
1274 int32_t shift = WhichPowerOf2(constant_abs + 1); 1274 int32_t shift = WhichPowerOf2(constant_abs + 1);
1275 __ sll(result, left, shift); 1275 __ sll(scratch, left, shift);
1276 __ Subu(result, result, left); 1276 __ Subu(result, scratch, left);
1277 } 1277 }
1278 1278
1279 // Correct the sign of the result is the constant is negative. 1279 // Correct the sign of the result is the constant is negative.
1280 if (constant < 0) { 1280 if (constant < 0) {
1281 __ Subu(result, zero_reg, result); 1281 __ Subu(result, zero_reg, result);
1282 } 1282 }
1283 1283
1284 } else { 1284 } else {
1285 // Generate standard code. 1285 // Generate standard code.
1286 __ li(at, constant); 1286 __ li(at, constant);
(...skipping 4815 matching lines...) Expand 10 before | Expand all | Expand 10 after
6102 __ Subu(scratch, result, scratch); 6102 __ Subu(scratch, result, scratch);
6103 __ lw(result, FieldMemOperand(scratch, 6103 __ lw(result, FieldMemOperand(scratch,
6104 FixedArray::kHeaderSize - kPointerSize)); 6104 FixedArray::kHeaderSize - kPointerSize));
6105 __ bind(&done); 6105 __ bind(&done);
6106 } 6106 }
6107 6107
6108 6108
6109 #undef __ 6109 #undef __
6110 6110
6111 } } // namespace v8::internal 6111 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698