fixed gc bug in 64-bit mode along with another 64-bit bug in the

assembler when addressing using special %eax/%rax instructions.
This commit is contained in:
Abdulaziz Ghuloum 2008-07-21 22:07:31 -07:00
parent 358eee03ee
commit acc9940379
11 changed files with 42 additions and 45 deletions

View File

@ -223,9 +223,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign benchmarks/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu benchmarks/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign benchmarks/Makefile
$(AUTOMAKE) --gnu benchmarks/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

3
c64
View File

@ -1,6 +1,7 @@
#!/usr/bin/env sh
./configure CFLAGS="-m64 -g -I/Users/ikarus/.opt64/include" \
./configure --prefix=/Users/ikarus/.opt \
CFLAGS="-m64 -g -I/Users/ikarus/.opt64/include" \
LDFLAGS="-m64 -g -L/Users/ikarus/.opt64/lib" \
&& make clean \
&& make

View File

@ -170,9 +170,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/Makefile
$(AUTOMAKE) --gnu doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

View File

@ -172,9 +172,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign lib/Makefile
$(AUTOMAKE) --gnu lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

View File

@ -198,9 +198,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scheme/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scheme/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign scheme/Makefile
$(AUTOMAKE) --gnu scheme/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

Binary file not shown.

View File

@ -555,14 +555,13 @@
[(ret) (CODE #xC3 ac)]
[(cltd) (C #x99 ac)]
[(movl src dst)
(trace-ac ac `(movl ,src ,dst)
(cond
[(and (imm? src) (reg? dst)) (CR #xB8 dst (IMM src ac))]
[(and (imm? src) (mem? dst)) (CR* #xC7 '/0 dst (IMM32 src ac))]
[(and (reg? src) (reg? dst)) (CR* #x89 src dst ac)]
[(and (reg? src) (mem? dst)) (CR* #x89 src dst ac)]
[(and (mem? src) (reg? dst)) (CR* #x8B dst src ac)]
[else (die who "invalid" instr)]))]
[else (die who "invalid" instr)])]
[(mov32 src dst)
;;; FIXME
(cond
@ -590,12 +589,10 @@
[(and (imm8? src) (reg? dst)) (CR* #x83 '/0 dst (IMM8 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (C #x05 (IMM32 src ac))]
[(and (imm32? src) (reg? dst)) (CR* #x81 '/0 dst (IMM32 src ac))]
[(and (reg? src) (reg? dst))
(trace-ac ac `(addl ,src ,dst) (CR* #x01 src dst ac))]
[(and (reg? src) (reg? dst)) (CR* #x01 src dst ac)]
[(and (mem? src) (reg? dst)) (CR* #x03 dst src ac)]
[(and (imm32? src) (mem? dst)) (CR* #x81 '/0 dst (IMM32 src ac))]
[(and (reg? src) (mem? dst))
(trace-ac ac `(addl ,src ,dst) (CR* #x01 src dst ac))]
[(and (reg? src) (mem? dst)) (CR* #x01 src dst ac)]
[else (die who "invalid" instr)])]
[(subl src dst)
(cond
@ -624,16 +621,14 @@
[(and (eq? src '%cl) (mem? dst)) (CR* #xD3 '/5 dst ac)]
[else (die who "invalid" instr)])]
[(sarl src dst)
(trace-ac ac `(sarl ,src ,dst)
(cond
[(and (equal? 1 src) (reg? dst)) (CR* #xD1 '/7 dst ac)]
[(and (imm8? src) (reg? dst)) (CR* #xC1 '/7 dst (IMM8 src ac))]
[(and (imm8? src) (mem? dst)) (CR* #xC1 '/7 dst (IMM8 src ac))]
[(and (eq? src '%cl) (reg? dst)) (CR* #xD3 '/7 dst ac)]
[(and (eq? src '%cl) (mem? dst)) (CR* #xD3 '/7 dst ac)]
[else (die who "invalid" instr)]))]
[else (die who "invalid" instr)])]
[(andl src dst)
(trace-ac ac `(andl ,src ,dst)
(cond
[(and (imm32? src) (mem? dst)) (CR* #x81 '/4 dst (IMM32 src ac))]
[(and (imm8? src) (reg? dst)) (CR* #x83 '/4 dst (IMM8 src ac))]
@ -642,13 +637,13 @@
[(and (reg? src) (reg? dst)) (CR* #x21 src dst ac)]
[(and (reg? src) (mem? dst)) (CR* #x21 src dst ac)]
[(and (mem? src) (reg? dst)) (CR* #x23 dst src ac)]
[else (die who "invalid" instr)]))]
[else (die who "invalid" instr)])]
[(orl src dst)
(cond
[(and (imm32? src) (mem? dst)) (CR* #x81 '/1 dst (IMM32 src ac))]
[(and (reg? src) (mem? dst)) (CR* #x09 src dst ac)]
[(and (imm8? src) (reg? dst)) (CR* #x83 '/1 dst (IMM8 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (CODE #x0D (IMM32 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (C #x0D (IMM32 src ac))]
[(and (imm32? src) (reg? dst)) (CR* #x81 '/1 dst (IMM32 src ac))]
[(and (reg? src) (reg? dst)) (CR* #x09 src dst ac)]
[(and (mem? src) (reg? dst)) (CR* #x0B dst src ac)]
@ -657,7 +652,7 @@
(cond
[(and (imm8? src) (reg? dst)) (CR* #x83 '/6 dst (IMM8 src ac))]
[(and (imm8? src) (mem? dst)) (CR* #x83 '/6 dst (IMM8 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (CODE #x35 (IMM32 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (C #x35 (IMM32 src ac))]
[(and (reg? src) (reg? dst)) (CR* #x31 src dst ac)]
[(and (mem? src) (reg? dst)) (CR* #x33 dst src ac)]
[(and (reg? src) (mem? dst)) (CR* #x31 src dst ac)]
@ -667,15 +662,16 @@
[(and (mem? src) (reg? dst)) (CR* #x8D dst src ac)]
[else (die who "invalid" instr)])]
[(cmpl src dst)
(trace-ac ac `(cmpl ,src ,dst)
(cond
[(and (imm8? src) (reg? dst)) (CR* #x83 '/7 dst (IMM8 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (CODE #x3D (IMM32 src ac))]
[(and (imm32? src) (eq? dst '%eax)) (C #x3D (IMM32 src ac))]
[(and (imm32? src) (reg? dst)) (CR* #x81 '/7 dst (IMM32 src ac))]
[(and (reg? src) (reg? dst)) (CR* #x39 src dst ac)]
[(and (mem? src) (reg? dst)) (CR* #x3B dst src ac)]
[(and (imm8? src) (mem? dst)) (CR* #x83 '/7 dst (IMM8 src ac))]
[(and (imm32? src) (mem? dst)) (CR* #x81 '/7 dst (IMM32 src ac))]
[else (die who "invalid" instr)])]
[else (die who "invalid" instr)]))]
[(imull src dst)
(cond
[(and (imm8? src) (reg? dst)) (CR* #x6B dst dst (IMM8 src ac))]

View File

@ -1 +1 @@
1546
1547

View File

@ -818,13 +818,13 @@
[(V a b)
(struct-case a
[(constant a)
(unless (fixnum? a) (interrupt))
(unless (fx? a) (interrupt))
(prm 'int* (T b) (K a))]
[(known a t) (cogen-value-$fx* a b)]
[else
(struct-case b
[(constant b)
(unless (fixnum? b) (interrupt))
(unless (fx? b) (interrupt))
(prm 'int* (T a) (K b))]
[(known b t) (cogen-value-$fx* a b)]
[else
@ -963,7 +963,7 @@
[(V s i)
(struct-case i
[(constant i)
(unless (fixnum? i) (interrupt))
(unless (fx? i) (interrupt))
(prm 'sll
(prm 'logand
(prm 'mref (T s)
@ -1033,7 +1033,7 @@
[(V s i)
(struct-case i
[(constant i)
(unless (and (fixnum? i) (fx<= 0 i) (fx<= i 7))
(unless (and (fx? i) (fx<= 0 i) (fx<= i 7))
(interrupt))
(prm 'sll
(prm 'logand
@ -1058,7 +1058,7 @@
[(E x i v)
(struct-case i
[(constant i)
(unless (and (fixnum? i) (fx<= 0 i) (fx<= i 7))
(unless (and (fx? i) (fx<= 0 i) (fx<= i 7))
(interrupt))
(prm 'bset
(T x)
@ -1544,7 +1544,7 @@
(struct-case n
[(constant i)
(cond
[(and (fixnum? i)
[(and (fx? i)
(>= i 0)
(< i (- (* wordsize 8) fx-shift)))
(with-tmp ([x (T x)])
@ -1588,7 +1588,7 @@
(struct-case n
[(constant i)
(cond
[(and (fixnum? i) (> i 0) (log2 i)) =>
[(and (fx? i) (> i 0) (log2 i)) =>
(lambda (bits)
(seq*
(interrupt-unless (cogen-pred-fixnum? x))
@ -1641,7 +1641,7 @@
[(V rtd len)
(struct-case len
[(constant i)
(unless (fixnum? i) (interrupt))
(unless (fx? i) (interrupt))
(with-tmp ([t (prm 'alloc
(K (align (+ (* i wordsize) disp-struct-data)))
(K vector-tag))])
@ -1817,7 +1817,7 @@
[(V n)
(struct-case n
[(constant n)
(unless (fixnum? n) (interrupt))
(unless (fx? n) (interrupt))
(with-tmp ([s (prm 'alloc
(K (align (+ n 1 disp-bytevector-data)))
(K bytevector-tag))])
@ -1857,7 +1857,7 @@
[(V s i)
(struct-case i
[(constant i)
(unless (fixnum? i) (interrupt))
(unless (fx? i) (interrupt))
(prm 'sll
(prm 'logand
(prm 'bref (T s)
@ -1906,10 +1906,10 @@
[(E x i c)
(struct-case i
[(constant i)
(unless (fixnum? i) (interrupt))
(unless (fx? i) (interrupt))
(struct-case c
[(constant c)
(unless (fixnum? c) (interrupt))
(unless (fx? c) (interrupt))
(prm 'bset/c (T x)
(K (+ i (- disp-bytevector-data bytevector-tag)))
(K (cond
@ -1923,7 +1923,7 @@
[else
(struct-case c
[(constant c)
(unless (fixnum? c) (interrupt))
(unless (fx? c) (interrupt))
(prm 'bset/c (T x)
(prm 'int+
(prm 'sra (T i) (K fx-shift))
@ -2103,7 +2103,7 @@
[(V n)
(struct-case n
[(constant n)
(unless (fixnum? n) (interrupt))
(unless (fx? n) (interrupt))
(with-tmp ([s (prm 'alloc
(K (align (+ (* n wordsize) disp-string-data)))
(K string-tag))])
@ -2134,7 +2134,7 @@
[(V s i)
(struct-case i
[(constant i)
(unless (fixnum? i) (interrupt))
(unless (fx? i) (interrupt))
(prm 'mref32 (T s)
(K (+ (* i char-size)
(- disp-string-data string-tag))))]
@ -2154,7 +2154,7 @@
[(x)
(struct-case x
[(constant i)
(if (fixnum? i) (nop) (interrupt))]
(if (fx? i) (nop) (interrupt))]
[(known expr t)
(case (T:fixnum? t)
[(yes) (nop)]
@ -2195,7 +2195,7 @@
[(E x i c)
(struct-case i
[(constant i)
(unless (fixnum? i) (interrupt))
(unless (fx? i) (interrupt))
(prm 'mset32 (T x)
(K (+ (* i char-size)
(- disp-string-data string-tag)))

View File

@ -203,9 +203,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

View File

@ -191,8 +191,8 @@ gc_alloc_new_large_ptr(int size, gc_t* gc){
static inline void
enqueue_large_ptr(ikptr mem, int size, gc_t* gc){
int i = page_index(mem);
int j = page_index(mem+size-1);
long int i = page_index(mem);
long int j = page_index(mem+size-1);
while(i<=j){
gc->segment_vector[i] =
pointers_mt | large_object_tag | gc->collect_gen_tag;