diff options
author | 2016-12-19 20:03:15 +0000 | |
---|---|---|
committer | 2016-12-19 20:03:15 +0000 | |
commit | a175244698d03f60581128e7cdf980c34a41905a (patch) | |
tree | 6bcf0326feed1bd1de44459a6460a6e66ce6ae02 /sys/dev/pv/xen.c | |
parent | Revert r1.934 to unbreak autoinstall (diff) | |
download | wireguard-openbsd-a175244698d03f60581128e7cdf980c34a41905a.tar.xz wireguard-openbsd-a175244698d03f60581128e7cdf980c34a41905a.zip |
Generating mixed 16-bit/32-bit/64-bit code with clang's integrated
assembler is a bit tricky. It supports the .code16, .code32 and
.code64 directives. But it doesn't know about the data16/data32 and
addr16/addr32 instruction prefixes. Instead it tries to determine
those from the instruction opcode. It mostly succeeds, but there are
a couple of corner cases where clang will generate the "addr32" form
where gas generates the "addr16" form in .code16 segments. That
should be no problem (and just waste a couple of bytes), but it makes
comparing the generated code a bit difficult.
Allow the trampoline code to be compiled with both. For clang #define
away the addr32 prefix and avoid using the data32 prefix by using a
mnemonic that explicitly encodes the size of the operand. Add a few
addr32 prefixes in .code16 blocks to reduce the differences between
code generated by clang and gas.
ok patrick@, deraadt@, mlarkin@
Diffstat (limited to 'sys/dev/pv/xen.c')
0 files changed, 0 insertions, 0 deletions