From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: SuperH port Date: Thu, 16 Oct 2008 18:04:27 +0200 Message-ID: <18679.26123.115502.647352@a1ihome1.kph.uni-mainz.de> References: <18668.31387.21197.719443@a1ihome1.kph.uni-mainz.de> <200810081431.m98EVuUJ011805@mothra.ics.uci.edu> <18668.64085.372743.905358@a1ihome1.kph.uni-mainz.de> <18678.23984.801356.890460@a1ihome1.kph.uni-mainz.de> <200810152136.m9FLafBH009918@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----cutting-here-may-damage-your-screen-surface----63792801----" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224173403 18355 80.91.229.12 (16 Oct 2008 16:10:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2008 16:10:03 +0000 (UTC) Cc: sh@gentoo.org, emacs@gentoo.org, Stefan Monnier , emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 16 18:11:01 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KqVR9-00086V-OO for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2008 18:10:56 +0200 Original-Received: from localhost ([127.0.0.1]:51513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqVQ4-0003Db-Ka for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2008 12:09:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqVL3-0001Ct-In for emacs-devel@gnu.org; Thu, 16 Oct 2008 12:04:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqVL1-0001Bx-JN for emacs-devel@gnu.org; Thu, 16 Oct 2008 12:04:37 -0400 Original-Received: from [199.232.76.173] (port=49821 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqVL1-0001Bu-Fg for emacs-devel@gnu.org; Thu, 16 Oct 2008 12:04:35 -0400 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:36865) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KqVL0-0006fS-Eq for emacs-devel@gnu.org; Thu, 16 Oct 2008 12:04:35 -0400 Original-Received: from a1ihome1.kph.uni-mainz.de (a1ihome1.kph.uni-mainz.de [134.93.134.75]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id m9GG4Rsr011098; Thu, 16 Oct 2008 18:04:28 +0200 Original-Received: from a1ihome1.kph.uni-mainz.de (localhost [127.0.0.1]) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.1) with ESMTP id m9GG4Rgo018142; Thu, 16 Oct 2008 18:04:27 +0200 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id m9GG4RfZ018137; Thu, 16 Oct 2008 18:04:27 +0200 In-Reply-To: <200810152136.m9FLafBH009918@mothra.ics.uci.edu> X-Mailer: VM 8.0.2-487 under Emacs 22.2.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104555 Archived-At: ------cutting-here-may-damage-your-screen-surface----63792801---- Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit >>>>> On Wed, 15 Oct 2008, Dan Nicolaescu wrote: > Isn't there a symbol that the compiler defines differently for > big/little endian? I don't know about the compiler, but glibc's header files define __BYTE_ORDER. I've attached a solution that was tested on GNU/Linux, but should also work on BSD. > No big endian testing? Not yet. > No need for the copyright notice, O.K. "Take 3" of the patch is attached. Best regards Ulrich ------cutting-here-may-damage-your-screen-surface----63792801---- Content-Type: text/plain; name="emacs-cvs-sh.patch" Content-Disposition: inline; filename="emacs-cvs-sh.patch" Content-Transfer-Encoding: 7bit emacs/ChangeLog entry: 2008-10-16 Ulrich Mueller * configure.in: Add support for GNU/Linux on SuperH. emacs/etc/ChangeLog entry: 2008-10-16 Ulrich Mueller * MACHINES: Add section for SuperH. emacs/src/ChangeLog entry: 2008-10-16 Ulrich Mueller * m/sh3.h: New file, machine description for SuperH. --- emacs-orig/configure.in 2008-08-28 22:31:27.000000000 +0200 +++ emacs/configure.in 2008-10-16 17:27:37.000000000 +0200 @@ -540,6 +540,11 @@ machine=xtensa opsys=gnu-linux ;; + ## SuperH Linux-based GNU system + sh[34]*-*-linux-gnu* ) + machine=sh3 opsys=gnu-linux + ;; + * ) unported=yes ;; --- emacs-orig/etc/MACHINES 2008-08-01 23:44:40.000000000 +0200 +++ emacs/etc/MACHINES 2008-10-16 17:27:37.000000000 +0200 @@ -426,6 +426,12 @@ (now remapped as part of the text). These are never swapped in. +SuperH (sh[34]*-*-linux-gnu) + + Emacs 23.0.60 was reported to work on GNU/Linux (October 2008). + Tested on a little-endian sh4 system (cpu type SH7751R) running + Gentoo Linux 2008.0. + Tadpole 68K (m68k-tadpole-sysv) Changes merged in 19.1. --- emacs-orig/src/m/sh3.h 1970-01-01 01:00:00.000000000 +0100 +++ emacs/src/m/sh3.h 2008-10-16 17:27:37.000000000 +0200 @@ -0,0 +1,24 @@ +/* Machine description file for SuperH. */ + +#include + +/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word + is the most significant byte. */ + +#if (defined (__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) \ + || (defined (BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN) +# undef WORDS_BIG_ENDIAN +#elif (defined (__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) \ + || (defined (BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN) +# define WORDS_BIG_ENDIAN +#else +# error "cannot determine byte sex" +#endif + +/* Define NO_ARG_ARRAY if you cannot take the address of the first of a + group of arguments and treat it as an array of the arguments. */ + +#define NO_ARG_ARRAY + +/* arch-tag: c997297c-9b92-11dd-b25e-0012f098dd76 + (do not change this comment) */ ------cutting-here-may-damage-your-screen-surface----63792801------