ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Вторник
2 июля
75294
alexru (05.12.2006 21:21, просмотров: 595)
LSR в ARM Почему в режиме адресации 1 (addresseing mode 1) у инструкции LSR такое разное поведение при нулевом смещении при указании константы и регистра? Почему в одном случак shifter_operand = Rm, а в другом 0? В той-же инструкции LSL все в порядке. ------- <Rm>, LSR #<shift_imm> if shift_imm == 0 then shifter_operand = 0 // ??????? shifter_carry_out = Rm[31] else /* shift_imm > 0 */ shifter_operand = Rm Logical_Shift_Right shift_imm shifter_carry_out = Rm[shift_imm - 1] ---------- <Rm>, LSR <Rs> if Rs[7:0] == 0 then shifter_operand = Rm // ??????? shifter_carry_out = C Flag else if Rs[7:0] < 32 then shifter_operand = Rm Logical_Shift_Right Rs[7:0] shifter_carry_out = Rm[Rs[7:0] - 1] else if Rs[7:0] == 32 then shifter_operand = 0 shifter_carry_out = Rm[31] else /* Rs[7:0] > 32 */ shifter_operand = 0 shifter_carry_out = 0 --------