| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // str(r, MemOperand(sp, 4, NegPreIndex), al) instruction (aka push(r)) | 233 // str(r, MemOperand(sp, 4, NegPreIndex), al) instruction (aka push(r)) |
| 234 // register r is not encoded. | 234 // register r is not encoded. |
| 235 static const Instr kPushRegPattern = | 235 static const Instr kPushRegPattern = |
| 236 al | B26 | 4 | NegPreIndex | sp.code() * B16; | 236 al | B26 | 4 | NegPreIndex | sp.code() * B16; |
| 237 // ldr(r, MemOperand(sp, 4, PostIndex), al) instruction (aka pop(r)) | 237 // ldr(r, MemOperand(sp, 4, PostIndex), al) instruction (aka pop(r)) |
| 238 // register r is not encoded. | 238 // register r is not encoded. |
| 239 static const Instr kPopRegPattern = | 239 static const Instr kPopRegPattern = |
| 240 al | B26 | L | 4 | PostIndex | sp.code() * B16; | 240 al | B26 | L | 4 | PostIndex | sp.code() * B16; |
| 241 // mov lr, pc | 241 // mov lr, pc |
| 242 const Instr kMovLrPc = al | 13*B21 | pc.code() | lr.code() * B12; | 242 const Instr kMovLrPc = al | 13*B21 | pc.code() | lr.code() * B12; |
| 243 // ldr pc, [pc, #XXX] | 243 // ldr rd, [pc, #offset] |
| 244 const Instr kLdrPCPattern = al | B26 | L | pc.code() * B16; | 244 const Instr kLdrPCMask = CondMask | 15 * B24 | 7 * B20 | 15 * B16; |
| 245 const Instr kLdrPCPattern = al | 5 * B24 | L | pc.code() * B16; |
| 246 // blxcc rm |
| 247 const Instr kBlxRegMask = |
| 248 15 * B24 | 15 * B20 | 15 * B16 | 15 * B12 | 15 * B8 | 15 * B4; |
| 249 const Instr kBlxRegPattern = |
| 250 B24 | B21 | 15 * B16 | 15 * B12 | 15 * B8 | 3 * B4; |
| 245 | 251 |
| 246 // Spare buffer. | 252 // Spare buffer. |
| 247 static const int kMinimalBufferSize = 4*KB; | 253 static const int kMinimalBufferSize = 4*KB; |
| 248 static byte* spare_buffer_ = NULL; | 254 static byte* spare_buffer_ = NULL; |
| 249 | 255 |
| 250 Assembler::Assembler(void* buffer, int buffer_size) { | 256 Assembler::Assembler(void* buffer, int buffer_size) { |
| 251 if (buffer == NULL) { | 257 if (buffer == NULL) { |
| 252 // Do our own buffer management. | 258 // Do our own buffer management. |
| 253 if (buffer_size <= kMinimalBufferSize) { | 259 if (buffer_size <= kMinimalBufferSize) { |
| 254 buffer_size = kMinimalBufferSize; | 260 buffer_size = kMinimalBufferSize; |
| (...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 bind(&after_pool); | 1781 bind(&after_pool); |
| 1776 } | 1782 } |
| 1777 | 1783 |
| 1778 // Since a constant pool was just emitted, move the check offset forward by | 1784 // Since a constant pool was just emitted, move the check offset forward by |
| 1779 // the standard interval. | 1785 // the standard interval. |
| 1780 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 1786 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 1781 } | 1787 } |
| 1782 | 1788 |
| 1783 | 1789 |
| 1784 } } // namespace v8::internal | 1790 } } // namespace v8::internal |
| OLD | NEW |