From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5061 invoked by alias); 14 Sep 2004 21:30:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5054 invoked from network); 14 Sep 2004 21:30:26 -0000 Received: from unknown (HELO main.gmane.org) (80.91.229.2) by sourceware.org with SMTP; 14 Sep 2004 21:30:26 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C7Ksb-0000qU-00 for ; Tue, 14 Sep 2004 23:30:25 +0200 Received: from pd9e8f831.dip.t-dialin.net ([217.232.248.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Sep 2004 23:30:25 +0200 Received: from david.voit by pd9e8f831.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Sep 2004 23:30:25 +0200 To: gdb@sources.redhat.com From: David Voit Subject: Need help at writing basic igen simulator Date: Tue, 14 Sep 2004 21:30:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd9e8f831.dip.t-dialin.net User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) X-SW-Source: 2004-09/txt/msg00110.txt.bz2 Hello everybody, I writed a simple igen file and want to test it now. So I tried to integrate it with the existing v850 sourcecode (this looked the simplest of all igen sims) but I find it still to complex for my needs. And now I want to ask if somebody has tried the same and has a base for a simple igen simulator which dont need to do much but execute the instructions in the igen file. I dont need: - Any sort of memory handling - Interupts - or any other complicated things I just want, in the begining, write a template for all MMIX instructions. Here is the very very simple igen file at the moment: :model:::mmix:mmix: :internal::::illegal: { sim_io_eprintf (SD, "Illegal instruction at address 0x%lx\n", (unsigned long) cia); sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL); } 11100011,8.reg,16.value::::setl "setl reg, value" { /* TODO */ } 00100000,8.reg1,8.reg2,8.reg3::::add "add reg1, reg2, reg3" { /* TODO */ } 00011000,8.reg1,8.reg2,8.reg3::::mul "mul reg1, reg2, reg3" { /* TODO */ } 00100100,8.reg1,8.reg2,8.reg3::::sub "sub reg1, reg2, reg3" { /* TODO */ } 00011100,8.reg1,8.reg2,8.reg3::::div "div reg1, reg2, reg3" { /* TODO */ } ps.: If i write the instruction identifer in hexform like this "8.0xe3,8.reg,16.value::::setl" igen fails with "ld-insn.c:293: assertion failed - word->first->last < 0" it this the correct behavior. Thanks David