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 4952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int kFlatAsciiStringMask = |
4972 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 4972 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
4973 int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 4973 // Use ASCII_INTERNALIZED_STRING_TYPE because it's internalized bit is zero. |
| 4974 // Since we don't include that bit in the mask above, the test below will |
| 4975 // succeed for ASCII_STRING_TYPE and ASCII_INTERNALIZED_STRING_TYPE. |
| 4976 STATIC_ASSERT(kInternalizedTag == 0); |
| 4977 const int kFlatAsciiStringTag = ASCII_INTERNALIZED_STRING_TYPE; |
4974 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. | 4978 ASSERT(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. |
4975 andi(scratch1, first, kFlatAsciiStringMask); | 4979 andi(scratch1, first, kFlatAsciiStringMask); |
4976 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); | 4980 Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); |
4977 andi(scratch2, second, kFlatAsciiStringMask); | 4981 andi(scratch2, second, kFlatAsciiStringMask); |
4978 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); | 4982 Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); |
4979 } | 4983 } |
4980 | 4984 |
4981 | 4985 |
4982 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, | 4986 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, |
4983 Register scratch, | 4987 Register scratch, |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5565 opcode == BGTZL); | 5569 opcode == BGTZL); |
5566 opcode = (cond == eq) ? BEQ : BNE; | 5570 opcode = (cond == eq) ? BEQ : BNE; |
5567 instr = (instr & ~kOpcodeMask) | opcode; | 5571 instr = (instr & ~kOpcodeMask) | opcode; |
5568 masm_.emit(instr); | 5572 masm_.emit(instr); |
5569 } | 5573 } |
5570 | 5574 |
5571 | 5575 |
5572 } } // namespace v8::internal | 5576 } } // namespace v8::internal |
5573 | 5577 |
5574 #endif // V8_TARGET_ARCH_MIPS | 5578 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |