is this a bug ? (missing logical shift from asm output)
116 uint32_t test(uint32_t x)
117 {
118 return 8U << (x & 0xFF000000U);
119 }
120
/users/
objdump x.o
00000114 test:
114: 08 20 movs r0, #8
116: 70 47 bx lr
Disassembly of section .comment:
why is the LSL missing from assembly ? Looks like it'll always return 8 - I don't have an M0+ board to give it a try though.
Prebuilt gcc on MBPro OSX
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask yann for more information if necessary.