TAILIEUCHUNG - ARM Architecture Reference Manual- P12

ARM Architecture Reference Manual- P12: The ARM instruction set architecture has evolved significantly since it was first developed, and will continue to be developed in the future. In order to be precise about which instructions exist in any particular ARM implementation, five major versions of the instruction set have been defined to date. | Thumb Instructions Exceptions None Operation if H 10 then LR PC SignExtend offset_11 12 else if H 11 then PC LR offset_11 1 LR address of next instruction 1 else if H 01 then PC LR offset_11 1 AND OxFFFFFFFC LR address of next instruction 1 T Flag 0 Usage To generate the correct pair of instructions the assembler or other toolkit component must first generate the branch offset as follows 1. F orm the base address for the branch. This is the address of the first of the two Thumb instructions the one with H 10 plus 4. In other words the base address is equal to the PC value read by that instruction. 2. If the instruction is BLX set bit 1 of the target address to be equal to bit 1 of the base address. This is an exception to the normal rule that bits 1 0 of the address of an ARM instruction are 0b00. This adjustment is required to ensure that the restrictions associated with the H 01 form of the instruction are obeyed. 3. Subtract the base address from the target address to form the offset. The resulting offset is always even. If the offset lies outside the range -222 offset 222 - 2 the target address lies outside the addressing range of these instructions. This results in alternative code or an error as appropriate. If the offset is in range a sequence of two Thumb instructions must be generated both using the above form The first with H 10 and offset_11 offset 22 12 . The second with H 11 for BL or H 01 for BLX and offset_11 offset 11 1 . ARM DDI 0100E Copyright 1996-2000 ARM Limited. All rights reserved. A7-27 Thumb Instructions Notes Encoding If H 00 the instruction is an unconditional branch instruction instead see the Thumb instruction B 2 on page A7-20 . Bit 0 for BLX If H 01 then bit 0 of the instruction must be zero or the instruction is UNDEFINED. The offset calculation method described in Usage above ensures that the offset calculated for a BLX instruction is a multiple of four and that this restriction is obeyed. Memory bounds Branching backwards past .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.