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 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1959 | 1959 |
1960 // Status register access instructions. | 1960 // Status register access instructions. |
1961 void Assembler::mrs(Register dst, SRegister s, Condition cond) { | 1961 void Assembler::mrs(Register dst, SRegister s, Condition cond) { |
1962 DCHECK(!dst.is(pc)); | 1962 DCHECK(!dst.is(pc)); |
1963 emit(cond | B24 | s | 15*B16 | dst.code()*B12); | 1963 emit(cond | B24 | s | 15*B16 | dst.code()*B12); |
1964 } | 1964 } |
1965 | 1965 |
1966 | 1966 |
1967 void Assembler::msr(SRegisterFieldMask fields, const Operand& src, | 1967 void Assembler::msr(SRegisterFieldMask fields, const Operand& src, |
1968 Condition cond) { | 1968 Condition cond) { |
1969 DCHECK(fields >= B16 && fields < B20); // at least one field set | 1969 DCHECK((fields & 0x000f0000) != 0); // At least one field must be set. |
| 1970 DCHECK(((fields & 0xfff0ffff) == CPSR) || ((fields & 0xfff0ffff) == SPSR)); |
1970 Instr instr; | 1971 Instr instr; |
1971 if (!src.rm_.is_valid()) { | 1972 if (!src.rm_.is_valid()) { |
1972 // Immediate. | 1973 // Immediate. |
1973 uint32_t rotate_imm; | 1974 uint32_t rotate_imm; |
1974 uint32_t immed_8; | 1975 uint32_t immed_8; |
1975 if (src.must_output_reloc_info(this) || | 1976 if (src.must_output_reloc_info(this) || |
1976 !fits_shifter(src.imm32_, &rotate_imm, &immed_8, NULL)) { | 1977 !fits_shifter(src.imm32_, &rotate_imm, &immed_8, NULL)) { |
1977 // Immediate operand cannot be encoded, load it first to register ip. | 1978 // Immediate operand cannot be encoded, load it first to register ip. |
1978 move_32_bit_immediate(ip, src); | 1979 move_32_bit_immediate(ip, src); |
1979 msr(fields, Operand(ip), cond); | 1980 msr(fields, Operand(ip), cond); |
(...skipping 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4148 DCHECK(is_uint12(offset)); | 4149 DCHECK(is_uint12(offset)); |
4149 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4150 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
4150 } | 4151 } |
4151 } | 4152 } |
4152 | 4153 |
4153 | 4154 |
4154 } // namespace internal | 4155 } // namespace internal |
4155 } // namespace v8 | 4156 } // namespace v8 |
4156 | 4157 |
4157 #endif // V8_TARGET_ARCH_ARM | 4158 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |