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 3158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3169 int immed8 = Instruction::Immed8Value(instr); | 3169 int immed8 = Instruction::Immed8Value(instr); |
3170 return (immed8 >> rotate) | (immed8 << (32 - rotate)); | 3170 return (immed8 >> rotate) | (immed8 << (32 - rotate)); |
3171 } | 3171 } |
3172 | 3172 |
3173 | 3173 |
3174 Instr Assembler::PatchShiftImm(Instr instr, int immed) { | 3174 Instr Assembler::PatchShiftImm(Instr instr, int immed) { |
3175 uint32_t rotate_imm = 0; | 3175 uint32_t rotate_imm = 0; |
3176 uint32_t immed_8 = 0; | 3176 uint32_t immed_8 = 0; |
3177 bool immed_fits = fits_shifter(immed, &rotate_imm, &immed_8, NULL); | 3177 bool immed_fits = fits_shifter(immed, &rotate_imm, &immed_8, NULL); |
3178 DCHECK(immed_fits); | 3178 DCHECK(immed_fits); |
| 3179 USE(immed_fits); |
3179 return (instr & ~kOff12Mask) | (rotate_imm << 8) | immed_8; | 3180 return (instr & ~kOff12Mask) | (rotate_imm << 8) | immed_8; |
3180 } | 3181 } |
3181 | 3182 |
3182 | 3183 |
3183 bool Assembler::IsNop(Instr instr, int type) { | 3184 bool Assembler::IsNop(Instr instr, int type) { |
3184 DCHECK(0 <= type && type <= 14); // mov pc, pc isn't a nop. | 3185 DCHECK(0 <= type && type <= 14); // mov pc, pc isn't a nop. |
3185 // Check for mov rx, rx where x = type. | 3186 // Check for mov rx, rx where x = type. |
3186 return instr == (al | 13*B21 | type*B12 | type); | 3187 return instr == (al | 13*B21 | type*B12 | type); |
3187 } | 3188 } |
3188 | 3189 |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3833 assm->instr_at_put( | 3834 assm->instr_at_put( |
3834 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); | 3835 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); |
3835 } | 3836 } |
3836 } | 3837 } |
3837 } | 3838 } |
3838 | 3839 |
3839 | 3840 |
3840 } } // namespace v8::internal | 3841 } } // namespace v8::internal |
3841 | 3842 |
3842 #endif // V8_TARGET_ARCH_ARM | 3843 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |