Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
gcl (2.6.12-75) unstable; urgency=medium
.
* Version_2_6_13pre64
Author: Camm Maguire <camm@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-03-22
--- gcl-2.6.12.orig/cmpnew/gcl_cmpif.lsp
+++ gcl-2.6.12/cmpnew/gcl_cmpif.lsp
@@ -428,9 +428,8 @@
(wt-label label))))
(if (eq default 't)
- (progn (wt-nl "FEerror(\"The ECASE key value ~s is illegal.\",1,V" cvar ");")
- (unwind-exit nil 'jump))
- (c2expr default))
+ (wt-nl "FEerror(\"The ECASE key value ~s is illegal.\",1,V" cvar ");")
+ (c2expr default))
(wt "}")
(close-inline-blocks))
--- gcl-2.6.12.orig/cmpnew/gcl_cmpmulti.lsp
+++ gcl-2.6.12/cmpnew/gcl_cmpmulti.lsp
@@ -221,56 +221,36 @@
(defun c2multiple-value-bind (vars init-form body
- &aux (block-p nil) (labels nil)
- (*unwind-exit* *unwind-exit*)
- (*vs* *vs*) (*clink* *clink*) (*ccb-vs* *ccb-vs*)
- top-data)
- (declare (object block-p))
- (multiple-value-check vars init-form)
+ &aux (block-p nil)
+ (*unwind-exit* *unwind-exit*)
+ (*vs* *vs*) (*clink* *clink*) (*ccb-vs* *ccb-vs*)
+ top-data)
- (dolist** (var vars)
+ (multiple-value-check vars init-form)
+
+ (dolist (var vars)
(let ((kind (c2var-kind var)))
- (declare (object kind))
(if kind
(let ((cvar (next-cvar)))
(setf (var-kind var) kind)
(setf (var-loc var) cvar)
(wt-nl)
(unless block-p (wt "{") (setq block-p t))
- (wt-var-decl var)
- )
- (setf (var-ref var) (vs-push)))))
+ (wt-var-decl var))
+ (setf (var-ref var) (vs-push)))))
(let ((*value-to-go* 'top) *top-data*)
(c2expr* init-form) (setq top-data *top-data*))
+
(and *record-call-info* (record-call-info nil (car top-data)))
- (let ((*clink* *clink*)
- (*unwind-exit* *unwind-exit*)
- (*ccb-vs* *ccb-vs*))
- (do ((vs vars (cdr vs)))
- ((endp vs))
- (declare (object vs))
- (push (next-label) labels)
- (wt-nl "if(vs_base>=vs_top){")
- (reset-top)
- (wt-go (car labels)) (wt "}")
+
+ (wt-nl "if(vs_base>vs_top) vs_top=vs_base;*vs_top=Cnil;")
+ (do ((vs vars (cdr vs)))
+ ((endp vs))
(c2bind-loc (car vs) '(vs-base 0))
- (unless (endp (cdr vs)) (wt-nl "vs_base++;"))))
+ (unless (endp (cdr vs)) (wt-nl "if (vs_base<vs_top) vs_base++;")))
(wt-nl) (reset-top)
- (let ((label (next-label)))
- (wt-nl) (wt-go label)
-
- (setq labels (nreverse labels))
-
- (dolist** (v vars)
- (wt-label (car labels))
- (pop labels)
- (c2bind-loc v nil))
-
- (wt-label label))
-
(c2expr body)
- (when block-p (wt "}"))
- )
+ (when block-p (wt "}")))
--- gcl-2.6.12.orig/cmpnew/gcl_cmptag.lsp
+++ gcl-2.6.12/cmpnew/gcl_cmptag.lsp
@@ -178,7 +178,7 @@
(*value-to-go* 'trash))
(c2expr (car l))
(wt-label *exit*))
- (unless (eq (caar l) 'go) (unwind-exit nil)))))
+ (unless (member (caar l) '(go return-from)) (unwind-exit nil)))))
(declare (object l written))
(cond (written (setq written nil))
((typep (car l) 'tag)
--- gcl-2.6.12.orig/configure
+++ gcl-2.6.12/configure
@@ -4159,7 +4159,7 @@ case $use in
case $use in
alpha*)
assert_arg_to_cflags -mieee
- if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
+# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
;;
aarch64*)
TLIBS="$TLIBS -lgcc_s";;
--- gcl-2.6.12.orig/configure.in
+++ gcl-2.6.12/configure.in
@@ -382,7 +382,7 @@ case $use in
case $use in
alpha*)
assert_arg_to_cflags -mieee
- if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
+# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
;;
aarch64*)
TLIBS="$TLIBS -lgcc_s";;
--- gcl-2.6.12.orig/h/elf64_alpha_reloc.h
+++ gcl-2.6.12/h/elf64_alpha_reloc.h
@@ -1,5 +1,5 @@
case R_ALPHA_GPDISP:
- gotoff=(ul)(got+(a>>32));
+ gotoff=(ul)(got+(a>>32)-1);
s=gotoff-p;
store_val(where,MASK(16),(s-(short)s)>>16);
store_val((void *)where+(a&MASK(32)),MASK(16),s);
@@ -23,7 +23,7 @@
s+=a&MASK(32);
a=(a>>32)-1;
if (s>=ggot1 && s<ggote) {
- massert(!write_stub(s,(ul *)gotoff,got+a));
+ massert(!write_stub(s,got+a));
} else
got[a]=s;
store_vals(where,MASK(16),(ul)(got+a)-gotoff);
--- gcl-2.6.12.orig/h/elf64_alpha_reloc_special.h
+++ gcl-2.6.12/h/elf64_alpha_reloc_special.h
@@ -1,16 +1,16 @@
static ul ggot1,ggote,gotoff;
static int
-write_stub(ul s,ul *got,ul *gote) {
+write_stub(ul s,ul *gote) {
unsigned int *goti;
*gote=(ul)(goti=(void *)(gote+2));
*++gote=s;
- *goti++=(0x29<<26)|(0x1b<<21)|(0x1d<<16)|((void *)gote-(void *)got);
- *goti++=(0x29<<26)|(0x1b<<21)|(0x1b<<16)|0;
- *goti++=(0x1a<<26)|(0x1f<<21)|(0x1b<<16)|0x4000;
- *goti++=0;
+ *goti++=(0x29<<26)|(0x1b<<21)|(0x1b<<16)|0xfff8; /*ldq t12,-8(t12)*/
+ *goti++=(0x29<<26)|(0x1b<<21)|(0x1b<<16)|0; /*ldq t12,0(t12)*/
+ *goti++=(0x1a<<26)|(0x1f<<21)|(0x1b<<16)|0x4000; /*jsr zero,(t12),$pc+4*/
+ *goti++=0; /*halt*/
return 0;
@@ -94,7 +94,10 @@ label_got_symbols(void *v1,Shdr *sec1,Sh
q=++*gs;
- massert(!(r->r_addend>>32));
+ if (r->r_addend>>32)
+ fprintf(stderr,"zeroing high addend %lx\n",r->r_addend>>32);
+ r->r_addend&=0xffffffff;
+ massert((q&0xffffffff)==q);
r->r_addend|=(q<<32);
q=(q-gotp)*sizeof(*gs);
@@ -111,6 +114,10 @@ label_got_symbols(void *v1,Shdr *sec1,Sh
gotp=*gs+1;
}
+ if (r->r_addend>>32)
+ fprintf(stderr,"zeroing high addend %lx\n",r->r_addend>>32);
+ r->r_addend&=0xffffffff;
+ massert((gotp&0xffffffff)==gotp);
r->r_addend|=(gotp<<32);
break;