IT-block ends prematurely 오류

기술노트 31138

아키텍처:

ARM

컴포넌트:

compiler

업데이트:

2018-02-28 오전 1:45

Introduction

IAR Embedded Workbench for ARM version 7.30 (and earlier) accepted constructions like:

[...]
asm("ITE EQ");
asm("MRSEQ R0, MSP");
asm("MRSNE R0, PSP");
[...]

The above is a bug which is corrected in IAR Embedded Workbench for ARM version 7.40.1.

The code above will generate diagnostic messages like:

Error[Ta117]: IT-block ends prematurely, or there is a label within the IT-block

Discussion

The construction above is unsafe, as in-between the asm()-statements it was possible to place ordinary C source code.

Suggested rewrite

Change the construction into a single inline assebler statement, with multiple lines.

The above construction should be rewritten to:

[...]
asm("ITE EQ \n"
"MRSEQ R0, MSP \n"
"MRSNE R0, PSP");
[...]

 

 

All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.