* Re: or1k/opcodes: ISO C version compatibility issues [not found] ` <CAKEMJMpBnxeNaBUm+jktE0renhHP1Wwzf70=R3iXnuP+hz5D=g@mail.gmail.com> @ 2014-05-21 21:56 ` Stefan Kristiansson 2014-05-21 23:58 ` Alan Modra 0 siblings, 1 reply; 2+ messages in thread From: Stefan Kristiansson @ 2014-05-21 21:56 UTC (permalink / raw) To: Peter Gavin, Maciej W. Rozycki; +Cc: Christian Svensson, binutils, cgen On Wed, May 21, 2014 at 04:47:20PM -0400, Peter Gavin wrote: > On Wed, May 21, 2014 at 4:44 PM, Maciej W. Rozycki > <macro@codesourcery.com>wrote: > > > (also for or1k-desc.c). I have been able to make the files compile with > > the change below, however these are generated files and a suitable change > > would have to be applied to cpu/or1kcommon.cpu instead. Unfortunately > > that source has been written in Scheme that I have no immediate skills to > > correct. Would you please look into making the correct update to the > > Scheme source? > > > > I think this is actually a bug in CGEN, and needs to be changed there. > Without claiming any scheme skills, I think something like the patch below should do it. Stefan diff --git a/cgen/enum.scm b/cgen/enum.scm index 4279b00..d56a1a3 100644 --- a/cgen/enum.scm +++ b/cgen/enum.scm @@ -298,7 +298,10 @@ "" (string-append " = " (if (number? (cadr e)) - (number->string (cadr e)) + (string-append (number->string (cadr e)) + (if (> (cadr e) + #x80000000) + "u" "")) (cadr e)))) )) (if (and san? include-sanitize-marker?) ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: or1k/opcodes: ISO C version compatibility issues 2014-05-21 21:56 ` or1k/opcodes: ISO C version compatibility issues Stefan Kristiansson @ 2014-05-21 23:58 ` Alan Modra 0 siblings, 0 replies; 2+ messages in thread From: Alan Modra @ 2014-05-21 23:58 UTC (permalink / raw) To: Stefan Kristiansson Cc: Peter Gavin, Maciej W. Rozycki, Christian Svensson, binutils, cgen On Thu, May 22, 2014 at 12:55:50AM +0300, Stefan Kristiansson wrote: > On Wed, May 21, 2014 at 04:47:20PM -0400, Peter Gavin wrote: > > On Wed, May 21, 2014 at 4:44 PM, Maciej W. Rozycki > > <macro@codesourcery.com>wrote: > > > > > (also for or1k-desc.c). I have been able to make the files compile with > > > the change below, however these are generated files and a suitable change > > > would have to be applied to cpu/or1kcommon.cpu instead. Unfortunately > > > that source has been written in Scheme that I have no immediate skills to > > > correct. Would you please look into making the correct update to the > > > Scheme source? > > > > > > > I think this is actually a bug in CGEN, and needs to be changed there. > > > > Without claiming any scheme skills, I think something like the patch below > should do it. See also https://sourceware.org/ml/binutils/2014-05/msg00173.html -- Alan Modra Australia Development Lab, IBM ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-21 23:58 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <alpine.DEB.1.10.1405212057020.512@tp.orcam.me.uk> [not found] ` <CAKEMJMpBnxeNaBUm+jktE0renhHP1Wwzf70=R3iXnuP+hz5D=g@mail.gmail.com> 2014-05-21 21:56 ` or1k/opcodes: ISO C version compatibility issues Stefan Kristiansson 2014-05-21 23:58 ` Alan Modra
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).