What is the difference between the ARM, Thumb and Thumb 2 instruction encodings?

后端 未结 2 1593
萌比男神i
萌比男神i 2020-12-07 13:44

I am a bit confused about instruction sets. There are Thumb, ARM and Thumb 2. From what I have read Thumb instructions are all 16-bit but inside the ARMv7M user manu

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 14:28

    In addition to Notlikethat's answer, and as it hints at, ARMv8 introduces some new terminology to try to reduce the confusion (of course adding even more new terminology):

    There is a 32-bit execution state (AArch32) and a 64-bit execution state (AArch64).

    The 32-bit execution state supports two different instruction sets: T32 ("Thumb") and A32 ("ARM"). The 64-bit execution state supports only one instruction set - A64.

    All A64, like all A32, instructions are 32-bit (4 byte) in size, requiring 4-byte alignment.

    Many/most A64 instructions can operate on both 32-bit and 64-bit registers (or arguably 32-bit or 64-bit views of the same underlying 64-bit register).

    All ARMv8 processors (like all ARMv7 processors) support Thumb-2 instructions in the T32 instruction set.

提交回复
热议问题