Bit ops/bit masks
authorRonald G. Minnich <rminnich@google.com>
Thu, 13 Feb 2014 01:44:20 +0000 (17:44 -0800)
committerRonald G. Minnich <rminnich@google.com>
Thu, 13 Feb 2014 01:44:20 +0000 (17:44 -0800)
commit416e1b6b5751de0e7a9706f7e5e344823af5b72b
tree2d55d1c28e1d465395aeff2b3ef3999fe3740db4
parent3445ee7efa13287fa8bc15ce800ad1fb4b2f649a
Bit ops/bit masks

Wow, this turned into a saga.

What I'd like to do long term is figure out which of the gcc builtin ops
we could use and get rid of this nonsense, but that's a project for another
day. I did end up using __builtin_popcount, let's hope it actually works.
But by using that I got to NOT use some really awful stuff from the Linux
kernel that I never want to look at again.

This is reasonably good stuff from Linux, otherwise.

I'm turning off the vmx stuff for now because I'm doing some testing with Another
System and the two collide. The vm bits will no longer compile until some rework
is done on them anyway. Sorry.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
14 files changed:
kern/arch/x86/Kbuild
kern/arch/x86/arch.h
kern/arch/x86/bitops.h
kern/arch/x86/virtext.h [new file with mode: 0644]
kern/drivers/dev/Kbuild
kern/include/bitmap.h [new file with mode: 0644]
kern/include/bitops.h [new file with mode: 0644]
kern/include/env.h
kern/include/ros/common.h
kern/include/smp.h
kern/src/Kbuild
kern/src/bitmap.c [new file with mode: 0644]
kern/src/find_last_bit.c [new file with mode: 0644]
kern/src/find_next_bit.c [new file with mode: 0644]