summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-02-27 16:05:30 +0000
committerCharles.Forsyth <devnull@localhost>2007-02-27 16:05:30 +0000
commitf8b3fca729ca830470878fc31d6d43aff91806f9 (patch)
treeb7c22e5ae45827be7c8e5b7e2c7247e9528b9b27
parente665f8d84a80c58fd60f2e3ae7c78d515aae17c3 (diff)
20070227.0
-rw-r--r--CHANGES4
-rw-r--r--include/fcall.h2
-rw-r--r--include/version.h2
-rw-r--r--libmemdraw/draw.c6
4 files changed, 12 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index c3c28f6c..91fd55eb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+20070227
+ /include/fcall.h: ensure unsigned promotion to counter ansi sign-extending rules for GBIT64
+20070220
+ add 0x92 as chip ID for ether91c111.c
20070217
repair /appl/lib/libc.b and /appl/lib/libc0.b strncmp implementations (used only by c2l output) [inferno-os issue 9]
/emu/port/devip.c, get socket fd on reopen of ctl
diff --git a/include/fcall.h b/include/fcall.h
index 915fec41..1302c9a1 100644
--- a/include/fcall.h
+++ b/include/fcall.h
@@ -64,7 +64,7 @@ struct Fcall
#define GBIT8(p) ((p)[0])
#define GBIT16(p) ((p)[0]|((p)[1]<<8))
#define GBIT32(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)))
-#define GBIT64(p) ((vlong)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\
+#define GBIT64(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\
((vlong)((p)[4]|((p)[5]<<8)|((p)[6]<<16)|((p)[7]<<24)) << 32))
#define PBIT8(p,v) (p)[0]=(v)
diff --git a/include/version.h b/include/version.h
index ea9166bd..62d5bc0c 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1 +1 @@
-#define VERSION "Fourth Edition (20070217)"
+#define VERSION "Fourth Edition (20070227)"
diff --git a/libmemdraw/draw.c b/libmemdraw/draw.c
index 8fe88bce..2559f904 100644
--- a/libmemdraw/draw.c
+++ b/libmemdraw/draw.c
@@ -2494,6 +2494,7 @@ memfillcolor(Memimage *i, ulong val)
{
ulong bits;
int d, y;
+ uchar p[4];
if(val == DNofill)
return;
@@ -2507,6 +2508,11 @@ memfillcolor(Memimage *i, ulong val)
default: /* 1, 2, 4, 8, 16, 32 */
for(d=i->depth; d<32; d*=2)
bits = (bits << d) | bits;
+ p[0] = bits; /* make little endian */
+ p[1] = bits>>8;
+ p[2] = bits>>16;
+ p[3] = bits>>24;
+ bits = *(u32int*)p;
memsetl(wordaddr(i, i->r.min), bits, i->width*Dy(i->r));
break;
}