| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // str(r, MemOperand(sp, 4, NegPreIndex), al) instruction (aka push(r)) | 253 // str(r, MemOperand(sp, 4, NegPreIndex), al) instruction (aka push(r)) |
| 254 // register r is not encoded. | 254 // register r is not encoded. |
| 255 static const Instr kPushRegPattern = | 255 static const Instr kPushRegPattern = |
| 256 al | B26 | 4 | NegPreIndex | sp.code() * B16; | 256 al | B26 | 4 | NegPreIndex | sp.code() * B16; |
| 257 // ldr(r, MemOperand(sp, 4, PostIndex), al) instruction (aka pop(r)) | 257 // ldr(r, MemOperand(sp, 4, PostIndex), al) instruction (aka pop(r)) |
| 258 // register r is not encoded. | 258 // register r is not encoded. |
| 259 static const Instr kPopRegPattern = | 259 static const Instr kPopRegPattern = |
| 260 al | B26 | L | 4 | PostIndex | sp.code() * B16; | 260 al | B26 | L | 4 | PostIndex | sp.code() * B16; |
| 261 // mov lr, pc | 261 // mov lr, pc |
| 262 const Instr kMovLrPc = al | 13*B21 | pc.code() | lr.code() * B12; | 262 const Instr kMovLrPc = al | 13*B21 | pc.code() | lr.code() * B12; |
| 263 // ldr pc, [pc, #XXX] | 263 // ldr rd, [pc, #offset] |
| 264 const Instr kLdrPCPattern = al | B26 | L | pc.code() * B16; | 264 const Instr kLdrPCMask = CondMask | 15 * B24 | 7 * B20 | 15 * B16; |
| 265 const Instr kLdrPCPattern = al | 5 * B24 | L | pc.code() * B16; |
| 266 // blxcc rm |
| 267 const Instr kBlxRegMask = |
| 268 15 * B24 | 15 * B20 | 15 * B16 | 15 * B12 | 15 * B8 | 15 * B4; |
| 269 const Instr kBlxRegPattern = |
| 270 B24 | B21 | 15 * B16 | 15 * B12 | 15 * B8 | 3 * B4; |
| 265 | 271 |
| 266 // Spare buffer. | 272 // Spare buffer. |
| 267 static const int kMinimalBufferSize = 4*KB; | 273 static const int kMinimalBufferSize = 4*KB; |
| 268 static byte* spare_buffer_ = NULL; | 274 static byte* spare_buffer_ = NULL; |
| 269 | 275 |
| 270 Assembler::Assembler(void* buffer, int buffer_size) { | 276 Assembler::Assembler(void* buffer, int buffer_size) { |
| 271 if (buffer == NULL) { | 277 if (buffer == NULL) { |
| 272 // Do our own buffer management. | 278 // Do our own buffer management. |
| 273 if (buffer_size <= kMinimalBufferSize) { | 279 if (buffer_size <= kMinimalBufferSize) { |
| 274 buffer_size = kMinimalBufferSize; | 280 buffer_size = kMinimalBufferSize; |
| (...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1797 bind(&after_pool); | 1803 bind(&after_pool); |
| 1798 } | 1804 } |
| 1799 | 1805 |
| 1800 // Since a constant pool was just emitted, move the check offset forward by | 1806 // Since a constant pool was just emitted, move the check offset forward by |
| 1801 // the standard interval. | 1807 // the standard interval. |
| 1802 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 1808 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 1803 } | 1809 } |
| 1804 | 1810 |
| 1805 | 1811 |
| 1806 } } // namespace v8::internal | 1812 } } // namespace v8::internal |
| OLD | NEW |