[fpc-devel] Policy regarding SHL/SHR under x86
Kai Burghardt
wiz at KaiBurghardt.de
Mon Oct 24 12:58:25 CEST 2022
Hi there:
On 2022‑10‑24 11:51:32 +0100, J. Gareth Moreton via fpc-devel wrote:
> [...] I've come across one situation that I need clarity on... how
> are SHL and SHR instructions handled if the shift value exceeds the word
> size?
About a half year ago I raised a documentation issue regarding that:
https://gitlab.com/freepascal.org/fpc/documentation/-/issues/39304
Bottom line: The behavior is _undefined_. Explanation by Jonas Maebe:
> Such behaviour is indeed undefined (it's not implementation-defined
> because when evaluating at compile time you may get different results
> compared to when it gets evaluated at run time due to architecture
> peculiarities).
--
Sincerely yours,
Kai Burghardt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 880 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20221024/de2dc6b6/attachment.sig>
More information about the fpc-devel
mailing list