From 532518f89d5d872c570c6fd136caa7a75f505edd Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 23 Aug 2008 10:23:01 +0200 Subject: 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. --- Makefile.bsd-wrapper | 3 +++ src/Makefile.am | 1 + src/VISmoveImage.s | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Makefile.bsd-wrapper 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 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 -- cgit v1.2.3