diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-12-28 20:01:47 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-12-28 20:01:47 -0800 |
commit | 83bec4a59eec5a704aab037ca0d2fd6ebcd0dbc0 (patch) | |
tree | eab790ca2dc543b21eab553175a1a16bdc6279c1 /build_and_test_until | |
parent | 6e79e84a72fac33a4f83e3dbd595888d10c22c54 (diff) | |
download | mu-83bec4a59eec5a704aab037ca0d2fd6ebcd0dbc0.tar.gz |
7449
There's an ambiguity in how x86 interprets disp32 fields: - For jumps and calls they're displacements from the starting address of the next instruction. So far so good. - However, when the ModR/M requires them they can also be absolute addresses. Ideally I'd take the presence of the ModR/M byte into account in interpreting them. However, it's easier to assume relative addressing only for labels in the code segment. This commit raises an error if we ever refer to labels in the code segment in instructions with a ModR/M byte. (I'm assuming that no instruction with a ModR/M byte will ever use a displacement without the ModR/M byte requiring it.)
Diffstat (limited to 'build_and_test_until')
0 files changed, 0 insertions, 0 deletions