Discussion Overview
The discussion revolves around the constraints of the ARM mov instruction, particularly regarding the representation of immediate values in assembly code. Participants explore the limitations of moving 32-bit immediate values into registers, the use of pseudoinstructions, and the implications of rotations in ARM assembly language.
Discussion Character
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- Some participants explain that there is no 32-bit MOV immediate instruction in ARM, only an 8-bit MOV immediate followed by an even-number-of-bits rotation.
- One participant mentions that their code works in the ArmSim simulator, suggesting it may treat MOV with a 32-bit immediate as a pseudoinstruction.
- Another participant notes that the MOV instruction can take a 16-bit immediate, and when provided with a 32-bit immediate, it attempts to translate this into a single 32-bit instruction using an 8-bit immediate value and a rotation.
- Some participants discuss specific values that can be used without error, such as 0xFFFFFFF1, indicating that it is a permitted value due to its relationship with the bitwise complement.
- There is a request for clarification on what constitutes an even-number-of-bits rotation, with references to documentation for further explanation.
Areas of Agreement / Disagreement
Participants express differing views on the behavior of the ARM assembler and the treatment of immediate values, leading to unresolved questions about the specifics of the MOV instruction and its limitations.
Contextual Notes
Participants reference documentation and specific examples to illustrate their points, but there are unresolved aspects regarding the interpretation of pseudoinstructions and the exact constraints on immediate values.