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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 void MacroAssembler::Jump(Register target, Condition cond) { | 55 void MacroAssembler::Jump(Register target, Condition cond) { |
56 bx(target, cond); | 56 bx(target, cond); |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode, | 60 void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode, |
61 Condition cond) { | 61 Condition cond) { |
62 mov(ip, Operand(target, rmode)); | 62 // 'target' is always generated ARM code, never THUMB code. |
ulan
2013/12/12 09:42:16
Maybe assert that rmode is not external reference.
Rodolph Perfetta
2013/12/12 09:50:30
on armv5t and above this will interwork properly,
Benedikt Meurer
2013/12/12 12:23:51
Done.
Benedikt Meurer
2013/12/12 12:23:51
Done.
| |
63 bx(ip, cond); | 63 ASSERT_EQ(0, target & 0x3); |
64 mov(pc, Operand(target, rmode), LeaveCC, cond); | |
64 } | 65 } |
65 | 66 |
66 | 67 |
67 void MacroAssembler::Jump(Address target, RelocInfo::Mode rmode, | 68 void MacroAssembler::Jump(Address target, RelocInfo::Mode rmode, |
68 Condition cond) { | 69 Condition cond) { |
69 ASSERT(!RelocInfo::IsCodeTarget(rmode)); | 70 ASSERT(!RelocInfo::IsCodeTarget(rmode)); |
70 Jump(reinterpret_cast<intptr_t>(target), rmode, cond); | 71 Jump(reinterpret_cast<intptr_t>(target), rmode, cond); |
71 } | 72 } |
72 | 73 |
73 | 74 |
(...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4079 void CodePatcher::EmitCondition(Condition cond) { | 4080 void CodePatcher::EmitCondition(Condition cond) { |
4080 Instr instr = Assembler::instr_at(masm_.pc_); | 4081 Instr instr = Assembler::instr_at(masm_.pc_); |
4081 instr = (instr & ~kCondMask) | cond; | 4082 instr = (instr & ~kCondMask) | cond; |
4082 masm_.emit(instr); | 4083 masm_.emit(instr); |
4083 } | 4084 } |
4084 | 4085 |
4085 | 4086 |
4086 } } // namespace v8::internal | 4087 } } // namespace v8::internal |
4087 | 4088 |
4088 #endif // V8_TARGET_ARCH_ARM | 4089 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |