OLD | NEW |
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 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4961 failure); | 4961 failure); |
4962 } | 4962 } |
4963 | 4963 |
4964 | 4964 |
4965 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( | 4965 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
4966 Register first, | 4966 Register first, |
4967 Register second, | 4967 Register second, |
4968 Register scratch1, | 4968 Register scratch1, |
4969 Register scratch2, | 4969 Register scratch2, |
4970 Label* failure) { | 4970 Label* failure) { |
4971 int kFlatAsciiStringMask = | 4971 const int kFlatAsciiStringMask = |
4972 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 4972 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
4973 int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 4973 const int kFlatAsciiStringTag = |
| 4974 kStringTag | kOneByteStringTag | kSeqStringTag; |
4974 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. | 4975 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. |
4975 andi(scratch1, first, kFlatAsciiStringMask); | 4976 andi(scratch1, first, kFlatAsciiStringMask); |
4976 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); | 4977 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); |
4977 andi(scratch2, second, kFlatAsciiStringMask); | 4978 andi(scratch2, second, kFlatAsciiStringMask); |
4978 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); | 4979 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); |
4979 } | 4980 } |
4980 | 4981 |
4981 | 4982 |
4982 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, | 4983 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, |
4983 Register scratch, | 4984 Register scratch, |
4984 Label* failure) { | 4985 Label* failure) { |
4985 int kFlatAsciiStringMask = | 4986 const int kFlatAsciiStringMask = |
4986 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 4987 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
4987 int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 4988 const int kFlatAsciiStringTag = |
| 4989 kStringTag | kOneByteStringTag | kSeqStringTag; |
4988 And(scratch, type, Operand(kFlatAsciiStringMask)); | 4990 And(scratch, type, Operand(kFlatAsciiStringMask)); |
4989 Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag)); | 4991 Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag)); |
4990 } | 4992 } |
4991 | 4993 |
4992 | 4994 |
4993 static const int kRegisterPassedArguments = 4; | 4995 static const int kRegisterPassedArguments = 4; |
4994 | 4996 |
4995 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, | 4997 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, |
4996 int num_double_arguments) { | 4998 int num_double_arguments) { |
4997 int stack_passed_words = 0; | 4999 int stack_passed_words = 0; |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5565 opcode == BGTZL); | 5567 opcode == BGTZL); |
5566 opcode = (cond == eq) ? BEQ : BNE; | 5568 opcode = (cond == eq) ? BEQ : BNE; |
5567 instr = (instr & ~kOpcodeMask) | opcode; | 5569 instr = (instr & ~kOpcodeMask) | opcode; |
5568 masm_.emit(instr); | 5570 masm_.emit(instr); |
5569 } | 5571 } |
5570 | 5572 |
5571 | 5573 |
5572 } } // namespace v8::internal | 5574 } } // namespace v8::internal |
5573 | 5575 |
5574 #endif // V8_TARGET_ARCH_MIPS | 5576 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |