Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: pedro@codesourcery.com
Cc: gdb-patches@sourceware.org
Subject: Re: Fix Ericsson DICOS inferior function calls
Date: Mon, 07 Jul 2008 22:59:00 -0000	[thread overview]
Message-ID: <200807072256.m67MuLP2010832@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <200807072309.56077.pedro@codesourcery.com> (message from Pedro 	Alves on Mon, 7 Jul 2008 23:09:55 +0100)

> From: Pedro Alves <pedro@codesourcery.com>
> Date: Mon, 7 Jul 2008 23:09:55 +0100
> 
> Hi,
> 
> This patch fixes inferior function calls on DICOS, by putting
> the call dummy breakpoint location on the stack.  The comments
> in the patch describe why.
> 
> Daniel approved this offline, so I checked it in.

Hmm, the reason for providing frame_align() is pretty bogus;
instruction alignment has little or nothing to do with stack
alignment.  It's just that most RISC ISAs require strict memory
alignment at something that happens to be a multiple of the
instruction size.

I'm also not sure the frame_align() you wrote does what you think it
does.  IIRC, on i386, you'll actually need to align on an odd 8-byte
border to get the performance benefit you mention;
i386_push_dummy_call() should take care of that (but may currently not
do that in all cases).

I think we should get rid of generic_push_dummy_code(), and instead
require that each target that puts the dummy breakpoint on the stack
provides its own push_dummy_code() function.  Could you provide one
for DICOS?

> 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
> 
> 	* i386-dicos-tdep.c: Include "inferior.h".
> 	(i386_dicos_frame_align): New.
> 	(i386_dicos_init_abi): Register i386_dicos_frame_align.  Set call
> 	dummy location ON_STACK.
> 	* Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).


  reply	other threads:[~2008-07-07 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 22:10 Pedro Alves
2008-07-07 22:59 ` Mark Kettenis [this message]
2008-07-07 23:36   ` Pedro Alves
2008-07-09 15:48   ` Pedro Alves
2008-07-14 15:10     ` Mark Kettenis
2008-07-14 18:09       ` Pedro Alves

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=200807072256.m67MuLP2010832@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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