summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-12-19 20:03:16 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-12-19 20:03:16 +0000
commit0725638c5fe4aaf658db86333c306526c3cea32e (patch)
treefee83e4e0093da35d3efa7518e5a7e2d990839e7 /gnu
parent435f15693f84d9f4b2c6c5c8010b5da0d64d52ad (diff)
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 'gnu')
0 files changed, 0 insertions, 0 deletions