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

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

Issue 542193003: MIPS: Rename ascii to one-byte where applicable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 __ And(at, result, Operand(kIsIndirectStringMask)); 941 __ And(at, result, Operand(kIsIndirectStringMask));
942 __ Assert(eq, kExternalStringExpectedButNotFound, 942 __ Assert(eq, kExternalStringExpectedButNotFound,
943 at, Operand(zero_reg)); 943 at, Operand(zero_reg));
944 } 944 }
945 // Rule out short external strings. 945 // Rule out short external strings.
946 STATIC_ASSERT(kShortExternalStringTag != 0); 946 STATIC_ASSERT(kShortExternalStringTag != 0);
947 __ And(at, result, Operand(kShortExternalStringMask)); 947 __ And(at, result, Operand(kShortExternalStringMask));
948 __ Branch(call_runtime, ne, at, Operand(zero_reg)); 948 __ Branch(call_runtime, ne, at, Operand(zero_reg));
949 __ ld(string, FieldMemOperand(string, ExternalString::kResourceDataOffset)); 949 __ ld(string, FieldMemOperand(string, ExternalString::kResourceDataOffset));
950 950
951 Label ascii, done; 951 Label one_byte, done;
952 __ bind(&check_encoding); 952 __ bind(&check_encoding);
953 STATIC_ASSERT(kTwoByteStringTag == 0); 953 STATIC_ASSERT(kTwoByteStringTag == 0);
954 __ And(at, result, Operand(kStringEncodingMask)); 954 __ And(at, result, Operand(kStringEncodingMask));
955 __ Branch(&ascii, ne, at, Operand(zero_reg)); 955 __ Branch(&one_byte, ne, at, Operand(zero_reg));
956 // Two-byte string. 956 // Two-byte string.
957 __ dsll(at, index, 1); 957 __ dsll(at, index, 1);
958 __ Daddu(at, string, at); 958 __ Daddu(at, string, at);
959 __ lhu(result, MemOperand(at)); 959 __ lhu(result, MemOperand(at));
960 __ jmp(&done); 960 __ jmp(&done);
961 __ bind(&ascii); 961 __ bind(&one_byte);
962 // Ascii string. 962 // One_byte string.
963 __ Daddu(at, string, index); 963 __ Daddu(at, string, index);
964 __ lbu(result, MemOperand(at)); 964 __ lbu(result, MemOperand(at));
965 __ bind(&done); 965 __ bind(&done);
966 } 966 }
967 967
968 968
969 static MemOperand ExpConstant(int index, Register base) { 969 static MemOperand ExpConstant(int index, Register base) {
970 return MemOperand(base, index * kDoubleSize); 970 return MemOperand(base, index * kDoubleSize);
971 } 971 }
972 972
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 patcher.masm()->nop(); // Pad the empty space. 1133 patcher.masm()->nop(); // Pad the empty space.
1134 } 1134 }
1135 } 1135 }
1136 1136
1137 1137
1138 #undef __ 1138 #undef __
1139 1139
1140 } } // namespace v8::internal 1140 } } // namespace v8::internal
1141 1141
1142 #endif // V8_TARGET_ARCH_MIPS64 1142 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698