Re: Dedicated logical instructions

2010-11-10 Thread Radu Hobincu
instructions for enabling and disabling interrupts: the instructions have no operands, but the compiler shouldn't move the block in between them for optimization. Thank you, and please, if I waste too much of your time with random questions, tell me and I will stop. :) Regards, R. Radu Hobincu

Re: Dedicated logical instructions

2010-11-10 Thread Radu Hobincu
Radu Hobincu radu.hobi...@arh.pub.ro writes: However, now I have another problem. I have 2 instructions in the ISA: 'where' and 'endwhere' which modify the behavior of the instructions put in between them. I made a macro with inline assembly for each of them. The problem is that since

Dedicated logical instructions

2010-11-08 Thread Radu Hobincu
Hello again, I have another, quick question: I have dedicated logical instructions in my RISC machine (lt - less than, gt - greater than, ult - unsigned less than, etc.). I'm also working on adding instructions for logical OR, AND, NOT, XOR. While reading GCC internals, I've stumbled on this:

Re: GCC RTX generation question

2010-10-21 Thread Radu Hobincu
Radu Hobincu radu.hobi...@arh.pub.ro writes: 2. I have another piece of code that fails to compile with -O3. - struct desc{ int int1; int int2; int int3; }; int bugTest(struct desc *tDesc){ return *((int*)(tDesc-int1 + 16

Re: GCC RTX generation question

2010-10-20 Thread Radu Hobincu
Radu Hobincu radu.hobi...@arh.pub.ro writes: 1. I have the following code: --- extern void doSmth(); void bugTest(){ doSmth(); } --- It compiles fine with -O0, but when I try to use -O3, I get the following compiler error

GCC RTX generation question

2010-10-19 Thread Radu Hobincu
Hello, I wrote here before a few months ago, I'm trying to port GCC to a simple RISC machine and I have two problems I don't seem to be able to fix. I'm using gcc 4.4.3 for both compiling and as source code. 1. I have the following code: --- extern void doSmth();

Re: GCC porting questions

2010-06-18 Thread Radu Hobincu
Radu Hobincu radu.hobi...@arh.pub.ro writes: The compiler crashes with Segmentation fault. 2. When I try char c = 'c';, the compiler fails an assert: It's time to break out the debugger and look at the source code and figure out what the compiler is doing. Neither of these problems ring

Re: GCC porting questions

2010-06-17 Thread Radu Hobincu
Hello again, I managed to get the thing working and I have two last issues to solve. 1. My machine does not have any kind of floating point instructions. When I write in the C source code float f = 0.5f; The compiler crashes with Segmentation fault. Running a gdb on it, the output becomes

Re: GCC porting questions

2010-06-11 Thread Radu Hobincu
behavior since I am thinking more like in the way of machine execution. The compiler doesn't know the values of the operands at compile time, so it doesn't really set any flags in the condition register. How does it work then? Sorry for the large text and thanks again for your time. Radu Hobincu

GCC porting questions

2010-06-10 Thread Radu Hobincu
Hello again, I have written here a few weeks ago regarding some tutorials on GCC porting and got some very interesting replies. However, I seem to have gotten stuck with a couple of issues in spite of my massive Googling, and I was wondering if anyone could spare a couple of minutes for some

Re: GCC porting tutorials

2010-04-26 Thread Radu Hobincu
Hello again and thank you a lot for the quick replies! I am impressed by the number of mails I got in such a short time. You helped us loads. I will also try to document our work every step of the way, maybe it will help someone else in the future. Regards, Radu

GCC porting tutorials

2010-04-24 Thread Radu Hobincu
Hello, My name is Radu Hobincu, I am part of a team at Politehnica University of Bucharest that is developing a massive parallel computing architecture and currently my job is to port the GCC compiler to this new machine. I've been looking over the GCC official site at http://gcc.gnu.org/ but I