Dear colleagues.
I am compiling the Intel TBB in an effort to optimize my code to the Cortex-M53, however, because I was still forced to use GCC 4.9 I'm getting some warning messages about the use of 32bit Thumb Instrucions in IT blocks:
Warning: It blocks containing 32-bit Thumb instructions are deprecated in ARMv8
I know it's a bug in this release and that may already be solved in GCC version 5.3 but still can not migrate this environment for a new version.
This can bring some instability to my code or can be ignored by time?
Hi Carlos Delfino,
let me confirm that you say GCC4.9 generates the warning even if the IT block does not contain any 32bit Thumb Instructions.
If it is true, there seems not to be any means to stop the warning.
According to the GCC syntax, '-mno-restrict-it' would stop it.
However, '-mno-restrict-it' was not implemented but only '-mrestrict-it' was implemented.
If it is not true, you cannot use 32bit Thumb instruction in the IT block, probably causing some errors.
According to https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html , it is described "IT blocks can only contain a single 16-bit instruction from a select set of instructions. This option is on by default for ARMv8 Thumb mode".
GCC would generate the following 11 warnings for an IT block.
Warning: it blocks containing wide Thumb instructions are deprecated in ARMv8 Warning: it blocks of more than one conditional instruction are deprecated in ARMv8 Warning: it blocks of more than one conditional instruction are deprecated in ARMv8 Warning: it blocks containing wide Thumb instructions are deprecated in ARMv8 Warning: it blocks of more than one conditional instruction are deprecated in ARMv8 Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Miscellaneous 16-bit instructions Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Literal loads Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Hi-register ADD, MOV, CMP, BX, BLX using pc Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
Warning: it blocks containing wide Thumb instructions are deprecated in ARMv8
Warning: it blocks of more than one conditional instruction are deprecated in ARMv8
Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM
Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Miscellaneous 16-bit instructions
Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Literal loads
Warning: it blocks containing 16-bit Thumb intsructions of the following class are deprecated in ARMv8: Hi-register ADD, MOV, CMP, BX, BLX using pc
(source: https://sourceware.org/ml/binutils/2012-08/msg00399.html )
Best regards,
Yasuhiko Koumoto.
You can ignore it.I checked the Cortex-A53 TRM.The warning should be produced only in the case that SCTLR_EL1.ITD is '1'.As the reset value of SCTLR_EL1.ITD is '0', the IT instruction functionality is enabled and there would be no restrictions.Therefore, it would be shown as a warning.Also I checked GCC 5.4, and found the same messages as GCC 4.9 were generated, but the word 'Warning' was omitted.As the results, you had not betther be worried about it.
It is probably also worth noting that these instructions are only "deprecated for performance reasons". That is, ARMv8 is warning that using these instructions in IT blocks might be detrimental to performance on some implementations. So far as I am aware, this is not the case on Cortex-A53. The purpose of the ITD bit is to provide a method to scan for such instructions on such implementations as a debugging aid. However, ITD is an optional control, meaning no operating system should be relying on it.
Thank you all for the reply, I apologize for the absence, but I'm focused on assembling a QEMU environment for tests on this post so I can speed up the tests.