diff options
author | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2021-08-27 10:48:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 10:48:07 +0200 |
commit | 4daebb7a0a534295627fc386964df950b19cc575 (patch) | |
tree | e18505e8ce668fb43bc2cf829d728a58a06a88b1 /riscV | |
parent | d2595e3afb8c38a3391a66c3fc3f7a92fff9eff4 (diff) | |
download | compcert-4daebb7a0a534295627fc386964df950b19cc575.tar.gz compcert-4daebb7a0a534295627fc386964df950b19cc575.zip |
Protect against overflows in `leaq N(src), dst` (#407)
If N does not fit in signed 32 bits, `leaq` cannot be used and
`mov; addq` must be used instead.
This was already the case for `leaq` instructions produced by the Asmgen
pass, but not for some `leaq` instructions produced by Asmexpand.
Normally, assemblers should fail if the `leaq` offset is not representable,
but this is not always the case (see issue #406).
Fixes: #406
Diffstat (limited to 'riscV')
0 files changed, 0 insertions, 0 deletions