aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-07-14 10:57:18 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:04 +0800
commit3400a8754214f4cd69d49d85c0396665d7a6415f (patch)
tree8e6218d779196123eb368b136d91ae55ad2bc418 /com32/lib/sys/vesa
parent967eb65904c0de527fccee529187bf0dcb4af989 (diff)
downloadsyslinux-3400a8754214f4cd69d49d85c0396665d7a6415f.tar.gz
syslinux-3400a8754214f4cd69d49d85c0396665d7a6415f.tar.xz
syslinux-3400a8754214f4cd69d49d85c0396665d7a6415f.zip
elflink: add more change as show below
com32/lib/chdir.c com32/lib/getcwd.c com32/lib/getopt.c com32/lib/pci/scan.c com32/lib/sys/farcall.c com32/lib/sys/times.c com32/lib/sys/vesa/background.c com32/lib/sys/vesa/screencpy.c com32/lib/vdprintf.c com32/rosh/rosh.c com32/rosh/rosh.h com32/sysdump/backend.h com32/sysdump/be_tftp.c com32/sysdump/main.c com32/sysdump/memmap.c com32/sysdump/sysdump.h com32/sysdump/vesa.c doc/comboot.txt doc/extlinux.txt doc/gpt.txt doc/memdisk.txt doc/menu.txt doc/syslinux.txt
Diffstat (limited to 'com32/lib/sys/vesa')
-rw-r--r--com32/lib/sys/vesa/background.c4
-rw-r--r--com32/lib/sys/vesa/screencpy.c7
2 files changed, 3 insertions, 8 deletions
diff --git a/com32/lib/sys/vesa/background.c b/com32/lib/sys/vesa/background.c
index 8d732395..93577461 100644
--- a/com32/lib/sys/vesa/background.c
+++ b/com32/lib/sys/vesa/background.c
@@ -34,6 +34,7 @@
#include <sys/stat.h>
#include <minmax.h>
#include <stdbool.h>
+#include <ilog2.h>
#include <syslinux/loadfile.h>
#include "vesa.h"
#include "video.h"
@@ -255,8 +256,7 @@ int vesacon_default_background(void)
z = max(__vesa_info.mi.v_res, __vesa_info.mi.h_res) >> 1;
z = ((z*z) >> 11) - 1;
- asm("bsrl %1,%0" : "=r" (shft) : "rm" (z));
- shft++;
+ shft = ilog2(z) + 1;
for (y = 0, dy = -(__vesa_info.mi.v_res >> 1);
y < __vesa_info.mi.v_res; y++, dy++) {
diff --git a/com32/lib/sys/vesa/screencpy.c b/com32/lib/sys/vesa/screencpy.c
index 9740ea14..32dce9e6 100644
--- a/com32/lib/sys/vesa/screencpy.c
+++ b/com32/lib/sys/vesa/screencpy.c
@@ -30,6 +30,7 @@
#include <klibc/compiler.h>
#include <string.h>
#include <com32.h>
+#include <ilog2.h>
#include "vesa.h"
#include "video.h"
@@ -41,12 +42,6 @@ static struct win_info {
int win_num;
} wi;
-static inline int __constfunc ilog2(unsigned int x)
-{
- asm("bsrl %1,%0" : "=r"(x) : "rm"(x));
- return x;
-}
-
void __vesacon_init_copy_to_screen(void)
{
struct vesa_mode_info *const mi = &__vesa_info.mi;