diff options
author | ed <ed@FreeBSD.org> | 2009-06-08 15:36:37 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-08 15:36:37 +0000 |
commit | de000e339094f8c6e06a635dac9a803861416ec6 (patch) | |
tree | 674737fb36b447a4141b2fbaf40d3465434fdfad /include/llvm/Support | |
parent | e65fe1a3e103e3aa81b69704d20eb95f54097271 (diff) | |
download | FreeBSD-src-de000e339094f8c6e06a635dac9a803861416ec6.zip FreeBSD-src-de000e339094f8c6e06a635dac9a803861416ec6.tar.gz |
Import LLVM r73070.
Now I'm going to stop importing code for a while. I spent a lot of time
the last couple of days figuring out which LLVM commit caused g++ to
miscompile, which in its turn caused Clang to miscompile the next build.
I had to run `make buildworld' twice each time I bisected a revision.
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/OutputBuffer.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/Support/OutputBuffer.h b/include/llvm/Support/OutputBuffer.h index b2077c5..1adff2d 100644 --- a/include/llvm/Support/OutputBuffer.h +++ b/include/llvm/Support/OutputBuffer.h @@ -134,11 +134,22 @@ namespace llvm { P[2] = (X >> (isLittleEndian ? 16 : 8)) & 255; P[3] = (X >> (isLittleEndian ? 24 : 0)) & 255; } + void fixxword(uint64_t X, unsigned Offset) { + unsigned char *P = &Output[Offset]; + P[0] = (X >> (isLittleEndian ? 0 : 56)) & 255; + P[1] = (X >> (isLittleEndian ? 8 : 48)) & 255; + P[2] = (X >> (isLittleEndian ? 16 : 40)) & 255; + P[3] = (X >> (isLittleEndian ? 24 : 32)) & 255; + P[4] = (X >> (isLittleEndian ? 32 : 24)) & 255; + P[5] = (X >> (isLittleEndian ? 40 : 16)) & 255; + P[6] = (X >> (isLittleEndian ? 48 : 8)) & 255; + P[7] = (X >> (isLittleEndian ? 56 : 0)) & 255; + } void fixaddr(uint64_t X, unsigned Offset) { if (!is64Bit) fixword((unsigned)X, Offset); else - assert(0 && "Emission of 64-bit data not implemented yet!"); + fixxword(X, Offset); } unsigned char &operator[](unsigned Index) { |