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

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

Issue 223563003: Version 3.25.28.4 (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.25
Patch Set: Created 6 years, 8 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 | « src/elements-kind.cc ('k') | src/version.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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 return MemOperand(base, 3252 return MemOperand(base,
3253 base_offset + (constant_key << element_size)); 3253 base_offset + (constant_key << element_size));
3254 } 3254 }
3255 3255
3256 if (additional_offset != 0) { 3256 if (additional_offset != 0) {
3257 if (shift_size >= 0) { 3257 if (shift_size >= 0) {
3258 __ sll(scratch0(), key, shift_size); 3258 __ sll(scratch0(), key, shift_size);
3259 __ Addu(scratch0(), scratch0(), Operand(base_offset)); 3259 __ Addu(scratch0(), scratch0(), Operand(base_offset));
3260 } else { 3260 } else {
3261 ASSERT_EQ(-1, shift_size); 3261 ASSERT_EQ(-1, shift_size);
3262 __ srl(scratch0(), key, 1); 3262 // Key can be negative, so using sra here.
3263 __ sra(scratch0(), key, 1);
3263 __ Addu(scratch0(), scratch0(), Operand(base_offset)); 3264 __ Addu(scratch0(), scratch0(), Operand(base_offset));
3264 } 3265 }
3265 __ Addu(scratch0(), base, scratch0()); 3266 __ Addu(scratch0(), base, scratch0());
3266 return MemOperand(scratch0()); 3267 return MemOperand(scratch0());
3267 } 3268 }
3268 3269
3269 if (additional_index != 0) { 3270 if (additional_index != 0) {
3270 additional_index *= 1 << (element_size - shift_size); 3271 additional_index *= 1 << (element_size - shift_size);
3271 __ Addu(scratch0(), key, Operand(additional_index)); 3272 __ Addu(scratch0(), key, Operand(additional_index));
3272 } 3273 }
(...skipping 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5814 __ Subu(scratch, result, scratch); 5815 __ Subu(scratch, result, scratch);
5815 __ lw(result, FieldMemOperand(scratch, 5816 __ lw(result, FieldMemOperand(scratch,
5816 FixedArray::kHeaderSize - kPointerSize)); 5817 FixedArray::kHeaderSize - kPointerSize));
5817 __ bind(&done); 5818 __ bind(&done);
5818 } 5819 }
5819 5820
5820 5821
5821 #undef __ 5822 #undef __
5822 5823
5823 } } // namespace v8::internal 5824 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698