Add moxie simulator
This commit is contained in:
parent
1ec7823fec
commit
fdd6fa6167
@ -1,3 +1,10 @@
|
||||
2009-04-30 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* MAINTAINERS: Add myself for the moxie port.
|
||||
* moxie: New directory.
|
||||
* configure.ac: Add entry for moxie.
|
||||
* configure: Regenerate.
|
||||
|
||||
2009-04-27 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* avr: New directory.
|
||||
|
@ -16,6 +16,7 @@ igen (igen simulators)
|
||||
ppc Andrew Cagney <ac131313@redhat.com>
|
||||
m68hc11 Stephane Carrez <stcarrez@nerim.fr>
|
||||
mips Thiemo Seufer <ths@networkno.de>
|
||||
moxie Anthony Green <green@moxielogic.com>
|
||||
sh (global maintainers)
|
||||
sh64 Dave Brolley <brolley@redhat.com>
|
||||
m32c DJ Delorie <dj@redhat.com>
|
||||
|
4399
sim/configure
vendored
4399
sim/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -101,6 +101,10 @@ if test "${enable_sim}" != no; then
|
||||
AC_CONFIG_SUBDIRS(mn10300)
|
||||
igen=yes
|
||||
;;
|
||||
moxie-*-*)
|
||||
AC_CONFIG_SUBDIRS(moxie)
|
||||
testsuite=yes
|
||||
;;
|
||||
sh64*-*-*)
|
||||
AC_CONFIG_SUBDIRS(sh64)
|
||||
testsuite=yes
|
||||
|
109
sim/moxie/ChangeLog
Normal file
109
sim/moxie/ChangeLog
Normal file
@ -0,0 +1,109 @@
|
||||
2008-10-03 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add support for ldo.b, sto.b, ldo.s, sto.s.
|
||||
|
||||
2008-09-10 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (NUM_SPRO_SREGS): New.
|
||||
(struct moxie_regset): Add sregs.
|
||||
(set_initial_gprs): Initialize sregs.
|
||||
(sim_resume): Add gsr and ssr support.
|
||||
|
||||
2008-09-04 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add inc and dec instructions.
|
||||
|
||||
2008-09-04 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (struct moxie_regset): Use an unsigned long long to keep
|
||||
track of instruction trace counts.
|
||||
* interp.c (sim_resume): Ditto.
|
||||
(sim_info): Ditto.
|
||||
|
||||
2008-08-22 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Remove debugging code.
|
||||
|
||||
2008-08-20 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (TRACE): Add new tracing infrastructure.
|
||||
(sim_resume): Use it.
|
||||
(reg_names): Add new registers.
|
||||
(NUM_MOXIE_REGS): New registers.
|
||||
(PC_REGNO): New registers.
|
||||
(sim_resume): New instruction encodings.
|
||||
|
||||
2008-08-16 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add SYS_read, and fix SYS_open and SYS_write.
|
||||
(convert_target_flags): New function.
|
||||
|
||||
2008-08-08 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add SYS_open and SYS_write system call support.
|
||||
|
||||
2008-08-04 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* Makefile.in (SIM_EXTRA_LIBS): Add -lz.
|
||||
|
||||
2008-08-04 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_create_inferior): Set argc & argv in the target.
|
||||
|
||||
2008-04-12 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add brk.
|
||||
|
||||
2008-04-10 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add static chain pointer to call frame.
|
||||
|
||||
2008-03-24 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add missing breaks.
|
||||
(sim_resume): Fix neg implementation.
|
||||
|
||||
2008-03-23 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_load): Don't require a .bss section.
|
||||
|
||||
2008-03-21 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add swi, and, lshr, ashl, sub.l, neg, or,
|
||||
not, ashr, xor.
|
||||
|
||||
2008-03-20 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (struct moxie_regset): Add condition code, cc.
|
||||
(CC_GT, CC_LT, CC_EQ, CC_GTU, CC_LTU): Define.
|
||||
(sim_resume): Add jmpa, jsr, cmp, beq, bne, blt, bgt, bltu, bgtu,
|
||||
bge, ble, bgeu, and bleu.
|
||||
(rbat, rsat, wbat, wsat): New functions.
|
||||
(sim_resume): Add ld.b, lda.b, ldi.b, ld.s, lda.s, ldi.s, st.b,
|
||||
sta.b, st.s, sta.s, jmp.
|
||||
|
||||
2008-03-19 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add ld.l, st.l, lda.l, sta.l.
|
||||
jsra should set $fp == $sp.
|
||||
Fix jsra and ret semantics.
|
||||
|
||||
2008-03-18 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (sim_resume): Add push, pop and add.l.
|
||||
|
||||
2008-03-16 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (EXTRACT_WORD): Define.
|
||||
(rlat): Use EXTRACT_WORD.
|
||||
(sim_resume): Add jsra and ret.
|
||||
|
||||
2008-02-22 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* interp.c (reg_names): Define.
|
||||
(sim_resume): Use reg_names.
|
||||
|
||||
2008-02-21 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* config.in, configure, configure.ac, interp.c, Makefile.in,
|
||||
sysdep.h: Created.
|
29
sim/moxie/Makefile.in
Normal file
29
sim/moxie/Makefile.in
Normal file
@ -0,0 +1,29 @@
|
||||
# Makefile template for Configure for the moxie sim library.
|
||||
# Copyright (C) 2008
|
||||
# Free Software Foundation, Inc.
|
||||
# Written by Anthony Green
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_OBJS = interp.o sim-load.o
|
||||
SIM_EXTRA_LIBS = -lm -lz
|
||||
SIM_EXTRA_CLEAN = moxie-clean
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
||||
interp.o: interp.c
|
||||
|
||||
moxie-clean:
|
92
sim/moxie/config.in
Normal file
92
sim/moxie/config.in
Normal file
@ -0,0 +1,92 @@
|
||||
/* config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the <fpu_control.h> header file. */
|
||||
#undef HAVE_FPU_CONTROL_H
|
||||
|
||||
/* Define to 1 if you have the `getrusage' function. */
|
||||
#undef HAVE_GETRUSAGE
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#undef HAVE_SYS_RESOURCE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `time' function. */
|
||||
#undef HAVE_TIME
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `__setfpucw' function. */
|
||||
#undef HAVE___SETFPUCW
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
5973
sim/moxie/configure
vendored
Normal file
5973
sim/moxie/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
14
sim/moxie/configure.ac
Normal file
14
sim/moxie/configure.ac
Normal file
@ -0,0 +1,14 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.59)dnl
|
||||
AC_INIT(Makefile.in)
|
||||
AC_CONFIG_HEADER(config.h:config.in)
|
||||
|
||||
sinclude(../common/aclocal.m4)
|
||||
|
||||
# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
|
||||
# it by inlining the macro's contents.
|
||||
sinclude(../common/common.m4)
|
||||
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
|
||||
SIM_AC_OUTPUT
|
1481
sim/moxie/interp.c
Normal file
1481
sim/moxie/interp.c
Normal file
File diff suppressed because it is too large
Load Diff
94
sim/moxie/sysdep.h
Normal file
94
sim/moxie/sysdep.h
Normal file
@ -0,0 +1,94 @@
|
||||
/* System includes and definitions used by the moxie simulator.
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
Contributed by Anthony Green
|
||||
|
||||
This file is part of GDB, the GNU debugger.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef __SYSDEP_H
|
||||
#define __SYSDEP_H
|
||||
|
||||
#ifndef hosts_std_host_H
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <sys/file.h>
|
||||
#include "ansidecl.h"
|
||||
|
||||
#ifndef O_ACCMODE
|
||||
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
/*#include <string.h>*/
|
||||
#else
|
||||
extern char * mktemp ();
|
||||
#ifndef memset
|
||||
extern PTR memset ();
|
||||
#endif
|
||||
|
||||
#ifndef DONTDECLARE_MALLOC
|
||||
extern PTR malloc ();
|
||||
extern PTR realloc ();
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
extern PTR memcpy ();
|
||||
#else
|
||||
/* char * memcpy (); */
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
extern void free ();
|
||||
#else
|
||||
extern int free();
|
||||
#endif
|
||||
|
||||
#ifndef strchr
|
||||
extern char * strchr();
|
||||
#endif
|
||||
extern char * getenv();
|
||||
extern PTR memchr();
|
||||
extern char * strrchr();
|
||||
|
||||
extern char * strrchr();
|
||||
extern char * ctime();
|
||||
extern long atol();
|
||||
extern char * getenv();
|
||||
#endif /* STDC_HEADERS */
|
||||
|
||||
#ifndef BYTES_IN_PRINTF_INT
|
||||
#define BYTES_IN_PRINTF_INT 4
|
||||
#endif
|
||||
|
||||
#include "fopen-same.h"
|
||||
#define hosts_std_host_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
#endif /* STDC_HEADERS */
|
||||
|
||||
#endif /* __SYSDEP_H */
|
Loading…
x
Reference in New Issue
Block a user