Hacker News new | past | comments | ask | show | jobs | submit login

Modern ARM has load halfword insns too, so you can use those or the 8-bit imm encoding depending on the constant.

For a full 32 bit value prior to movw/movt you'd most likely load it from a constant pool rather than do a 4 insn sequence. (Some 32 bit values can be done with clever choice of 8imm sequences -- there's an algorithm you can use as a compiler to say "given this value can I create it in 3 or less insns?", which is worth the effort if you're targeting a pre-movw ARM cpu.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: