diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-02-08 17:47:22 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-02-08 17:47:22 +0000 |
| commit | b4fc050f0f9e1dc55c148d4534929cfe908983d7 (patch) | |
| tree | 57ec3b323bb1ac0ea9c46b3b70c0c42d5f02992e /llvm/lib | |
| parent | 6f5a00fd6838d10ff72cf63b8ee0211310b3d9d3 (diff) | |
| download | bcm5719-llvm-b4fc050f0f9e1dc55c148d4534929cfe908983d7.tar.gz bcm5719-llvm-b4fc050f0f9e1dc55c148d4534929cfe908983d7.zip | |
add a simple optimization
llvm-svn: 26062
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/README.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index 8481fa6f2cf..6ff181771be 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -411,3 +411,19 @@ void clearbit(int *target, int bit) { *target &= ~(1 << bit); } +//===---------------------------------------------------------------------===// + +Easy: Global addresses are not always allowed as immediates. For this: + +int dst = 0; int *ptr = 0; +void foo() { ptr = &dst; } + +we get this: + +_foo: + movl $_dst, %eax + movl %eax, _ptr + ret + +When: "movl $_dst, _ptr" is sufficient. + |

