0

I am confused by the Thumb 2 instruction set.

I understand that ARM instruction is 32 bit in size, thumb is 16 bit in size and thumb 2 is 32/16 bit in size.

I can find sample ARM instructions from this link and thumb instructions from this link.

But I can't find any Thumb 2 instructions. Could anyone show some thumb 2 instructions ?

I think I haven't got the concept of Thumb 2 instructions(that might be the reason why I can't find any Thmub 2 instructions). Could anyone clarify much better ?

robomon
  • 269
  • 2
  • 16
  • 2
    _ARM Architecture Reference Manual Thumb-2 Supplement_ (document number _ARM DDI 0308D_) will probably be of interest to you. – Michael Sep 11 '15 at 09:23
  • 1
    You're looking in the wrong places, which should become clear with a bit more background research: ARM7TDMI is ARMv4 - Thumb-2 was introduced many years later after ARMv6. Try [a more modern instruction set reference](http://infocenter.arm.com/help/topic/com.arm.doc.dui0473l/dom1361289850039.html), or [the ARMv7 ARM](http://infocenter.arm.com/help/topic/com.arm.doc.ddi0406c/index.html) if you want the actual encodings. [Thumb-2 is not "an instruction set" as such](http://stackoverflow.com/q/28669905/3156750) – Notlikethat Sep 11 '15 at 09:23
  • 1
    thumb2 came out with ARMv6 with a relatively small number of "thumb extensions", then with ARMv7 it exploded with another 140-150 new extensions. these all being formerly undefined thumb instructions turned into 32 bit thumb2. infocenter.arm.com has architectural reference manuals and it is somewhat trivial to find all the instructions and what architecture they were first introduced (hint: just get the ARMv7 A, or R, or M reference manual as Notlikethat said). – old_timer Sep 11 '15 at 13:05
  • 1
    what you will find is from an assembly language perspective they somewhat match big brother arm instructions, from a machine code perspective they are definitely different. arm has tried to introduce a unified assembly language, and it is up to the assembler to determine if the instruction set encoding being produced for that blob of code can implement the assembly. for example thumb you can add r1,#1 but you cant add r1,r2,#1 so should the thumb asm allow add r1,r1,#1? perhaps it didnt used to but this is attempt to allow it to. – old_timer Sep 11 '15 at 13:07

0 Answers0