diff options
| -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. + |

