# HG changeset patch # User David du Colombier <0intro@gmail.com> # Date 1331301831 -3600 # Node ID e9319d6e603007868d033df39d561d7ab7d72518 # Parent 66593baf795eb8631799d01be7c2ebdb3a710ea9 nix: sync with plan 9 R=nixiedev, quanstro CC=nix-dev http://codereview.appspot.com/5793044 Committer: Francisco J Ballesteros diff -r 66593baf795e -r e9319d6e6030 sys/src/9/pc/usbehci.h --- a/sys/src/9/pc/usbehci.h Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/9/pc/usbehci.h Fri Mar 09 15:03:51 2012 +0100 @@ -66,6 +66,7 @@ Cpse = 0x00010, /* periodic sched. enable */ Case = 0x00020, /* async sched. enable */ Ciasync = 0x00040, /* interrupt on async advance doorbell */ + Citcmask = 0xff << 16, Citc1 = 0x10000, /* interrupt threshold ctl. 1 µframe */ Citc4 = 0x40000, /* same. 2 µframes */ /* ... */ diff -r 66593baf795e -r e9319d6e6030 sys/src/9/port/fault.c --- a/sys/src/9/port/fault.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/9/port/fault.c Fri Mar 09 15:03:51 2012 +0100 @@ -8,6 +8,7 @@ int fault(ulong addr, int read) { + int tries; Segment *s; char *sps; @@ -21,7 +22,7 @@ spllo(); m->pfault++; - for(;;) { + for(tries = 200; tries > 0; tries--) { /* TODO: reset to 20 */ s = seg(up, addr, 1); /* leaves s->lk qlocked if seg != nil */ if(s == 0) { up->psstate = sps; @@ -34,9 +35,17 @@ return -1; } - if(fixfault(s, addr, read, 1) == 0) + if(fixfault(s, addr, read, 1) == 0) /* qunlocks s->lk */ break; } + /* + * if we loop more than a few times, we're probably stuck on + * an unfixable address, almost certainly due to a bug + * elsewhere (e.g., bad page tables) so there's no point + * in spinning forever. + */ + if (tries <= 0) + panic("faultarm: fault stuck on va %#8.8p read %d\n", addr, read); up->psstate = sps; return 0; @@ -133,9 +142,13 @@ ref = lkp->ref + swapcount(lkp->daddr); else ref = lkp->ref; - if(ref > 1) { - unlock(lkp); - + if(ref == 1 && lkp->image){ + /* save a copy of the original for the image cache */ + duppage(lkp); + ref = lkp->ref; + } + unlock(lkp); + if(ref > 1){ new = newpage(0, &s, addr); if(s == 0) return -1; @@ -143,13 +156,6 @@ copypage(lkp, *pg); putpage(lkp); } - else { - /* save a copy of the original for the image cache */ - if(lkp->image) - duppage(lkp); - - unlock(lkp); - } mmuphys = PPN((*pg)->pa) | PTEWRITE | PTEVALID; (*pg)->modref = PG_MOD|PG_REF; break; diff -r 66593baf795e -r e9319d6e6030 sys/src/9/port/usbehci.c --- a/sys/src/9/port/usbehci.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/9/port/usbehci.c Fri Mar 09 15:03:51 2012 +0100 @@ -1657,7 +1657,7 @@ * usb 2 spec: reset must finish within 20 ms. * linux says spec says it can take 50 ms. for hubs. */ - for(i = 0; *portscp & Psreset && i < 10; i++) + for(i = 0; *portscp & Psreset && i < 50; i++) delay(10); if (*portscp & Psreset) iprint("ehci %#p: port %d didn't reset within %d ms; sts %#lux\n", diff -r 66593baf795e -r e9319d6e6030 sys/src/ape/lib/ap/math/j0.c --- a/sys/src/ape/lib/ap/math/j0.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/ape/lib/ap/math/j0.c Fri Mar 09 15:03:51 2012 +0100 @@ -123,7 +123,7 @@ 1.0, }; -static +static void asympt(double arg) { double zsq, n, d; diff -r 66593baf795e -r e9319d6e6030 sys/src/ape/lib/ap/math/j1.c --- a/sys/src/ape/lib/ap/math/j1.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/ape/lib/ap/math/j1.c Fri Mar 09 15:03:51 2012 +0100 @@ -125,7 +125,7 @@ 1.0, }; -static +static void asympt(double arg) { double zsq, n, d; diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/1c/gc.h --- a/sys/src/cmd/1c/gc.h Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/1c/gc.h Fri Mar 09 15:03:51 2012 +0100 @@ -67,7 +67,7 @@ struct Cases { - long val; + vlong val; long label; uchar def; Case* link; @@ -131,7 +131,7 @@ struct C1 { - long val; + vlong val; long label; }; diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/1c/swt.c --- a/sys/src/cmd/1c/swt.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/1c/swt.c Fri Mar 09 15:03:51 2012 +0100 @@ -45,7 +45,7 @@ def = breakpc; for(i=0; ival); + print("case = %.8llux\n", q->val); gopcode(OEQ, nodconst(q->val), n, Z); patch(p, q->label); q++; @@ -39,7 +39,7 @@ i = nc / 2; r = q+i; if(debug['W']) - print("case > %.8lux\n", r->val); + print("case > %.8llux\n", r->val); gopcode(OGT, nodconst(r->val), n, Z); sp = p; gopcode(OEQ, nodconst(r->val), n, Z); /* just gen the B.EQ */ @@ -47,7 +47,7 @@ swit2(q, i, def, n, tn); if(debug['W']) - print("case < %.8lux\n", r->val); + print("case < %.8llux\n", r->val); patch(sp, pc); swit2(r+1, nc-i-1, def, n, tn); return; @@ -60,7 +60,7 @@ patch(p, def); for(i=0; ival); + print("case = %.8llux\n", q->val); while(q->val != v) { nextpc(); p->as = ABCASE; diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/7c/gc.h --- a/sys/src/cmd/7c/gc.h Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/7c/gc.h Fri Mar 09 15:03:51 2012 +0100 @@ -58,7 +58,7 @@ struct Case { Case* link; - long val; + vlong val; long label; char def; char isv; @@ -67,7 +67,7 @@ struct C1 { - long val; + vlong val; long label; }; diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/7c/swt.c --- a/sys/src/cmd/7c/swt.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/7c/swt.c Fri Mar 09 15:03:51 2012 +0100 @@ -20,7 +20,7 @@ if(nc < 5) { for(i=0; ival); + print("case = %.8llux\n", q->val); if(bval(q->val)) { gopcode(OEQ, n, Z, nodconst(q->val)); } else { @@ -53,7 +53,7 @@ swit2(r, nc-i, def, n, tn); } /* if(debug['W']) - print("case > %.8lux\n", r->val); + print("case > %.8llux\n", r->val); gmove(nodconst(r->val), tn); gopcode(OLT, tn, n, Z); sp = p; @@ -62,7 +62,7 @@ swit2(q, i, def, n, tn); if(debug['W']) - print("case < %.8lux\n", r->val); + print("case < %.8llux\n", r->val); patch(sp, pc); swit2(r+1, nc-i-1, def, n, tn); */ } diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/gs/src/plan9.mak --- a/sys/src/cmd/gs/src/plan9.mak Thu Mar 08 13:45:43 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,450 +0,0 @@ -# Copyright (C) 1997-2002 artofcode LLC. All rights reserved. -# -# This software is provided AS-IS with no warranty, either express or -# implied. -# -# This software is distributed under license and may not be copied, -# modified or distributed except as expressly authorized under the terms -# of the license contained in the file LICENSE in this distribution. -# -# For more information about licensing, please refer to -# http://www.ghostscript.com/licensing/. For information on -# commercial licensing, go to http://www.artifex.com/licensing/ or -# contact Artifex Software, Inc., 101 Lucas Valley Road #110, -# San Rafael, CA 94903, U.S.A., +1(415)492-9861. -# -# $Id: unixansi.mak,v 1.41 2005/08/31 05:52:32 ray Exp $ -# makefile for Unix/ANSI C/X11 configuration. - -# ------------------------------- Options ------------------------------- # - -####### The following are the only parts of the file you should need to edit. - -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -BINDIR=./bin -GLSRCDIR=./src -GLGENDIR=./obj -GLOBJDIR=./obj -PSSRCDIR=./src -PSLIBDIR=./lib -PSGENDIR=./obj -PSOBJDIR=./obj - -# Do not edit the next group of lines. - -#include $(COMMONDIR)/ansidefs.mak -#include $(COMMONDIR)/unixdefs.mak -#include $(COMMONDIR)/generic.mak -include src/version.mak -DD=$(GLGENDIR)/ -GLD=$(GLGENDIR)/ -PSD=$(PSGENDIR)/ - -# ------ Generic options ------ # - -# Define the installation commands and target directories for -# executables and files. The commands are only relevant to `make install'; -# the directories also define the default search path for the -# initialization files (gs_*.ps) and the fonts. - -INSTALL = $(GLSRCDIR)/instcopy -c -INSTALL_PROGRAM = $(INSTALL) -m 755 -INSTALL_DATA = $(INSTALL) -m 644 - -prefix = /usr/local -exec_prefix = $(prefix) -bindir = $(exec_prefix)/bin -scriptdir = $(bindir) -mandir = $(prefix)/man -man1ext = 1 -datadir = $(prefix)/share -gsdir = $(datadir)/ghostscript -gsdatadir=/sys/src/cmd/gs - -docdir=$(gsdatadir)/doc -exdir=$(gsdatadir)/examples -GS_DOCDIR=$(docdir) - -# Define the default directory/ies for the runtime initialization, resource and -# font files. Separate multiple directories with a :. - -GS_LIB_DEFAULT=/sys/lib/ghostscript:/sys/lib/ghostscript/font:/sys/lib/postscript/font - -# Define whether or not searching for initialization files should always -# look in the current directory first. This leads to well-known security -# and confusion problems, but users insist on it. -# NOTE: this also affects searching for files named on the command line: -# see the "File searching" section of Use.htm for full details. -# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended. - -SEARCH_HERE_FIRST=1 - -# Define the name of the interpreter initialization file. -# (There is no reason to change this.) - -GS_INIT=gs_init.ps - -# Choose generic configuration options. - -# -DDEBUG -# includes debugging features (-Z switch) in the code. -# Code runs substantially slower even if no debugging switches -# are set. -# -DNOPRIVATE -# makes private (static) procedures and variables public, -# so they are visible to the debugger and profiler. -# No execution time or space penalty. - -GENOPT= - -# Define the name of the executable file. - -GS=gs - -# Define the name of a pre-built executable that can be invoked at build -# time. Currently, this is only needed for compiled fonts. The usual -# alternatives are: -# - the standard name of Ghostscript on your system (typically `gs'): -BUILD_TIME_GS=gs -# - the name of the executable you are building now. If you choose this -# option, then you must build the executable first without compiled fonts, -# and then again with compiled fonts. -#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR) - -# Define the directories for debugging and profiling binaries, relative to -# the standard binaries. - -DEBUGRELDIR=../debugobj -PGRELDIR=../pgobj - -# Define the directory where the IJG JPEG library sources are stored, -# and the major version of the library that is stored there. -# You may need to change this if the IJG library version changes. -# See jpeg.mak for more information. - -JSRCDIR=jpeg -JVERSION=6 - -# Note: if a shared library is used, it may not contain the -# D_MAX_BLOCKS_IN_MCU patch, and thus may not be able to read -# some older JPEG streams that violate the standard. If the JPEG -# library built from local sources, the patch will be applied. - -SHARE_JPEG=0 -JPEG_NAME=jpeg - -# Define the directory where the PNG library sources are stored, -# and the version of the library that is stored there. -# You may need to change this if the libpng version changes. -# See libpng.mak for more information. - -PSRCDIR=libpng -PVERSION=10208 - -# Choose whether to use a shared version of the PNG library, and if so, -# what its name is. -# See gs.mak and Make.htm for more information. - -SHARE_LIBPNG=0 -LIBPNG_NAME=png - -# Define the directory where the zlib sources are stored. -# See zlib.mak for more information. - -ZSRCDIR=zlib - -# Choose whether to use a shared version of the zlib library, and if so, -# what its name is (usually libz, but sometimes libgz). -# See gs.mak and Make.htm for more information. - -SHARE_ZLIB=0 -#ZLIB_NAME=gz -ZLIB_NAME=z - -# Choose shared or compiled in libjbig2dec and source location -SHARE_JBIG2=0 -JBIG2SRCDIR=jbig2dec - -# Define the directory where the icclib source are stored. -# See icclib.mak for more information - -ICCSRCDIR=icclib - -# Define the directory where the ijs source is stored, -# and the process forking method to use for the server. -# See ijs.mak for more information. - -IJSSRCDIR=ijs -IJSEXECTYPE=unix - -# Define how to build the library archives. (These are not used in any -# standard configuration.) - -AR=ar -ARFLAGS=qc -RANLIB=ranlib - -# ------ Platform-specific options ------ # - -# Define the name of the C compiler. If the standard compiler for your -# platform is ANSI-compatible, leave this line commented out; if not, -# uncomment the line and insert the proper definition. - -#CC=some_C_compiler - -# Define the name of the linker for the final link step. -# Normally this is the same as the C compiler. - -CCLD=$(CC) - -# Define the added flags for standard, debugging, and profiling builds. - -CFLAGS_STANDARD= -CFLAGS_DEBUG=-g -CFLAGS_PROFILE=-pg -O - -# Define the other compilation flags. Add at most one of the following: -# -Aa -w -D_HPUX_SOURCE for the HP 400. -# -DBSD4_2 for 4.2bsd systems. -# -DSYSV for System V or DG/UX. -# -DSVR4 -DSVR4_0 (not -DSYSV) for System V release 4.0. -# -DSVR4 (not -DSYSV) for System V release 4.2 (or later) and Solaris 2. -# XCFLAGS can be set from the command line. -XCFLAGS=-D_BSD_EXTENSION -DPlan9 - -CFLAGS=$(CFLAGS_STANDARD) $(XCFLAGS) - -# Define platform flags for ld. -# SunOS and some others want -X; Ultrix wants -x. -# SunOS 4.n may need -Bstatic. -# Solaris 2.6 (and possibly some other versions) with any of the SHARE_ -# parameters set to 1 may need -# -R /usr/local/xxx/lib:/usr/local/lib -# giving the full path names of the shared library directories. -# Apollos running DomainOS don't support -X (and -x has no effect). -# XLDFLAGS can be set from the command line. -XLDFLAGS= - -LDFLAGS=$(XLDFLAGS) - -# Define any extra libraries to link into the executable. -# ISC Unix 2.2 wants -linet. -# SCO Unix needs -lsocket if you aren't including the X11 driver. -# SVR4 may need -lnsl. -# Solaris may need -lnsl -lsocket -lposix4. -# (Libraries required by individual drivers are handled automatically.) - -EXTRALIBS= - -# Define the standard libraries to search at the end of linking. -# Most platforms require -lpthread for the POSIX threads library; -# on FreeBSD, change -lpthread to -lc_r; BSDI and perhaps some others -# include pthreads in libc and don't require any additional library. -# All reasonable platforms require -lm, but Rhapsody and perhaps one or -# two others fold libm into libc and don't require any additional library. - -#STDLIBS=-lpthread -lm - -# Since the default build is for nosync, don't include pthread lib -STDLIBS=-lm - -# Define the include switch(es) for the X11 header files. -# This can be null if handled in some other way (e.g., the files are -# in /usr/include, or the directory is supplied by an environment variable); -# in particular, SCO Xenix, Unix, and ODT just want -#XINCLUDE= -# Note that x_.h expects to find the header files in $(XINCLUDE)/X11, -# not in $(XINCLUDE). - -XINCLUDE=-I/usr/X11R6/include - -# Define the directory/ies and library names for the X11 library files. -# XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH -# (dynamic libraries on SVR4) and should not include -L. -# Newer SVR4 systems can use -R in XLIBDIRS rather than setting XLIBDIR. -# Both can be null if these files are in the default linker search path; -# in particular, SCO Xenix, Unix, and ODT just want -#XLIBDIRS= -# Solaris and other SVR4 systems with dynamic linking probably want -#XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib -# X11R6 (on any platform) may need -#XLIBS=Xt SM ICE Xext X11 - -XLIBDIRS=-L/usr/X11R6/lib -XLIBDIR= -XLIBS=Xt Xext X11 - -# Define whether this platform has floating point hardware: -# FPU_TYPE=2 means floating point is faster than fixed point. -# (This is the case on some RISCs with multiple instruction dispatch.) -# FPU_TYPE=1 means floating point is at worst only slightly slower -# than fixed point. -# FPU_TYPE=0 means that floating point may be considerably slower. -# FPU_TYPE=-1 means that floating point is always much slower than -# fixed point. - -FPU_TYPE=1 - -# Define the .dev module that implements thread and synchronization -# primitives for this platform. Don't change this unless you really know -# what you're doing. - -# If POSIX sync primitives are used, also change the STDLIBS to include -# the pthread library. -#SYNC=posync - -# Default is No sync primitives since some platforms don't have it (HP-UX) -SYNC=nosync - -# ------ Devices and features ------ # - -# Choose the language feature(s) to include. See gs.mak for details. - -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev - -# Choose whether to compile the .ps initialization files into the executable. -# See gs.mak for details. - -COMPILE_INITS=0 - -# Choose whether to store band lists on files or in memory. -# The choices are 'file' or 'memory'. - -BAND_LIST_STORAGE=file - -# Choose which compression method to use when storing band lists in memory. -# The choices are 'lzw' or 'zlib'. - -BAND_LIST_COMPRESSOR=zlib - -# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'. -# See gs.mak and sfxfd.c for more details. - -FILE_IMPLEMENTATION=stdio - -# Choose the implementation of stdio: '' for file I/O and 'c' for callouts -# See gs.mak and ziodevs.c/ziodevsc.c for more details. - -STDIO_IMPLEMENTATION=c - -# Choose the device(s) to include. See devs.mak for details, -# devs.mak and contrib.mak for the list of available devices. - -DEVICE_DEVS=$(DD)plan9.dev $(DD)bj10e.dev $(DD)bjc600.dev $(DD)bjc800.dev $(DD)cdj1600.dev $(DD)cdj670.dev $(DD)cdj850.dev $(DD)cdj890.dev $(DD)dfaxlow.dev $(DD)epswrite.dev $(DD)inferno.dev $(DD)jpeg.dev $(DD)jpeggray.dev $(DD)laserjet.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)pbm.dev $(DD)pbmraw.dev $(DD)pdfwrite.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)plan9bm.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pswrite.dev $(DD)stcolor.dev $(DD)tiffg32d.dev $(DD)tiffg3.dev $(DD)tiffg4.dev -DEVICE_DEVS1= -DEVICE_DEVS2= -DEVICE_DEVS3= -DEVICE_DEVS4= -DEVICE_DEVS5= -DEVICE_DEVS6= -DEVICE_DEVS7= -DEVICE_DEVS8= -DEVICE_DEVS9= -DEVICE_DEVS10= -DEVICE_DEVS11= -DEVICE_DEVS12= -DEVICE_DEVS13= -DEVICE_DEVS14= -DEVICE_DEVS15= -DEVICE_DEVS16= -# Overflow from DEVS9 -DEVICE_DEVS17= -DEVICE_DEVS18= -DEVICE_DEVS19= -DEVICE_DEVS20= - -# ---------------------------- End of options --------------------------- # - -# Define the name of the partial makefile that specifies options -- -# used in dependencies. - -MAKEFILE=$(GLSRCDIR)/unixansi.mak -TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)/unixhead.mak - -# Define the auxilary program dependency. - -AK= - -# Define the compilation rules and flags. - -# If you system has a 64 bit type you should pass it through -# CCFLAGS to improve support for multiple colorants. e.g.: -# -DGX_COLOR_INDEX_TYPE='unsigned long long' -# or use the autoconf build, which sets this automatically. -# If you do not define a 64 bit type, there may be some warnings -# about oversize shifts. It's a bug if these are not harmless. - -CCFLAGS=$(GENOPT) $(CFLAGS) -CC_=$(CC) $(CCFLAGS) -CCAUX=$(CC) -CC_NO_WARN=$(CC_) - -# ---------------- End of platform-specific section ---------------- # - -include src/unixhead.mak -include src/gs.mak -include src/lib.mak -include src/int.mak -include src/cfonts.mak -include src/jpeg.mak -# zlib.mak must precede libpng.mak -include src/zlib.mak -include src/libpng.mak -include src/jbig2.mak -include src/icclib.mak -include src/ijs.mak -include src/devs.mak -include src/contrib.mak -include src/plan9-aux.mak -include src/unixlink.mak -include src/unix-end.mak -include src/unixinst.mak - -# platform-specific clean-up -# this makefile is intended to be hand edited so we don't distribute -# the (presumedly modified) version in the top level directory -distclean : clean config-clean - -$(RM) Makefile - -maintainer-clean : distclean - # nothing special to do - -# Contributed drivers not found in the current distribution -# We reinsert them whenever we download a new distribution. - -### ------------------------- Plan 9 bitmaps -------------------------- ### -### Note: this driver was contributed by a user: please contact ### -### Russ Cox if you have questions. ### - -plan9_=$(GLOBJ)gdevplan9.$(OBJ) -$(DD)plan9.dev : $(plan9_) $(DD)page.dev - $(SETPDEV) $(DD)plan9 $(plan9_) - -$(GLOBJ)gdevplan9.$(OBJ) : $(GLSRC)gdevplan9.c $(PDEVH) $(gsparam_h) $(gxlum_h) - $(GLCC) $(GLO_)gdevplan9.$(OBJ) $(C_) $(GLSRC)gdevplan9.c - -### -------------- cdj850 - HP 850c Driver under development ------------- ### -### For questions about this driver, please contact: ### -### Uli Wortmann (uliw@erdw.ethz.ch) ### - -cdeskjet8_=$(GLOBJ)gdevcd8.$(OBJ) $(HPPCL) - -$(DD)cdj850.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj850 $(cdeskjet8_) - -$(DD)cdj670.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj670 $(cdeskjet8_) - -$(DD)cdj890.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj890 $(cdeskjet8_) - -$(DD)cdj1600.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj1600 $(cdeskjet8_) - -$(GLOBJ)gdevcd8.$(OBJ) : $(GLSRC)gdevcd8.c $(PDEVH) $(math__h)\ - $(gsparam_h) $(gxlum_h) $(gdevpcl_h) - $(GLCC) $(GLO_)gdevcd8.$(OBJ) $(C_) $(GLSRC)gdevcd8.c - diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/kc/gc.h --- a/sys/src/cmd/kc/gc.h Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/kc/gc.h Fri Mar 09 15:03:51 2012 +0100 @@ -54,7 +54,7 @@ struct Case { Case* link; - long val; + vlong val; long label; char def; char isv; @@ -63,7 +63,7 @@ struct C1 { - long val; + vlong val; long label; }; diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/vc/gc.h --- a/sys/src/cmd/vc/gc.h Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/vc/gc.h Fri Mar 09 15:03:51 2012 +0100 @@ -55,7 +55,7 @@ struct Case { Case* link; - long val; + vlong val; long label; char def; char isv; @@ -64,7 +64,7 @@ struct C1 { - long val; + vlong val; long label; }; diff -r 66593baf795e -r e9319d6e6030 sys/src/cmd/vc/swt.c --- a/sys/src/cmd/vc/swt.c Thu Mar 08 13:45:43 2012 +0100 +++ b/sys/src/cmd/vc/swt.c Fri Mar 09 15:03:51 2012 +0100 @@ -20,7 +20,7 @@ if(nc < 5) { for(i=0; ival); + print("case = %.8llux\n", q->val); gmove(nodconst(q->val), tn); gopcode(OEQ, n, tn, Z); patch(p, q->label); @@ -33,7 +33,7 @@ i = nc / 2; r = q+i; if(debug['W']) - print("case > %.8lux\n", r->val); + print("case > %.8llux\n", r->val); gmove(nodconst(r->val), tn); gopcode(OLT, tn, n, Z); sp = p; @@ -42,7 +42,7 @@ swit2(q, i, def, n, tn); if(debug['W']) - print("case < %.8lux\n", r->val); + print("case < %.8llux\n", r->val); patch(sp, pc); swit2(r+1, nc-i-1, def, n, tn); }