Re: Segment registers support for i386

2006-06-01 Thread Rémy Saissy
Remy Saissy wrote: I've looked for a target specific callback to modify but I've found nothing, even in the gcc internals info pages. Do you mean I would have to modify some code outside of the i386 directory ? Or maybe to add such a callback if it doesn't exist ;) You'ld have to modify code i

Re: Segment registers support for i386

2006-05-31 Thread Ross Ridge
Remy Saissy wrote: >I've looked for a target specific callback to modify but I've found >nothing, even in the gcc internals info pages. Do you mean I would >have to modify some code outside of the i386 directory ? Or maybe to >add such a callback if it doesn't exist ;) You'ld have to modify code i

Re: Segment registers support for i386

2006-05-29 Thread Rémy Saissy
Ross Ridge wrote: Remy Saissy wrote: What I understand is that there is two kind of managment for attribute : Attributes are handled in various different ways depending on what the attribute does. To handle your case correctly, you'ld have to change how the tree to RTL conversion generates

Re: Segment registers support for i386

2006-05-29 Thread Ross Ridge
Remy Saissy wrote: >if I understand well, to make gcc generating rtx according to an >__attribute__((far("fs"))) on a pointer I only have to add or modify >rtx in the i386.md file and add an UNSPEC among the constants ? No, the work you need to on the backend, adding an UNSPEC constant to "i386.md

Re: Segment registers support for i386

2006-05-28 Thread Rémy Saissy
Ross Ridge wrote: You won't be able to. You're going to need to write your own code that, during the conversion of the tree to RTL, creates RTL expressions which indicate that the memory references use segment registers. This probably won't be easy since there are a lot of contexts w

Re: Segment registers support for i386

2006-05-25 Thread Rémy Saissy
You won't be able to. You're going to need to write your own code that, during the conversion of the tree to RTL, creates RTL expressions which indicate that the memory references use segment registers. This probably won't be easy since there are a lot of contexts where your "far" pointer can be

Re: Segment registers support for i386

2006-05-21 Thread Ross Ridge
Remy Saissy wrote: >I don't really understand how to access the attribute set up in the >tree in the rtx struct. You won't be able to. You're going to need to write your own code that, during the conversion of the tree to RTL, creates RTL expressions which indicate that the memory references use

Re: Segment registers support for i386

2006-05-21 Thread Rémy Saissy
Hi people, I added an attribute "far" for the i386, this attribute takes one argument, the segment register. This attribute is intended to be use with pointers. There is something I'm not sure about Once the attribute handler has returned NULL_TREE without setting no_add_attr to true, the atribute

Re: Segment registers support for i386

2006-05-17 Thread Rask Ingemann Lambertsen
On Mon, May 15, 2006 at 12:09:00AM +0800, Rémy Saissy wrote: > To manage the manipulation of the register class, I added entries in > the i386.md file. > > ;; get a value from a segment register. > (define_insn "store_seg" > [(set (match_operand:SI 0 "nonimmediate_operand" "") >(match_o

Re: Segment registers support for i386

2006-05-14 Thread Rémy Saissy
On 5/15/06, Rask Ingemann Lambertsen <[EMAIL PROTECTED]> wrote: On Mon, May 15, 2006 at 12:09:00AM +0800, Rémy Saissy wrote: > To manage the manipulation of the register class, I added entries in > the i386.md file. > > ;; get a value from a segment register. > (define_insn "store_seg" > [(set (

Re: Segment registers support for i386

2006-05-14 Thread Rask Ingemann Lambertsen
On Mon, May 15, 2006 at 12:09:00AM +0800, Rémy Saissy wrote: > To manage the manipulation of the register class, I added entries in > the i386.md file. > > ;; get a value from a segment register. > (define_insn "store_seg" > [(set (match_operand:SI 0 "nonimmediate_operand" "") >(match_ope

Re: Segment registers support for i386

2006-05-14 Thread Rémy Saissy
Hi everybody, I decided to split the modification in two parts: - add an __asm__ () statement to control the value of the segment registers from an high level language; This __asm__ () statement is then used as follow: register short a __asm__ ("es"); int main(int argc, char **argv)

Re: Segment registers support for i386

2006-04-04 Thread Rémy Saissy
On 4/4/06, Andrew Haley <[EMAIL PROTECTED]> wrote: > Rémy Saissy writes: > > > > It would take a massive target-specific backend hack to make that > > > happen, as GCC > currently only supports flat address spaces. ;-) > > > > I don't understand why. > > gcc currently consider every data acces

Re: Segment registers support for i386

2006-04-04 Thread Andrew Haley
Rémy Saissy writes: > > It would take a massive target-specific backend hack to make that > > happen, as GCC > currently only supports flat address spaces. ;-) > > I don't understand why. > gcc currently consider every data access on i386 to be %ds:offset or > %ss:offset > depending on th

Re: Segment registers support for i386

2006-04-04 Thread Rémy Saissy
> It would take a massive target-specific backend hack to make that happen, as > GCC > currently only supports flat address spaces. ;-) I don't understand why. gcc currently consider every data access on i386 to be %ds:offset or %ss:offset depending on the instruction. The purpose is only to add

Re: Segment registers support for i386

2006-03-31 Thread Lucas (a.k.a T-Bird or bsdfan3)
It would take a massive target-specific backend hack to make that happen, as GCC currently only supports flat address spaces. ;-) Rémy Saissy wrote: Hi everybody, I'm looking for gcc support of x86-32 segment registers but the only information I've found about it is in this old thread: http://

Segment registers support for i386

2006-03-30 Thread Rémy Saissy
Hi everybody, I'm looking for gcc support of x86-32 segment registers but the only information I've found about it is in this old thread: http://gcc.gnu.org/ml/gcc/1999-12/msg00526.html I was wondering what happened since this thread, does somebody have integrated the segment register support for i