OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 27 matching lines...) Expand all Loading... |
38 #define V8_ARM_ASSEMBLER_ARM_INL_H_ | 38 #define V8_ARM_ASSEMBLER_ARM_INL_H_ |
39 | 39 |
40 #include "arm/assembler-arm.h" | 40 #include "arm/assembler-arm.h" |
41 #include "cpu.h" | 41 #include "cpu.h" |
42 #include "debug.h" | 42 #include "debug.h" |
43 | 43 |
44 | 44 |
45 namespace v8 { | 45 namespace v8 { |
46 namespace internal { | 46 namespace internal { |
47 | 47 |
48 Condition NegateCondition(Condition cc) { | |
49 ASSERT(cc != al); | |
50 return static_cast<Condition>(cc ^ ne); | |
51 } | |
52 | |
53 | 48 |
54 void RelocInfo::apply(intptr_t delta) { | 49 void RelocInfo::apply(intptr_t delta) { |
55 if (RelocInfo::IsInternalReference(rmode_)) { | 50 if (RelocInfo::IsInternalReference(rmode_)) { |
56 // absolute code pointer inside code object moves with the code object. | 51 // absolute code pointer inside code object moves with the code object. |
57 int32_t* p = reinterpret_cast<int32_t*>(pc_); | 52 int32_t* p = reinterpret_cast<int32_t*>(pc_); |
58 *p += delta; // relocate entry | 53 *p += delta; // relocate entry |
59 } | 54 } |
60 // We do not use pc relative addressing on ARM, so there is | 55 // We do not use pc relative addressing on ARM, so there is |
61 // nothing else to do. | 56 // nothing else to do. |
62 } | 57 } |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 // CPU::FlushICache(pc, sizeof(target)); | 296 // CPU::FlushICache(pc, sizeof(target)); |
302 // However, on ARM, no instruction was actually patched by the assignment | 297 // However, on ARM, no instruction was actually patched by the assignment |
303 // above; the target address is not part of an instruction, it is patched in | 298 // above; the target address is not part of an instruction, it is patched in |
304 // the constant pool and is read via a data access; the instruction accessing | 299 // the constant pool and is read via a data access; the instruction accessing |
305 // this address in the constant pool remains unchanged. | 300 // this address in the constant pool remains unchanged. |
306 } | 301 } |
307 | 302 |
308 } } // namespace v8::internal | 303 } } // namespace v8::internal |
309 | 304 |
310 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 305 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
OLD | NEW |