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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 shift_op_ = shift_op; | 295 shift_op_ = shift_op; |
296 rs_ = rs; | 296 rs_ = rs; |
297 } | 297 } |
298 | 298 |
299 | 299 |
300 MemOperand::MemOperand(Register rn, int32_t offset, AddrMode am) { | 300 MemOperand::MemOperand(Register rn, int32_t offset, AddrMode am) { |
301 rn_ = rn; | 301 rn_ = rn; |
302 rm_ = no_reg; | 302 rm_ = no_reg; |
303 offset_ = offset; | 303 offset_ = offset; |
304 am_ = am; | 304 am_ = am; |
| 305 |
| 306 // Accesses below the stack pointer are not safe, and are prohibited by the |
| 307 // ABI. We can check obvious violations here. |
| 308 if (rn.is(sp)) { |
| 309 if (am == Offset) DCHECK_LE(0, offset); |
| 310 if (am == NegOffset) DCHECK_GE(0, offset); |
| 311 } |
305 } | 312 } |
306 | 313 |
307 | 314 |
308 MemOperand::MemOperand(Register rn, Register rm, AddrMode am) { | 315 MemOperand::MemOperand(Register rn, Register rm, AddrMode am) { |
309 rn_ = rn; | 316 rn_ = rn; |
310 rm_ = rm; | 317 rm_ = rm; |
311 shift_op_ = LSL; | 318 shift_op_ = LSL; |
312 shift_imm_ = 0; | 319 shift_imm_ = 0; |
313 am_ = am; | 320 am_ = am; |
314 } | 321 } |
(...skipping 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4025 DCHECK(is_uint12(offset)); | 4032 DCHECK(is_uint12(offset)); |
4026 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4033 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
4027 } | 4034 } |
4028 } | 4035 } |
4029 | 4036 |
4030 | 4037 |
4031 } // namespace internal | 4038 } // namespace internal |
4032 } // namespace v8 | 4039 } // namespace v8 |
4033 | 4040 |
4034 #endif // V8_TARGET_ARCH_ARM | 4041 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |