What's the meaning of W suffix for thumb-2 instruction?

前端 未结 3 988
盖世英雄少女心
盖世英雄少女心 2021-01-20 20:12

There is a w suffix for thumb-2 instruction as below, how does it change the semantic of the instruction without it? The search result is very noisy and I didn\'t get the an

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-20 21:17

    I see ADDW in Cortex-M3 TRM Table 2-5

    Data operations with large immediate
    ADDW and SUBW have a 12-bit immediate. This means they can replace many from memory literal loads.
    

    It is also mentioned in Quick Reference

    add wide T2 ADD Rd, Rn, #
    

    Looks like the assembler would recognize the immediate constant <= 12 bits, and do the needful.

    In the context where you see it, it is an ordinary "add".

提交回复
热议问题