diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/README.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 8481fa6f2c..6ff181771b 100644 --- a/lib/Target/X86/README.txt +++ b/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. + |