Displaying 20 results from an estimated 500 matches similar to: "[PATCH 6/12] early-clobber-tss"
2007 Apr 18
1
[PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
Use an early clobber on addr to avoid the extra rorl instruction at the
end of _set_tssldt_desc.
Also, get some C type checking on the descriptor struct here.
Patch-base: 2.6.13-rc5-mm1
Patch-keys: i386 desc cleanup optimize
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/desc.h
===================================================================
---
2007 Apr 18
1
[PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
Use an early clobber on addr to avoid the extra rorl instruction at the
end of _set_tssldt_desc.
Also, get some C type checking on the descriptor struct here.
Patch-base: 2.6.13-rc5-mm1
Patch-keys: i386 desc cleanup optimize
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/desc.h
===================================================================
---
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
Ancient inline assembler that manipulates descriptor tables is unreadable
and has no type checking. Doing this in C actually generates better code,
saves code space, and improves readability.
The fact that you must cast descriptors to (char *) for the inline assembler
to work properly caused me no end of grief working on these patches.
Note that GCC does not generate rotations to utilize
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
Ancient inline assembler that manipulates descriptor tables is unreadable
and has no type checking. Doing this in C actually generates better code,
saves code space, and improves readability.
The fact that you must cast descriptors to (char *) for the inline assembler
to work properly caused me no end of grief working on these patches.
Note that GCC does not generate rotations to utilize
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
Stop using extra underscores on asm and volatiles, that is just silly.
Also, make lgdt/lidt/sgdt/sldt explicitly "l".
Index: linux-2.6.13/include/asm-i386/desc.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
Stop using extra underscores on asm and volatiles, that is just silly.
Also, make lgdt/lidt/sgdt/sldt explicitly "l".
Index: linux-2.6.13/include/asm-i386/desc.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
Descriptor and trap table cleanups. Add cleanly written accessors for
IDT and GDT gates so the subarch may override them. Note that this
allows the hypervisor to transparently tweak the DPL of the descriptors
as well as the RPL of segments in those descriptors, with no unnecessary
kernel code modification. It also allows the hypervisor implementation
of the VMI to tweak the gates, allowing for
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
Descriptor and trap table cleanups. Add cleanly written accessors for
IDT and GDT gates so the subarch may override them. Note that this
allows the hypervisor to transparently tweak the DPL of the descriptors
as well as the RPL of segments in those descriptors, with no unnecessary
kernel code modification. It also allows the hypervisor implementation
of the VMI to tweak the gates, allowing for
2007 Apr 18
0
[PATCH 9/12] base-into-desc
Move base / limit accessors into desc.h, where they properly belong.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/system.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/system.h 2005-08-08 17:58:03.000000000 -0700
+++ linux-2.6.13/include/asm-i386/system.h 2005-08-08 18:01:31.000000000 -0700
2007 Apr 18
0
[PATCH 9/12] base-into-desc
Move base / limit accessors into desc.h, where they properly belong.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/system.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/system.h 2005-08-08 17:58:03.000000000 -0700
+++ linux-2.6.13/include/asm-i386/system.h 2005-08-08 18:01:31.000000000 -0700
2007 Apr 18
0
[PATCH 10/14] i386 / Move descriptor accessors into desc h
Move base / limit accessors into desc.h, where they properly belong.
Patch-base: 2.6.13-rc5-mm1
Patch-keys: i386 desc cleanup
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/system.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/system.h 2005-08-09 20:17:26.000000000 -0700
+++
2007 Apr 18
0
[PATCH 10/14] i386 / Move descriptor accessors into desc h
Move base / limit accessors into desc.h, where they properly belong.
Patch-base: 2.6.13-rc5-mm1
Patch-keys: i386 desc cleanup
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/system.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/system.h 2005-08-09 20:17:26.000000000 -0700
+++
2007 Apr 18
0
[PATCH 8/12] base-limit-cleanup
Found some stray descriptor table accessors that had non-optimal assembler
constraints. Use "q" to get word, high and low byte access without forcing
a specific register constraint. Add desc as a memory output operand.
Also, get_base was completely unused. Deprecate it.
The function get_limit is also unused, but I did not deprecate it; it could
be used in arch/i386/mm/fault.c.
2007 Apr 18
0
[PATCH 8/12] base-limit-cleanup
Found some stray descriptor table accessors that had non-optimal assembler
constraints. Use "q" to get word, high and low byte access without forcing
a specific register constraint. Add desc as a memory output operand.
Also, get_base was completely unused. Deprecate it.
The function get_limit is also unused, but I did not deprecate it; it could
be used in arch/i386/mm/fault.c.
2007 Apr 18
0
[PATCH 9/14] i386 / Typecheck and optimize base and limit accessors
Found some stray descriptor table accessors that had non-optimal assembler
constraints. Use "q" to get word, high and low byte access without forcing
a specific register constraint. Add desc as a memory output operand.
Also, get_base was completely unused. Deprecate it.
The function get_limit is also unused, but I did not deprecate it; it could
be used in arch/i386/mm/fault.c.
2007 Apr 18
0
[PATCH 9/14] i386 / Typecheck and optimize base and limit accessors
Found some stray descriptor table accessors that had non-optimal assembler
constraints. Use "q" to get word, high and low byte access without forcing
a specific register constraint. Add desc as a memory output operand.
Also, get_base was completely unused. Deprecate it.
The function get_limit is also unused, but I did not deprecate it; it could
be used in arch/i386/mm/fault.c.
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
Add an accessor function for getting the per-CPU gdt. Callee must already
have the CPU.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.14-rc1/include/asm-i386/desc.h
===================================================================
--- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700
+++ linux-2.6.14-rc1/include/asm-i386/desc.h
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
Add an accessor function for getting the per-CPU gdt. Callee must already
have the CPU.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.14-rc1/include/asm-i386/desc.h
===================================================================
--- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700
+++ linux-2.6.14-rc1/include/asm-i386/desc.h
2012 Jul 29
0
[LLVMdev] rotate
I can get clang/llvm to emit a rotate instruction on x86-64 when compiling C by just using -Os and the rotate from Hacker's Delight i.e.,
======
#include <stdlib.h>
#include <stdint.h>
uint32_t ror(uint32_t input, size_t rot_bits)
{
return (input >> rot_bits) | (input << ((sizeof(input) << 3) - rot_bits));
}
======
Then compile with (assuming you are on OS
2012 Jul 29
3
[LLVMdev] rotate
Nice!
Clever compiler..
On 07/28/2012 08:55 PM, Michael Gottesman wrote:
> I can get clang/llvm to emit a rotate instruction on x86-64 when compiling C by just using -Os and the rotate from Hacker's Delight i.e.,
>
> ======
> #include<stdlib.h>
> #include<stdint.h>
>
> uint32_t ror(uint32_t input, size_t rot_bits)
> {
> return (input>>