On Mon, Jan 30, 2012 at 6:10 PM, Jeremy Bennett <[email protected]> wrote: > On Fri, 2012-01-27 at 14:09 +0000, Jorge Aires wrote: >> >> My name is Jorge Aires, I'm student in University of Minho (Portugal) >> and I'm making a project with the or1200 CPU. >> I'm adding new features on the processor but I have a problem, I need >> to improve the assembler with news instructions. >> >> I'm using the newlib toolchain. >> I see in the folder "...binutils-2.20.1/opcodes/or32-opc.c", which is >> the location of the table of opcodes for the OpenRISC. >> I also see the file ".../or32-dis.c" where it is the Instruction >> printing code for the OpenRISC. >> I think is here where i have to include the news instructions and >> rules...but i'm not sure. >> >> I have some questions : >> This two files was generated using some lexer or parser, with some >> files (.l , .y and includes ), you made with your rules? >> if Yes, can you send me this files to facilitate my task? >> If you can't for any reason, just say me if I'm right for the two file >> mencioned before. > > Hi Jorge, > > This is a good question to post on the OpenRISC mailing lists (copied) > or forum. > > The binutils utilities, including the assembler, were generated using > CGEN around 1999/2000. The problem has been that since then, the CGEN > specification has not been maintained, and the parser tables have been > manually updated in the source code. > > The good news is that Julius Baxter has resurrected the CGEN > specifications, and is working on an update to the tool chain which will > be based on these. I suggest this is the best place for you to start.
Hi Jorge, This sounds like nice work. Jeremy is right, I have recently been updating the existing OpenRISC stuff in CGEN. It is an extremely simple process to add new instructions to the assembler/disassembler and implement their functionality in the simulator. I have a CGEN and binutils repo with my work so far with instructions on how to regenerate the CGEN inputs and compile binutils. https://github.com/juliusbaxter You'll find the gdb-sim-addon branch of the binutils repo contains the gdb simulator stuff, which isn't usually in binutils, but I've got it there for now. I can recommend using the CGEN system to implement your new instructions. It's very easy once you get used to it. I hope that's useful. Cheers, Julius _______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
