diff options
author | Mark Kettenis <mark.kettenis@xs4all.nl> | 2008-08-23 10:23:01 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2024-08-02 08:14:03 +0200 |
commit | 532518f89d5d872c570c6fd136caa7a75f505edd (patch) | |
tree | 1b61cb38665519f5d7378ab6b5c27d743d867df0 | |
parent | 6100635debdda392ca420e87c5b0d70bd22dfed8 (diff) |
This diff makes sunffb work on my blade1k, which has:
creator0 at upa0: Creator3D, model SUNW,501-4788, dac 10
I added the necessary .register ops to the .s files to make them compile and
nicked a fix from NetBSD to keep the FPU enabled to avoid fpu traps
that made the driver unbearably slow. Need to investigate that, maybe
the kernel isn't handling this properly.
-rw-r--r-- | Makefile.bsd-wrapper | 3 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/VISmoveImage.s | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.bsd-wrapper b/Makefile.bsd-wrapper new file mode 100644 index 0000000..0e72d98 --- /dev/null +++ b/Makefile.bsd-wrapper @@ -0,0 +1,3 @@ +# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2008/03/25 23:41:50 matthieu Exp $ + +.include <bsd.xorg.mk> diff --git a/src/Makefile.am b/src/Makefile.am index 91464fd..606624f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,6 +29,7 @@ sunffb_drv_la_LDFLAGS = -module -avoid-version sunffb_drv_ladir = @moduledir@/drivers if SPARC +AM_CFLAGS += -DUSE_VIS SPARC_ASM_SRC = ffb_asm.s VISmoveImage.s endif diff --git a/src/VISmoveImage.s b/src/VISmoveImage.s index bf9c71d..dcb0929 100644 --- a/src/VISmoveImage.s +++ b/src/VISmoveImage.s @@ -76,6 +76,10 @@ */ #if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__) + +.register %g2, #scratch +.register %g3, #scratch + #define SMUL mulx #define ICC xcc .register %g2,#scratch @@ -780,7 +784,7 @@ roll_wide: sub %tmp3, %rightw, %curw return: return %i7+8 - wr %g0, 0, %fprs + wr %g0, 4, %fprs narrowst: and %leftw, 0x38, %tmp1 @@ -2175,7 +2179,7 @@ rroll_wide: sub %curw, %rightw, %curw rreturn:return %i7+8 - wr %g0, 0, %fprs + wr %g0, 4, %fprs narrowstr: cmp %rightw, 64 |