Skip to main content
Asoni.1
Associate II
Aug 18, 2020 6:32 AM UTC
Solved

Does STM32G431 have an Arithmetic Left Shift operation.

..

This topic has been closed for replies.
Uwe Bonnes
Uwe BonnesBest answer
Chief
Aug 18, 2020 8:51 AM UTC

It seems there is no ASL. However LSL should do the job.

3 replies

Uwe Bonnes
Uwe BonnesBest answer
Chief
Aug 18, 2020 8:51 AM UTC

It seems there is no ASL. However LSL should do the job.

waclawek.jan
Super User
Aug 18, 2020 8:52 AM UTC

If you mean sign-preserving left-shift, then no.

For the Cortex-M4 instruction set, see PM0214.

JW

Uwe Bonnes
Chief
Aug 18, 2020 11:10 AM UTC

Use "* (1 << shift)" as workaround to preserve sign