Hi , I am New to this Community
I am Studying now Cortex-M3 .. I am reading Joseph Yiu book...
I am Confused in the part of the instruction set , and I couldn't get the following:
as i understand that some of the original ARM 32-bit instructions are 32-bit encoded and could be Executed as 32-bit instruction
if the processor in Thumb mode otherwise in ARM mode All instructions should be only 32-bit ... Thumb-2 Allow Execution of both 16-bit and 32 bit instructions .....Now my questions :
1) 16-bit Thumb instructions are subset of the original ARM but 16-bit encoded , but in Thumb-2 the rest 32-bit instructions where did they come from , are they are the rest of the ARM ISA that where not 16-bit encoded ?
2) I read that some instructions could be represented as 16-bit or 32-bit equivalent , Now why and How an instruction could have two formats(16- and 32- ) please give an example .
3) how could I group instructions into three groups (16- bit only) , (32-bit only) , (could be represented as either)?
please elaborate ...
thanks
First of All Thanks for your Answer , after asking that question I consulted the the ARMv7-M Equivelent of the Document you have just mentioned ... I found that in some cases 16-bit instructions could be represented as 32-bit version and vice versa in special cases .. but that require some assembler Intelligence ..[that was not explicitly mensioned but i understood that .. see section A7.7.2]. ADC(register version) if The destination is the same as the first register you can represent it using the 32-bit corresponding Encoding setting the second register same as destination and making the shift value to be added Equal to zero .. it will have the same effect.... going backward requires shift value to be zero and the destination register is the same as the first register ..