From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29280 invoked by alias); 28 May 2006 20:23:56 -0000 Received: (qmail 29189 invoked by uid 22791); 28 May 2006 20:23:54 -0000 X-Spam-Check-By: sourceware.org Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.177) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 28 May 2006 20:23:36 +0000 Received: from [84.133.16.8] (helo=p54851008.dip0.t-ipconnect.de) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2Dk-1FkRnR33PE-0000lB; Sun, 28 May 2006 22:23:34 +0200 From: Wolfgang =?iso-8859-1?q?M=FCes?= To: gcc@gcc.gnu.org Subject: Modifying ARM code generator for elimination of 8bit writes - need help Date: Sun, 28 May 2006 20:23:00 -0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605282223.33002.wolfgang@iksw-muees.de> X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg00644.txt.bz2 Hello, I am trying to port big C/C++ programs (see www.dslinux.org) to the nintendo DS console. The console has 4 Mbytes internal memory, and 32 MBytes external memory which is *not* 8bit writable (only 16 and 32 bits). CPU is an ARM 946. Using the external memory for ROM(XIP) and the internal memory for data, linux in console mode is possible, but graphical environments are very limited... The idea to overcome this problem is to a) activate data cache in writeback mode for the external memory. b) modify the gcc code generator. "strb" opcode is transformed to "swpb". swpb will load the cache because of the read-modify-write, and at cache writeback time, the whole cached half-line will be written back, eliminating the 8bit write problem. I have proven the solution with an assembler program, but I think I need some help modifying the compiler.... I found arm.md and the moveqi insns, but because of the different addressing modes of strb and swpb, its not easy to make the change. And there must be a compiler option for this, too. Could somebody please tell me how to implement this change? regards Wolfgang -- We're back to the times when men were men and wrote their own device drivers. (Linus Torvalds)