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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 1279001: Revert "Inline floating point compare" (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | src/codegen.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 7000 matching lines...) Expand 10 before | Expand all | Expand 10 after
7011 // of the original receiver from the call site). 7011 // of the original receiver from the call site).
7012 __ str(r1, MemOperand(sp, argc_ * kPointerSize)); 7012 __ str(r1, MemOperand(sp, argc_ * kPointerSize));
7013 __ mov(r0, Operand(argc_)); // Setup the number of arguments. 7013 __ mov(r0, Operand(argc_)); // Setup the number of arguments.
7014 __ mov(r2, Operand(0)); 7014 __ mov(r2, Operand(0));
7015 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); 7015 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
7016 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), 7016 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)),
7017 RelocInfo::CODE_TARGET); 7017 RelocInfo::CODE_TARGET);
7018 } 7018 }
7019 7019
7020 7020
7021 // Unfortunately you have to run without snapshots to see most of these
7022 // names in the profile since most compare stubs end up in the snapshot.
7023 const char* CompareStub::GetName() { 7021 const char* CompareStub::GetName() {
7024 if (name_ != NULL) return name_;
7025 const int kMaxNameLength = 100;
7026 name_ = Bootstrapper::AllocateAutoDeletedArray(kMaxNameLength);
7027 if (name_ == NULL) return "OOM";
7028
7029 const char* cc_name;
7030 switch (cc_) { 7022 switch (cc_) {
7031 case lt: cc_name = "LT"; break; 7023 case lt: return "CompareStub_LT";
7032 case gt: cc_name = "GT"; break; 7024 case gt: return "CompareStub_GT";
7033 case le: cc_name = "LE"; break; 7025 case le: return "CompareStub_LE";
7034 case ge: cc_name = "GE"; break; 7026 case ge: return "CompareStub_GE";
7035 case eq: cc_name = "EQ"; break; 7027 case ne: {
7036 case ne: cc_name = "NE"; break; 7028 if (strict_) {
7037 default: cc_name = "UnknownCondition"; break; 7029 if (never_nan_nan_) {
7030 return "CompareStub_NE_STRICT_NO_NAN";
7031 } else {
7032 return "CompareStub_NE_STRICT";
7033 }
7034 } else {
7035 if (never_nan_nan_) {
7036 return "CompareStub_NE_NO_NAN";
7037 } else {
7038 return "CompareStub_NE";
7039 }
7040 }
7041 }
7042 case eq: {
7043 if (strict_) {
7044 if (never_nan_nan_) {
7045 return "CompareStub_EQ_STRICT_NO_NAN";
7046 } else {
7047 return "CompareStub_EQ_STRICT";
7048 }
7049 } else {
7050 if (never_nan_nan_) {
7051 return "CompareStub_EQ_NO_NAN";
7052 } else {
7053 return "CompareStub_EQ";
7054 }
7055 }
7056 }
7057 default: return "CompareStub";
7038 } 7058 }
7039
7040 const char* strict_name = "";
7041 if (strict_ && (cc_ == eq || cc_ == ne)) {
7042 strict_name = "_STRICT";
7043 }
7044
7045 const char* never_nan_nan_name = "";
7046 if (never_nan_nan_ && (cc_ == eq || cc_ == ne)) {
7047 never_nan_nan_name = "_NO_NAN";
7048 }
7049
7050 const char* include_number_compare_name = "";
7051 if (!include_number_compare_) {
7052 include_number_compare_name = "_NO_NUMBER";
7053 }
7054
7055 OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
7056 "CompareStub_%s%s%s%s",
7057 cc_name,
7058 strict_name,
7059 never_nan_nan_name,
7060 include_number_compare_name);
7061 return name_;
7062 } 7059 }
7063 7060
7064 7061
7065 int CompareStub::MinorKey() { 7062 int CompareStub::MinorKey() {
7066 // Encode the three parameters in a unique 16 bit value. To avoid duplicate 7063 // Encode the three parameters in a unique 16 bit value. To avoid duplicate
7067 // stubs the never NaN NaN condition is only taken into account if the 7064 // stubs the never NaN NaN condition is only taken into account if the
7068 // condition is equals. 7065 // condition is equals.
7069 ASSERT((static_cast<unsigned>(cc_) >> 28) < (1 << 13)); 7066 ASSERT((static_cast<unsigned>(cc_) >> 28) < (1 << 14));
7070 return ConditionField::encode(static_cast<unsigned>(cc_) >> 28) 7067 return ConditionField::encode(static_cast<unsigned>(cc_) >> 28)
7071 | StrictField::encode(strict_) 7068 | StrictField::encode(strict_)
7072 | NeverNanNanField::encode(cc_ == eq ? never_nan_nan_ : false) 7069 | NeverNanNanField::encode(cc_ == eq ? never_nan_nan_ : false);
7073 | IncludeNumberCompareField::encode(include_number_compare_);
7074 } 7070 }
7075 7071
7076 7072
7077 void StringStubBase::GenerateCopyCharacters(MacroAssembler* masm, 7073 void StringStubBase::GenerateCopyCharacters(MacroAssembler* masm,
7078 Register dest, 7074 Register dest,
7079 Register src, 7075 Register src,
7080 Register count, 7076 Register count,
7081 Register scratch, 7077 Register scratch,
7082 bool ascii) { 7078 bool ascii) {
7083 Label loop; 7079 Label loop;
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
7949 7945
7950 // Just jump to runtime to add the two strings. 7946 // Just jump to runtime to add the two strings.
7951 __ bind(&string_add_runtime); 7947 __ bind(&string_add_runtime);
7952 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 7948 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
7953 } 7949 }
7954 7950
7955 7951
7956 #undef __ 7952 #undef __
7957 7953
7958 } } // namespace v8::internal 7954 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698