diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-08-29 16:34:50 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-08-29 16:34:50 -0400 |
commit | f69fa9a91f60fff6f2d8b658b7d84d235d9d89b7 (patch) | |
tree | 5fb0d2b09deda3299e2e303924ec8b3466840ffa | |
parent | bdfc017eead9bc17cd23317ff42eb7297cb9468a (diff) |
x86, doc: Update uaccess.h comment to reflect clang changes
Update comment in uaccess.h to reflect the changes for clang support:
gcc only cares about the base register (most architectures don't
encode the size of the operation in the operands like x86 does, and so
it is treated effectively like a register number), whereas clang tries
to enforce the size -- but not for register pairs.
Link: http://lkml.kernel.org/r/1377803585-5913-3-git-send-email-dl9pf@gmx.de
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jan-Simon Möller <dl9pf@gmx.de>
-rw-r--r-- | arch/x86/include/asm/uaccess.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index f715fee40821..5838fa911aa0 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h | |||
@@ -153,11 +153,14 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL)) | |||
153 | * Careful: we have to cast the result to the type of the pointer | 153 | * Careful: we have to cast the result to the type of the pointer |
154 | * for sign reasons. | 154 | * for sign reasons. |
155 | * | 155 | * |
156 | * The use of %edx as the register specifier is a bit of a | 156 | * The use of _ASM_DX as the register specifier is a bit of a |
157 | * simplification, as gcc only cares about it as the starting point | 157 | * simplification, as gcc only cares about it as the starting point |
158 | * and not size: for a 64-bit value it will use %ecx:%edx on 32 bits | 158 | * and not size: for a 64-bit value it will use %ecx:%edx on 32 bits |
159 | * (%ecx being the next register in gcc's x86 register sequence), and | 159 | * (%ecx being the next register in gcc's x86 register sequence), and |
160 | * %rdx on 64 bits. | 160 | * %rdx on 64 bits. |
161 | * | ||
162 | * Clang/LLVM cares about the size of the register, but still wants | ||
163 | * the base register for something that ends up being a pair. | ||
161 | */ | 164 | */ |
162 | #define get_user(x, ptr) \ | 165 | #define get_user(x, ptr) \ |
163 | ({ \ | 166 | ({ \ |