public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* porting GCC
@ 2001-02-01  2:37 Krzysztof Matula
  2001-02-01  3:10 ` Richard Earnshaw
  0 siblings, 1 reply; 28+ messages in thread
From: Krzysztof Matula @ 2001-02-01  2:37 UTC (permalink / raw)
  To: gcc

Hi!

I am extending one of GCC ports an I have the following problem:

I need to detect all references to to objects in data segment (SYMBOL_REF/v)
and modify rtx in such way, that the segment base address is added to the
offset (represented by the symbol itself). Generating such rtx is not a
problem, but I don't know where to connect this. In the code I am extending
such replacement is made in two "define_expand"-s. One of them looks like
this:

set(reg)(plus:SI((general_operand)(general_operand)))

As a result new rtx is generated that takes the segment base address and
adds a symbol offset:

set(reg)(plus:SI((reg)(SYMBOL_REF)))

...such rtl matches one of the "define_insn"-s.

The problm is that sometimes during optimizations GCC creates exactly the
same rtl, and it matches the same "define_insn" without going through
"define_expand". The rtl modification for proper data segment access is not
performed...

I think I have to flag the rtx generated in define_expand in some way and
setup the predicate used in define_insn to reject unflagged symbol refs...

Is that the right way??? If so, how can I flag the rtx??? Or, maybe I should
do this in a different way???

KM


^ permalink raw reply	[flat|nested] 28+ messages in thread
* porting gcc
@ 2001-02-15  8:41 Filippo Basso
  2001-02-15  9:50 ` Fergus Henderson
  0 siblings, 1 reply; 28+ messages in thread
From: Filippo Basso @ 2001-02-15  8:41 UTC (permalink / raw)
  To: gcc

Hi, I'm filippo from Italy,
   and I'm trying to port Linux 2.0.38 under a DSP-multiRISC architecture, with the uCLinux fellows...
Now, Alessandro Rubini told me that it will be better to have first GCC ported to this architecture...
Is it possible ?
Where do I have to start from ?
Is there some guy that have some time to ask stupid questions ?
(n.b. for this processor, I have an ansi-C compiler (well, a quasi-ansi), an assembler, and a linker,... some tools. I need only to
do the scalar port (using the DSP, the multiRISC I'll think the day after ! ;-))

really thanks,
   phy


^ permalink raw reply	[flat|nested] 28+ messages in thread
* porting gcc
@ 2002-10-22  9:53 Grégoire Dooms
  2002-10-22  9:56 ` Grégoire Dooms
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Grégoire Dooms @ 2002-10-22  9:53 UTC (permalink / raw)
  To: gcc

I'd like to port gcc to the Microchip PIC 8 bit microcontroller familly.

I've read all the documentation (Passes, Machine Description, ...) and the 
AVR (other 8bit uc) files (.md .c .h). 

What should I do now? 
Is it possible to incrementally write those files ?
Is there a document explaining that process? 
Who should I ask about a few not-understood stuff in the AVR files? 

Thank you for your help.

Grégoire Dooms.

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Porting gcc
@ 2003-08-13 11:15 Petar Penchev
  2003-08-13 16:07 ` Ben Elliston
  0 siblings, 1 reply; 28+ messages in thread
From: Petar Penchev @ 2003-08-13 11:15 UTC (permalink / raw)
  To: gcc

Hello All,
I started porting GCC for new target. I read the documentation I have found
and I have couple questions I can't find answers.

Target.c target.h and target.md files are complementary to one another. I
mean they have common purpose (to define target machine). I am wondering are
there any tools which could help me to create /or better to generate / these
files or I have to write them from scratch ?

And second question in Amazon.com I found some books on porting GCC, does
anybody know something about on-line version of these books ?

Regards Petar

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Porting gcc
@ 2004-05-21 13:09 Mile Davidovic
  2004-05-21 13:43 ` Dave Korn
  0 siblings, 1 reply; 28+ messages in thread
From: Mile Davidovic @ 2004-05-21 13:09 UTC (permalink / raw)
  To: gcc

Hi everybody

I have questions regarding support new MIPS based processor, MDE950xx. In the 
basic it is same as R3000 but except one thing, this processor does not support 
lwl and lwr instructions, what is best way to support this "feature"?

We want to use latest gcc version, 3.4. What is necessary steps for porting gcc? 
If we have success to support what is best way to add patches to gcc?

Best regards Mile


^ permalink raw reply	[flat|nested] 28+ messages in thread
* Porting GCC
@ 2004-06-02 16:49 Gyle Yearsley
  2004-06-03 15:38 ` Richard Sandiford
  0 siblings, 1 reply; 28+ messages in thread
From: Gyle Yearsley @ 2004-06-02 16:49 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org'

> I have been working on a gcc cross-compiler for a new processor that I am
> designing. I am
> in the process of setting up the ABI. Currently I am having a problem with
> pushing arguments
> on the stack when calling a function. I have allocoated three registers to
> hold function arguments.
> When I use three or less arguments the code will compile properly. Once I
> exceed the three args gcc
> will abort. I hae traced this to the function instantiate_virtual_regs. I
> assume this is due to the push 
> instruction not matching. The processor has a stack pointer with a push
> instruction. Below is the output
> from the -dr debug option and the push insn from the machine descritption
> file.
> 
> (insn 15 13 16 (nil) (set (mem/f:SI (pre_dec:SI (reg/f:SI 16 sp)) [0 S4
> A8])
>         (mem/f:SI (plus:SI (reg/f:SI 18 virtual-stack-vars)
>                 (const_int -20 [0xffffffec])) [0 e+0 S4 A32])) -1 (nil)
>     (nil))
> 
> 
> (define_insn "pushsi"
>   [(set:SI (mem:SI (pre_dec:SI (reg:SI 16)))
> 	(match_operand:SI 0 "general_operand" "r,m"))]
>   ""
>   "@
> 	push.q %0
> 	push.q %0"
> )
> 
> Any help would be appreciated.
> 
> Gyle Yearsley
> Principal Design Engineer
> gyearsley@zilog.com
> 
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread
* RE: Porting GCC
@ 2004-06-04 15:24 Gyle Yearsley
  0 siblings, 0 replies; 28+ messages in thread
From: Gyle Yearsley @ 2004-06-04 15:24 UTC (permalink / raw)
  To: 'Richard Sandiford'; +Cc: 'gcc@gcc.gnu.org'

Thanks Richard,

I will check that.

Gyle 

-----Original Message-----
From: Richard Sandiford [mailto:rsandifo@redhat.com]
Sent: Thursday, June 03, 2004 9:38 AM
To: Gyle Yearsley
Cc: 'gcc@gcc.gnu.org'
Subject: Re: Porting GCC


Gyle Yearsley <gyearsley@zilog.com> writes:
>> (insn 15 13 16 (nil) (set (mem/f:SI (pre_dec:SI (reg/f:SI 16 sp)) [0 S4
>> A8])
>>         (mem/f:SI (plus:SI (reg/f:SI 18 virtual-stack-vars)
>>                 (const_int -20 [0xffffffec])) [0 e+0 S4 A32])) -1 (nil)
>>     (nil))
>> 
>> 
>> (define_insn "pushsi"
>>   [(set:SI (mem:SI (pre_dec:SI (reg:SI 16)))
>> 	(match_operand:SI 0 "general_operand" "r,m"))]
>>   ""
>>   "@
>> 	push.q %0
>> 	push.q %0"
>> )

One thing to check is that GO_IF_LEGITIMATE_ADDRESS accepts:

  (plus:SI (reg/f:SI 18 virtual-stack-vars)
           (const_int -20 [0xffffffec]))

as a valid address for SImode.

Richard

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Porting gcc
@ 2008-03-12  6:11 Schmave
  2008-03-12  6:15 ` Ben Elliston
  0 siblings, 1 reply; 28+ messages in thread
From: Schmave @ 2008-03-12  6:11 UTC (permalink / raw)
  To: gcc

Hi I would luke to know what I need to do to port gcc to a new  
architecture

Thanks

^ permalink raw reply	[flat|nested] 28+ messages in thread
* porting gcc
@ 2008-10-20 10:20 Aurélien Buhrig
  2008-10-20 19:34 ` Ian Lance Taylor
  0 siblings, 1 reply; 28+ messages in thread
From: Aurélien Buhrig @ 2008-10-20 10:20 UTC (permalink / raw)
  To: gcc

Hi,

We are designing a 16-bit asynchronous microcontroller. I’ve already ported
bfd, binutils (including sid simulator) using cgen, and part of gdb (for asm
debug only) and we are now investigating the best way to have C compiler.
So my questions are:

1- How much time do you think it will take to port gcc for this platform
with a quite simple instruction set, with a good porting guide?

2- What about optimizations? I suppose most of them are platform-independent
and performed at RTL level, aren't they? But, generally speaking, are there
many platform-dependent optimizations (I would have to do)? And is it
possible or how is it complex to have a level of optimization (code
compactness...) as good as commercial compiler ones (such as IAR, Keil,
ACE...)?

3- Finally, some companies may port gcc for us (perhaps in this mailing
list?). An idea of how much it could be?

Many thanks,
Aurelien


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2008-10-20 19:34 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-01  2:37 porting GCC Krzysztof Matula
2001-02-01  3:10 ` Richard Earnshaw
2001-02-02  3:43   ` Krzysztof Matula
2001-02-02  4:00     ` Richard Earnshaw
2001-02-02  6:07       ` Krzysztof Matula
2001-02-02  7:08         ` Richard Earnshaw
2001-02-15  8:41 porting gcc Filippo Basso
2001-02-15  9:50 ` Fergus Henderson
2002-10-22  9:53 Grégoire Dooms
2002-10-22  9:56 ` Grégoire Dooms
2002-10-22 14:40 ` Mike Stump
2002-10-22 14:43 ` Andrew Haley
2002-10-22 15:16   ` Michael Matz
2002-10-22 15:27   ` Svein E. Seldal
2002-10-22 18:02   ` Mike Stump
2002-10-23 10:05     ` Andrew Haley
2002-10-22 15:50 ` Denis Chertykov
2003-08-13 11:15 Porting gcc Petar Penchev
2003-08-13 16:07 ` Ben Elliston
2004-05-21 13:09 Mile Davidovic
2004-05-21 13:43 ` Dave Korn
2004-06-02 16:49 Porting GCC Gyle Yearsley
2004-06-03 15:38 ` Richard Sandiford
2004-06-04 15:24 Gyle Yearsley
2008-03-12  6:11 Porting gcc Schmave
2008-03-12  6:15 ` Ben Elliston
2008-10-20 10:20 porting gcc Aurélien Buhrig
2008-10-20 19:34 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).