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

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

Issue 23494054: MIPS: Orthogonalize Lithium binary op instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | src/mips/lithium-mips.h » ('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. 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 4926 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 private: 4937 private:
4938 LTaggedToI* instr_; 4938 LTaggedToI* instr_;
4939 }; 4939 };
4940 4940
4941 LOperand* input = instr->value(); 4941 LOperand* input = instr->value();
4942 ASSERT(input->IsRegister()); 4942 ASSERT(input->IsRegister());
4943 ASSERT(input->Equals(instr->result())); 4943 ASSERT(input->Equals(instr->result()));
4944 4944
4945 Register input_reg = ToRegister(input); 4945 Register input_reg = ToRegister(input);
4946 4946
4947 DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr); 4947 if (instr->hydrogen()->value()->representation().IsSmi()) {
4948 __ SmiUntag(input_reg);
4949 } else {
4950 DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
4948 4951
4949 // Let the deferred code handle the HeapObject case. 4952 // Let the deferred code handle the HeapObject case.
4950 __ JumpIfNotSmi(input_reg, deferred->entry()); 4953 __ JumpIfNotSmi(input_reg, deferred->entry());
4951 4954
4952 // Smi to int32 conversion. 4955 // Smi to int32 conversion.
4953 __ SmiUntag(input_reg); 4956 __ SmiUntag(input_reg);
4954 __ bind(deferred->exit()); 4957 __ bind(deferred->exit());
4958 }
4955 } 4959 }
4956 4960
4957 4961
4958 void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) { 4962 void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) {
4959 LOperand* input = instr->value(); 4963 LOperand* input = instr->value();
4960 ASSERT(input->IsRegister()); 4964 ASSERT(input->IsRegister());
4961 LOperand* result = instr->result(); 4965 LOperand* result = instr->result();
4962 ASSERT(result->IsDoubleRegister()); 4966 ASSERT(result->IsDoubleRegister());
4963 4967
4964 Register input_reg = ToRegister(input); 4968 Register input_reg = ToRegister(input);
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 __ Subu(scratch, result, scratch); 5787 __ Subu(scratch, result, scratch);
5784 __ lw(result, FieldMemOperand(scratch, 5788 __ lw(result, FieldMemOperand(scratch,
5785 FixedArray::kHeaderSize - kPointerSize)); 5789 FixedArray::kHeaderSize - kPointerSize));
5786 __ bind(&done); 5790 __ bind(&done);
5787 } 5791 }
5788 5792
5789 5793
5790 #undef __ 5794 #undef __
5791 5795
5792 } } // namespace v8::internal 5796 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698