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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to