| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #if V8_TARGET_ARCH_S390 | 5 #if V8_TARGET_ARCH_S390 |
| 6 | 6 |
| 7 #include "src/ic/ic.h" | 7 #include "src/ic/ic.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 // condition code uses at the patched jump. | 821 // condition code uses at the patched jump. |
| 822 int delta = instr & 0x0000ffff; | 822 int delta = instr & 0x0000ffff; |
| 823 | 823 |
| 824 // If the delta is 0 the instruction is cmp r0, #0 which also signals that | 824 // If the delta is 0 the instruction is cmp r0, #0 which also signals that |
| 825 // nothing was inlined. | 825 // nothing was inlined. |
| 826 if (delta == 0) { | 826 if (delta == 0) { |
| 827 return; | 827 return; |
| 828 } | 828 } |
| 829 | 829 |
| 830 if (FLAG_trace_ic) { | 830 if (FLAG_trace_ic) { |
| 831 PrintF("[ patching ic at %p, cmp=%p, delta=%d\n", address, | 831 PrintF("[ patching ic at %p, cmp=%p, delta=%d\n", |
| 832 cmp_instruction_address, delta); | 832 static_cast<void*>(address), |
| 833 static_cast<void*>(cmp_instruction_address), delta); |
| 833 } | 834 } |
| 834 | 835 |
| 835 // Expected sequence to enable by changing the following | 836 // Expected sequence to enable by changing the following |
| 836 // CR/CGR Rx, Rx // 2 / 4 bytes | 837 // CR/CGR Rx, Rx // 2 / 4 bytes |
| 837 // LR R0, R0 // 2 bytes // 31-bit only! | 838 // LR R0, R0 // 2 bytes // 31-bit only! |
| 838 // BRC/BRCL // 4 / 6 bytes | 839 // BRC/BRCL // 4 / 6 bytes |
| 839 // into | 840 // into |
| 840 // TMLL Rx, XXX // 4 bytes | 841 // TMLL Rx, XXX // 4 bytes |
| 841 // BRC/BRCL // 4 / 6 bytes | 842 // BRC/BRCL // 4 / 6 bytes |
| 842 // And vice versa to disable. | 843 // And vice versa to disable. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); | 888 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); |
| 888 } else { | 889 } else { |
| 889 DCHECK(false); | 890 DCHECK(false); |
| 890 } | 891 } |
| 891 } | 892 } |
| 892 | 893 |
| 893 } // namespace internal | 894 } // namespace internal |
| 894 } // namespace v8 | 895 } // namespace v8 |
| 895 | 896 |
| 896 #endif // V8_TARGET_ARCH_S390 | 897 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |