Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

ARM: Strange behavior of the "smmls" instruction (1 Replies)

$
0
0
I try to optimize my code by substituting a pair of smull and sub instructions with one smmls instruction, but the smmls gives the wrong result! This is the test case: mov32 r1, #0x8000d286 mov32 r2, #0xfcdbc095 mov32 r3, #0x01921d20 smull r0, ip, r1, r2 sub r0, r3, ip smmls r0, r1, r2, r3 The combination of smull and sub gives zero as expected. But the smmls gives 0xffffffff. I tried to run this code in a simulator (Cortex-M4) and on a real hardware (STM32F

Viewing all articles
Browse latest Browse all 3049

Trending Articles