patches/binutils/2.15/260-s390-invalid-insn-format.patch
changeset 747 d3e603e7c17c
parent 402 197e1b49586e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.15/260-s390-invalid-insn-format.patch	Mon Jul 28 21:32:33 2008 +0000
     1.3 @@ -0,0 +1,42 @@
     1.4 +Message-ID: <000801c48f60$cec16630$9103a8c0@ULOC5012>
     1.5 +From: "Michael Geiger" <mcgege@gmx.de>
     1.6 +To: <dank@kegel.com>
     1.7 +Subject: Patch for cross compiling s/390 kernel on linux host
     1.8 +Date: Tue, 31 Aug 2004 15:45:41 +0200
     1.9 +
    1.10 +Dear Dan,
    1.11 +
    1.12 +I had big problems compiling a kernel for s/390 on my linux host - I tried
    1.13 +different chains from crosstool-0.28-rc34 and finally succeded with
    1.14 +gcc-3.3.4-glibc-2.3.2 after applying another patch to binutils-2.15
    1.15 +(attached).
    1.16 +All compilations of the different kernel versions I tried stopped with
    1.17 +"Invalid .insn format" somewhere. I checked the recent cvs version of
    1.18 +binutils and applied the latest diff to gas/config/tc-s390.c and that solved
    1.19 +it.
    1.20 +
    1.21 +Greetings
    1.22 +
    1.23 +Michael Geiger
    1.24 +
    1.25 +
    1.26 +diff -u -r1.39 -r1.40
    1.27 +--- src/gas/config/tc-s390.c	2004/05/06 11:01:48	1.39
    1.28 ++++ src/gas/config/tc-s390.c	2004/06/15 12:38:08	1.40
    1.29 +@@ -1596,13 +1596,13 @@
    1.30 +   if (exp.X_op == O_constant)
    1.31 +     {
    1.32 +       if (   (   opformat->oplen == 6
    1.33 +-	      && exp.X_add_number >= 0
    1.34 ++	      && (addressT) exp.X_add_number >= 0
    1.35 + 	      && (addressT) exp.X_add_number < (1ULL << 48))
    1.36 + 	  || (   opformat->oplen == 4
    1.37 +-	      && exp.X_add_number >= 0
    1.38 ++	      && (addressT) exp.X_add_number >= 0
    1.39 + 	      && (addressT) exp.X_add_number < (1ULL << 32))
    1.40 + 	  || (   opformat->oplen == 2
    1.41 +-	      && exp.X_add_number >= 0
    1.42 ++	      && (addressT) exp.X_add_number >= 0
    1.43 + 	      && (addressT) exp.X_add_number < (1ULL << 16)))
    1.44 + 	md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
    1.45 +       else