getmode: make getmode 8bit
authorAlan Cox <alan@linux.intel.com>
Mon, 22 Feb 2016 21:46:10 +0000 (21:46 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 22 Feb 2016 21:46:10 +0000 (21:46 +0000)
commit98055e0a161627b2f2cdc6c7bc620473ed30d526
tree9d1d3d23685585b490e4a1096dddc7c55a5a8bd4
parent6b820b6e02b743301df694507791afda55a59371
getmode: make getmode 8bit

We do a lot of compares and switches with getmode and the switches in particular
get expensive on an 8 bit processor. Instead shift stuff and force it all into
8bit space.

This saves us a couple of hundred bytes even though SDCC still writes very
poor code for 8bit switches

Alan
Kernel/filesys.c
Kernel/include/kernel.h
Kernel/inode.c
Kernel/select.c
Kernel/syscall_fs2.c
Kernel/syscall_fs3.c
Kernel/syscall_other.c