llvm-6502/lib
Duncan Sands dc84650679 The guaranteed alignment of ptr+offset is only the minimum of
of offset and the alignment of ptr if these are both powers of
2.  While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is.  For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8.  Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places.  Since I'm on x86 I'm
not very motivated to do this myself...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-28 12:59:45 +00:00
..
Analysis Make a comment better. 2007-10-26 03:47:14 +00:00
Archive finishing touches of bytecode -> bitcode changes. also unbreak Windows 2007-07-06 20:28:40 +00:00
AsmParser Next PPC long double bits. First cut at constants. 2007-10-11 18:07:22 +00:00
Bitcode Added serialization support for APInt. 2007-10-26 21:50:10 +00:00
CodeGen The guaranteed alignment of ptr+offset is only the minimum of 2007-10-28 12:59:45 +00:00
Debugger
ExecutionEngine add a mechanism for the JIT to invoke a function to lazily create functions as they are referenced. 2007-10-22 02:50:12 +00:00
Linker Use correct parentheses with the '&& "..."' idiom in an assert. 2007-10-08 15:13:30 +00:00
Support Clarified operator precedence. 2007-10-25 23:15:31 +00:00
System really fix PR1581, thanks to Daniel Dunbar for pointing 2007-09-28 20:50:50 +00:00
Target New entry. 2007-10-28 04:01:09 +00:00
Transforms A number of LSR fixes: 2007-10-26 23:08:19 +00:00
VMCore Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it. 2007-10-23 20:58:37 +00:00
Makefile