This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: additions to the machine-definition language

Alexandre Oliva <> writes:

  > On May  7, 2001, Dan Nicolaescu <dann@godzilla.ICS.UCI.EDU> wrote:
  > > The implemented features are: 
  > > (define-register "REGNAME")
  > > (define-register-class (REGISTER_LIST))
  > > (define-pic-offset-table-reg "REGNAME")
  > > (define-arg-pointer-reg "REGNAME")
  > > (define-frame-pointer-reg "REGNAME")
  > > (define-fixed-registers "REGNAME")
  > > (define-call-used-registers "REGNAME")
  > > (define-reg-alloc-order REGISTER_LIST OR REG_CLASS_LIST)
  > > (define-leaf-reg-alloc-order REGISTER_LIST OR REG_CLASS_LIST)
  > Most of these can already be defined with define_constants, but
  > you

Those are:

(define-pic-offset-table-reg "REGNAME")
(define-arg-pointer-reg "REGNAME")
(define-frame-pointer-reg "REGNAME")

and I implemented them just because it took 5 minutes to do it....
They are the most uninteresting ones from the bunch. 

  > don't always want to do it.  Think, for example, of a multi-ISA
  > back-end that uses a different frame-pointer register for each ISA.
  > You'd have to express a conditional in the define.  Not that this is
  > too hard to do, but it's probably more cumbersome, and negates part of
  > the benefit of moving the definitions to the md file.

Something like: 

(define-frame-pointer-reg (cond ("ISA1" reg1)
                                ("ISA2" reg2)
                                ("ISA3" reg15)))

Is it that cumbersome? IMHO not really. 

One advantage of having this in the .md file is that sanity checks
could be implemented easily..

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]