Re: Question about Machine Description

2010-06-15 Thread Ian Lance Taylor
yazdanbakhsh writes: > I'm working with GCC 2.7. I think I see your problem. > I think, It doesn't support define_predict. > I define a c function in the mips.c file and add the following lines: > > int > new_arith_operand (op, mode) > rtx op; > enum machine_mode mode; > { > if (GE

Re: Question about Machine Description

2010-06-15 Thread yazdanbakhsh
Actually, I'm working with simplescalar and it only supports gcc 2.9. -- View this message in context: http://old.nabble.com/Question-about-Machine-Description-tp1026428p28890565.html Sent from the gcc - Dev mailing list archive at Nabble.com.

Re: Question about Machine Description

2010-06-15 Thread Manuel López-Ibáñez
On 15 June 2010 14:01, yazdanbakhsh wrote: > > I'm working with GCC 2.7. I think, It doesn't support define_predict. > I define a c function in the mips.c file and add the following lines: [...] > I appreciate any help. I think the best advice I can give you is: Use a recent GCC version. GCC 2.7

Re: Question about Machine Description

2010-06-15 Thread yazdanbakhsh
Hi, I'm working with GCC 2.7. I think, It doesn't support define_predict. I define a c function in the mips.c file and add the following lines: int new_arith_operand (op, mode) rtx op; enum machine_mode mode; { if (GET_CODE (op) == CONST_INT) if(NEW_INT_UNSIGNED (op))

Re: Question about Machine Description

2010-06-15 Thread Revital1 Eres
Hello, > I want to limit the size of immediate field of some operation. I think you can look at SIGNED_INT_FITS_N_BITS definition at config/crx/crx.c for such example. You can write a predicate like the following; and use it when describing the immediate operand in the md file. (define_predicate

Re: Question about Machine Description

2010-06-15 Thread yazdanbakhsh
Hi, I want to limit the size of immediate field of some operation. For example somehow modify the machine description that the compiler supports only 0-255 for immediate operand. I also want to change the compiler to the 2-address operand. do you have any ideas? I just need some hint Best Regard

Re: Question about Machine Description

2010-06-05 Thread Ian Lance Taylor
yazdanbakhsh writes: > I did what you said, and the same error happened :( I'm sorry you're having trouble, but if you want us to be able to help you you need to show us precisely what you did, precisely what happened, and what you expected to happen. Ian

Re: Question about Machine Description

2010-06-05 Thread yazdanbakhsh
I did what you said, and the same error happened :( -- View this message in context: http://old.nabble.com/Question-about-Machine-Description-tp1026428p28790996.html Sent from the gcc - Dev mailing list archive at Nabble.com.

Re: Question about Machine Description

2010-06-05 Thread Ian Lance Taylor
yazdanbakhsh writes: > I want to exclude all immediate or instruction. I did this by the following > define_insn > > /-- > (define_insn "iorsi3" > [(set (match_operand:SI 0 "register_operand" "=d,d") > (ior:SI (m

Re: Question about Machine Description

2010-06-05 Thread yazdanbakhsh
Hi, I want to exclude all immediate or instruction. I did this by the following define_insn /-- (define_insn "iorsi3" [(set (match_operand:SI 0 "register_operand" "=d,d") (ior:SI (match_operand:SI 1 "uns_arith

Re: Question about Machine Description

2010-06-02 Thread Ian Lance Taylor
yazdanbakhsh writes: > I want to exclude XORI from the instruction set of a cpu. I deleted all the > XORI in md file. But when I compiled my program some XORI operation still > exist. how this would be possible? It could be printed directly from a .c file in your config/CPU directory. Ian

Re: Question about Machine Description

2010-06-02 Thread yazdanbakhsh
Hi, I want to exclude XORI from the instruction set of a cpu. I deleted all the XORI in md file. But when I compiled my program some XORI operation still exist. how this would be possible? -- View this message in context: http://old.nabble.com/Question-about-Machine-Description-tp1026428p287633

Re: Question about Machine Description

2010-05-09 Thread Ian Lance Taylor
yazdanbakhsh writes: > (define_insn "*bltdf" > [(set (pc) > (if_then_else (lt:SI (match_operand:DF 1 "" "") >(match_operand:DF 2 "" "")) > (match_operand 3 "pc_or_label_operand" "") > (match_operand 4 "pc_or_label_operand" "")))] > "" > > "* > {

Re: Question about Machine Description

2010-05-09 Thread yazdanbakhsh
Hi, I found an strategy that would solve my problem. I changed .md with the following paragraph... (define_expand "blt" [(set (pc) (if_then_else (lt:SI (match_dup 1)

Re: Question about Machine Description

2010-05-06 Thread Ian Lance Taylor
yazdanbakhsh writes: > (define_expand "cbranchsi4" > [(set (pc) > (if_then_else: SI (le:SI (match_operand:SI 0 "register_operand" "=d,d") > (match_operand:SI 1 "register_operand" "=d,d")) > (label_ref (match_operand 2 "" "")) > (pc)))] > "" > "

Re: Question about Machine Description

2010-05-06 Thread yazdanbakhsh
Hi, I changed the .md and .c file: I add these lines to the .md file: - (define_insn "ble1" [(set (pc) (if_then_else: SI (le:SI (match_operand:SI 0 "register_operand" "=d,d") (match_operand:SI 1 "register_operand" "=d,d")

Re: Question about Machine Description

2010-05-06 Thread yazdanbakhsh
Hi, As I told I want to add "ble" intruction in MIPS that works like "beq". I used from the available branch_equality instruction that shows in the following paragraph: -- (define_insn "branch_equal

Re: Question about Machine Description

2010-05-04 Thread Ian Lance Taylor
yazdanbakhsh writes: > I have read all the documents, and changed some lines but nothing happened :( That is good, but to get help you really need to ask specific questions. Show us an insn pattern, tell us what you are trying to do, tell us what you did, tell us what happened. Ian > Ian Lanc

Re: Question about Machine Description

2010-05-04 Thread yazdanbakhsh
I have read all the documents, and changed some lines but nothing happened :( Ian Lance Taylor-3 wrote: > > yazdanbakhsh writes: > >> I want to change instruction blez to ble. ble compare two registers and >> jump >> to the target address if the condition is true. > > Read the internals manua

Re: Question about Machine Description

2010-05-04 Thread Ian Lance Taylor
yazdanbakhsh writes: > I want to change instruction blez to ble. ble compare two registers and jump > to the target address if the condition is true. Read the internals manual to understand how operand predicates and constraints work. See the hundreds of existing examples. Ask if you have spec

Re: Question about Machine Description

2010-05-04 Thread yazdanbakhsh
Hi, I want to change instruction blez to ble. ble compare two registers and jump to the target address if the condition is true. thanks in advance, Ian Lance Taylor-3 wrote: > > yazdanbakhsh writes: > >> Please assume I'm working with the MIPS. There is a little difference >> between the MIP

Re: Question about Machine Description

2010-05-03 Thread Ian Lance Taylor
yazdanbakhsh writes: > This is the newer version. It works correctly. I just want know is there any > other way. Did you read what I wrote earlier? http://gcc.gnu.org/ml/gcc/2010-05/msg00048.html Ian

Re: Question about Machine Description

2010-05-03 Thread yazdanbakhsh
This is the newer version. It works correctly. I just want know is there any other way. thanks *** (define_insn "lshrsi3" [(set (match_operand:SI 0 "register_operand" "=d") (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")

Re: Question about Machine Description

2010-05-03 Thread yazdanbakhsh
I forget to thank you for your help. But if I do write your code how compiler knows that it should be put two instructions instead immediate shift? I write this piese of code: ###33 (define_insn "lshrsi3" [(set (match_operand:SI 0 "re

Re: Question about Machine Description

2010-05-03 Thread yazdanbakhsh
Is it any way that we can chat? I'm working on my thesis project and a paper. I appreciate it if you would cooperate in this project. I have gmail Id "amir.yazdanbakhsh" and also skype "amir.yazdanbakhsh" best regards, yazdanbakhsh wrote: > > Hi, > > Please assume I'm working with the MIPS. Th

Re: Question about Machine Description

2010-05-03 Thread Ian Lance Taylor
yazdanbakhsh writes: > Please assume I'm working with the MIPS. There is a little difference > between the MIPS and what I'm actually working on it. How can I remove > immediate logical shift right/left from the compiler? > I mean If I want the programmer writes an immediate shift, It is compiled

Re: Question about Machine Description

2010-05-03 Thread yazdanbakhsh
Hi, Please assume I'm working with the MIPS. There is a little difference between the MIPS and what I'm actually working on it. How can I remove immediate logical shift right/left from the compiler? I mean If I want the programmer writes an immediate shift, It is compiled to the two instructions:

Re: Question about Machine Description

2010-05-03 Thread Ian Lance Taylor
yazdanbakhsh writes: > I'm working on my a gcc compiler for my own written processor with the help > of SimpleScalar. > I want to remove "srav/slav" (immediate arithmetic shift) from the > instruction set. I explore ss.md file but I didn't see any define_ins for > the mentioned instructions, but

Re: Question about Machine Description

2010-05-03 Thread yazdanbakhsh
Dear all, I'm working on my a gcc compiler for my own written processor with the help of SimpleScalar. I want to remove "srav/slav" (immediate arithmetic shift) from the instruction set. I explore ss.md file but I didn't see any define_ins for the mentioned instructions, but they are used in othe

Re: Question about Machine Description

2005-10-06 Thread Richard Sandiford
Ian Lance Taylor writes: > This kind of error generally means that the operand predicate accepts > an operand which no constraint matches. If the predicate (e.g., > register_operand) accepts an operand, then there must be a constraint > that matches it. Otherwise you will get an error in > const

Re: Question about Machine Description

2005-10-03 Thread Ian Lance Taylor
"Balaji V. Iyer" <[EMAIL PROTECTED]> writes: > Thank you very much Ian and Shreyas for your quick response. So I guess, > my question now would be, what would be an exmple that matches this > constraint below? > > ((insn 1497 1924 1756 2 (set (mem:BI (plus:SI (reg/f:SI 2 r2) > (co

Re: Question about Machine Description

2005-10-03 Thread Balaji V. Iyer
Thank you very much Ian and Shreyas for your quick response. So I guess, my question now would be, what would be an exmple that matches this constraint below? ((insn 1497 1924 1756 2 (set (mem:BI (plus:SI (reg/f:SI 2 r2) (const_int -137 [0xff77])) [72 S1 A8]) (le:BI (r

Re: Question about Machine Description

2005-10-03 Thread Ian Lance Taylor
"Balaji V. Iyer" <[EMAIL PROTECTED]> writes: No need to send to both gcc@gcc.gnu.org and [EMAIL PROTECTED] I removed gcc-help in this reply. Thanks. >I am currently developing a GCC port for my own generic 32 bit > processor. I have this following error when I tried to compile a > benchmark