public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: Mark Klein <mklein@dis.com>
Cc: gcc@gcc.gnu.org
Subject: Re: MPE Port
Date: Mon, 25 Oct 1999 22:41:00 -0000	[thread overview]
Message-ID: <14653.940915805@upchuck> (raw)
In-Reply-To: <4.1.19990907082210.00c21980@garfield.dis.com>

  In message <4.1.19990907082210.00c21980@garfield.dis.com>you write:
  > In message <4.1.19990906102304.00c72c80@garfield.dis.com>you write:
  > 
  > >> + #undef CPP_PREDEFINES
  > >> + #define CPP_PREDEFINES "-Dhppa -Dhp3000s900 -D__hp3000s900 -Dhp3k9
  > >> -Dmpeix -Dhp3000 -DREVARGV -Asystem(mpeix) -Acpu(hppa) -Amachine(hppa)"
  > 
  > >You should move the -D definitions into a CPP_SPEC string to avoid ANSI
  > >namespace pollution.
  > 
  > Hmmm. I just lifted the HP-UX code and change hp9000s800 to hp3000s900.
  > I'll change it as you suggest.
Thanks.  It would be nice to convert all the old stuff so that people don't
think what those older ports do is actually right ;-)  Time time time.


  > If you mean "does MPE allow the ability to execute code in the data stack?"
  > then, no. When I did the Java JIT for MPE for HP this was a major stumbling
  > area as MPE requires code to be in code pages, not data pages. The stack
  > area are all marked as data pages. I had to write some exotic kernel stuff
  > to create a code page that still got mapped into SR5 space to make the JIT
  > work. I suppose I can use the same techniques here. (I'll worry about that
  > when I get to the gdb port).
So, how does dynamic linking work on MPE?

I believe gdb has some capabilities to build inferior function call
stubs/trampolines in the text space, but it's fragile -- it depends on being
able to find enough space before/after the program to write it's little
stub/trampoline in the text segment.  If you don't have space, then you lose.
I also believe it is the case that few popular systems need this capability
so the code in gdb may have bitrotted.

It sounds like you're going to have to provide a stub of some kind for gdb's
use in inferior calls.  The structure is going to be radically different from
__gcc_plt_call, but the mechanism you use to get it bound into the executable
should probably mirror __gcc_plt_call.


  > 
  > >  > + #undef  ASM_DECLARE_FUNCTION_NAME
  > >  > + #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
  > [snip]
  > >If the only difference is that you need a PRIV_LEV=3 on a static function,
  >  I
  > >see no reason we can't promote that into som.h.  I believe that would
  > >eliminate the need for a separate ASM_DECLARE_FUNCTION_NAME, right?
  > 
  > I would prefer this route too. BTW - you mean pa.h, don't you? :-)
Me too.  Let's just tack on the PRIV_LEV=3 into som.h (yes, things moved :-)
I'll go ahead and do that now ;-)  So you can zap the ASM_DECLARE_FUNCTION_NAME
stuff from your changes.



jeff


WARNING: multiple messages have this Message-ID
From: Jeffrey A Law <law@cygnus.com>
To: Mark Klein <mklein@dis.com>
Cc: gcc@gcc.gnu.org
Subject: Re: MPE Port
Date: Sun, 31 Oct 1999 23:35:00 -0000	[thread overview]
Message-ID: <14653.940915805@upchuck> (raw)
Message-ID: <19991031233500.VfG6w1mOUlGarRARCOmTTu2MtiRCANWgaTEWV_lgwkI@z> (raw)
In-Reply-To: <4.1.19990907082210.00c21980@garfield.dis.com>

  In message <4.1.19990907082210.00c21980@garfield.dis.com>you write:
  > In message <4.1.19990906102304.00c72c80@garfield.dis.com>you write:
  > 
  > >> + #undef CPP_PREDEFINES
  > >> + #define CPP_PREDEFINES "-Dhppa -Dhp3000s900 -D__hp3000s900 -Dhp3k9
  > >> -Dmpeix -Dhp3000 -DREVARGV -Asystem(mpeix) -Acpu(hppa) -Amachine(hppa)"
  > 
  > >You should move the -D definitions into a CPP_SPEC string to avoid ANSI
  > >namespace pollution.
  > 
  > Hmmm. I just lifted the HP-UX code and change hp9000s800 to hp3000s900.
  > I'll change it as you suggest.
Thanks.  It would be nice to convert all the old stuff so that people don't
think what those older ports do is actually right ;-)  Time time time.


  > If you mean "does MPE allow the ability to execute code in the data stack?"
  > then, no. When I did the Java JIT for MPE for HP this was a major stumbling
  > area as MPE requires code to be in code pages, not data pages. The stack
  > area are all marked as data pages. I had to write some exotic kernel stuff
  > to create a code page that still got mapped into SR5 space to make the JIT
  > work. I suppose I can use the same techniques here. (I'll worry about that
  > when I get to the gdb port).
So, how does dynamic linking work on MPE?

I believe gdb has some capabilities to build inferior function call
stubs/trampolines in the text space, but it's fragile -- it depends on being
able to find enough space before/after the program to write it's little
stub/trampoline in the text segment.  If you don't have space, then you lose.
I also believe it is the case that few popular systems need this capability
so the code in gdb may have bitrotted.

It sounds like you're going to have to provide a stub of some kind for gdb's
use in inferior calls.  The structure is going to be radically different from
__gcc_plt_call, but the mechanism you use to get it bound into the executable
should probably mirror __gcc_plt_call.


  > 
  > >  > + #undef  ASM_DECLARE_FUNCTION_NAME
  > >  > + #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
  > [snip]
  > >If the only difference is that you need a PRIV_LEV=3 on a static function,
  >  I
  > >see no reason we can't promote that into som.h.  I believe that would
  > >eliminate the need for a separate ASM_DECLARE_FUNCTION_NAME, right?
  > 
  > I would prefer this route too. BTW - you mean pa.h, don't you? :-)
Me too.  Let's just tack on the PRIV_LEV=3 into som.h (yes, things moved :-)
I'll go ahead and do that now ;-)  So you can zap the ASM_DECLARE_FUNCTION_NAME
stuff from your changes.



jeff


  parent reply	other threads:[~1999-10-25 22:41 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-07  8:42 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-10-25 22:41 ` Jeffrey A Law [this message]
1999-10-26  7:03   ` Mark Klein
1999-10-26 19:12     ` Jeffrey A Law
1999-10-26 19:52       ` Mark Klein
1999-10-31 23:35         ` Mark Klein
1999-10-31 23:35       ` Jeffrey A Law
1999-10-31 23:35     ` Mark Klein
1999-10-31 23:35   ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1999-09-06 10:40 Mark Klein
1999-09-08  1:41 ` Jeffrey A Law
1999-09-08  6:37   ` Mark Klein
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08  1:39 ` Jeffrey A Law
1999-09-08  6:35   ` Mark Klein
1999-09-15  2:52     ` Jeffrey A Law
1999-09-15  8:26       ` Mark Klein
1999-09-30 18:02         ` Mark Klein
1999-09-30 18:02       ` Jeffrey A Law
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-10-25 22:32 ` Jeffrey A Law
1999-10-26  6:51   ` Mark Klein
1999-10-26 19:05     ` Jeffrey A Law
1999-10-26 19:21       ` Mark Klein
1999-10-31 23:35         ` Mark Klein
1999-10-31 23:35       ` Jeffrey A Law
1999-10-31 23:35     ` Mark Klein
1999-10-31 23:35   ` Jeffrey A Law
1999-09-06 10:40 Mark Klein
1999-09-07  2:38 ` Jeffrey A Law
1999-09-07  6:39   ` Mark Klein
1999-09-08  0:45     ` Jeffrey A Law
1999-09-08 20:04       ` Mark Klein
1999-09-15  2:47         ` Jeffrey A Law
1999-09-15  8:32           ` Mark Klein
1999-09-30 18:02             ` Mark Klein
1999-09-30 18:02           ` Jeffrey A Law
1999-10-09 20:18           ` Mark Klein
1999-10-14  4:03             ` Jeffrey A Law
1999-10-14  7:20               ` Mark Klein
1999-10-14 10:45                 ` Jeffrey A Law
1999-10-14 11:05                   ` Mark Klein
1999-10-31 23:35                     ` Mark Klein
1999-10-31 23:35                   ` Jeffrey A Law
1999-10-31 23:35                 ` Mark Klein
1999-10-31 23:35               ` Jeffrey A Law
1999-10-31 23:35             ` Mark Klein
1999-11-08 19:34           ` Mark Klein
1999-11-08 19:54             ` Jeffrey A Law
1999-11-09  6:52               ` Mark Klein
1999-11-30 23:37                 ` Mark Klein
1999-11-30 23:37               ` Jeffrey A Law
1999-11-30 23:37             ` Mark Klein
1999-09-30 18:02         ` Mark Klein
1999-09-30 18:02       ` Jeffrey A Law
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08  1:40 ` Jeffrey A Law
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08  1:49 ` Jeffrey A Law
1999-09-08 20:31   ` Mark Klein
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-07  3:20 ` Jeffrey A Law
1999-09-07  6:46   ` Mark Klein
1999-09-08  0:43     ` Jeffrey A Law
1999-09-30 18:02       ` Jeffrey A Law
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-08-27 17:20 HARD_REGNO_MODE_OK on PA-RISC (revisited) Mark Klein
1999-08-29  3:19 ` Jeffrey A Law
1999-09-06 10:39   ` MPE Port Mark Klein
1999-09-30 18:02     ` Mark Klein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14653.940915805@upchuck \
    --to=law@cygnus.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mklein@dis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).