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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Check that the flags match what we're looking for. | 96 // Check that the flags match what we're looking for. |
97 Register flags_reg = base_addr; | 97 Register flags_reg = base_addr; |
98 base_addr = no_reg; | 98 base_addr = no_reg; |
99 __ ldr(flags_reg, FieldMemOperand(code, Code::kFlagsOffset)); | 99 __ ldr(flags_reg, FieldMemOperand(code, Code::kFlagsOffset)); |
100 // It's a nice optimization if this constant is encodable in the bic insn. | 100 // It's a nice optimization if this constant is encodable in the bic insn. |
101 | 101 |
102 uint32_t mask = Code::kFlagsNotUsedInLookup; | 102 uint32_t mask = Code::kFlagsNotUsedInLookup; |
103 ASSERT(__ ImmediateFitsAddrMode1Instruction(mask)); | 103 ASSERT(__ ImmediateFitsAddrMode1Instruction(mask)); |
104 __ bic(flags_reg, flags_reg, Operand(mask)); | 104 __ bic(flags_reg, flags_reg, Operand(mask)); |
105 // Using cmn and the negative instead of cmp means we can use movw. | 105 __ cmp(flags_reg, Operand(flags)); |
106 if (flags < 0) { | |
107 __ cmn(flags_reg, Operand(-flags)); | |
108 } else { | |
109 __ cmp(flags_reg, Operand(flags)); | |
110 } | |
111 __ b(ne, &miss); | 106 __ b(ne, &miss); |
112 | 107 |
113 #ifdef DEBUG | 108 #ifdef DEBUG |
114 if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { | 109 if (FLAG_test_secondary_stub_cache && table == StubCache::kPrimary) { |
115 __ jmp(&miss); | 110 __ jmp(&miss); |
116 } else if (FLAG_test_primary_stub_cache && table == StubCache::kSecondary) { | 111 } else if (FLAG_test_primary_stub_cache && table == StubCache::kSecondary) { |
117 __ jmp(&miss); | 112 __ jmp(&miss); |
118 } | 113 } |
119 #endif | 114 #endif |
120 | 115 |
(...skipping 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3847 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3842 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
3848 } | 3843 } |
3849 } | 3844 } |
3850 | 3845 |
3851 | 3846 |
3852 #undef __ | 3847 #undef __ |
3853 | 3848 |
3854 } } // namespace v8::internal | 3849 } } // namespace v8::internal |
3855 | 3850 |
3856 #endif // V8_TARGET_ARCH_ARM | 3851 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |