URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [cgen/] [cgen-opc.scm] - Rev 6
Compare with Previous | Blame | View Log
; CPU description file generator for the GNU Binutils. ; This is invoked to build: $arch-desc.[ch], $arch-opinst.c, ; $arch-opc.h, $arch-opc.c, $arch-asm.in, $arch-dis.in, and $arch-ibld.[ch]. ; Copyright (C) 2000, 2009 Red Hat, Inc. ; This file is part of CGEN. ; ; This is a standalone script, we don't load anything until we parse the ; -s argument (keeps reliance off of environment variables, etc.). ; Load the various support routines. "/read.scm""/desc.scm""/desc-cpu.scm""/opcodes.scm""/opc-asmdis.scm""/opc-ibld.scm""/opc-itab.scm""/opc-opinst.scm""-OPC""file""specify path to .opc file""-H""file""generate $arch-desc.h in <file>""-C""file""generate $arch-desc.c in <file>""-O""file""generate $arch-opc.h in <file>""-P""file""generate $arch-opc.c in <file>""-Q""file""generate $arch-opinst.c in <file>""-B""file""generate $arch-ibld.h in <file>""-L""file""generate $arch-ibld.in in <file>""-A""file""generate $arch-asm.in in <file>""-D""file""generate $arch-dis.in in <file>"; (-R "file" "generate $cpu-reloc.h") ; FIXME: wip (rename to -abi.h?) ; (-S "file" "generate cpu-$cpu.c") ; FIXME: wip (bfd's cpu-$cpu.c) ; ((-R) (file-write *arg* cgen-reloc.c)) ; ((-S) (file-write *arg* cgen-bfdcpu.c)) ; Kept global so it's available to the other .scm files. "."; Scan argv for -s srcdir. ; We can't process any other args until we find the cgen source dir. ; The result is srcdir. ; We assume "-s" isn't the argument to another option. Unwise, yes. ; Alternatives are to require it to be the first argument or at least preceed ; any option with a "-s" argument, or to put knowledge of the common argument ; set and common argument parsing code in every top level file. "`-s srcdir' not present, can't load cgen""-s""missing srcdir arg to `-s'"; Main routine, parses options and calls generators. ; Find and set srcdir, then load all Scheme code. ; Drop the first argument, it is the script name (i.e. argv[0]). "opcodes"