public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jim Hull" <jim.hull@hp.com>
To: linux-ia64@vger.kernel.org
Subject: RE: load-store emulation with SIGSEGV
Date: Fri, 17 Oct 2003 18:16:41 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106641454931514@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106634457403703@msgid-missing>

Matt Chapman wrote:

> Yep, I do similar things in a virtual machine that I wrote.  
> Here are some notes in case you've overlooked some of the finer
details 
> (and perhaps I've overlooked some of the finer details as well :)).
> 
> Incrementing the IP:
> sc->sc_ip += ((sc->sc_ip & 0xf) = 2) ? 0xe : 1;

I think there's one scenario where this won't work.  If it's possible
for your signal handler to be invoked in cases where the instruction
you're trying to skip over is a two-slot "L+X" instruction from an MLX
bundle (e.g., movl or brl), then the "slot" bits of sc_ip will be 1,
you'll increment them to 2, and when you return to slot 2 of the MLX
bundle you'll immediately take an Illegal Instruction fault.

Probably most "skip an instruction" signal handlers don't need to worry
about this case, because they'll always be pointing at an ordinary
single-slot instruction, but it's something to be aware of.

 -- Jim Hull
    HP Itanium Processor Architect


  parent reply	other threads:[~2003-10-17 18:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-16 22:49 load-store emulation with SIGSEGV R. Lake
2003-10-16 22:49 ` R. Lake
2003-10-16 22:49 ` R. Lake
2003-10-16 22:51 ` R. Lake
2003-10-16 22:51 ` R. Lake
2003-10-16 23:57 ` David Mosberger
2003-10-17  8:13 ` R. Lake
2003-10-17 15:11 ` Matt Chapman
2003-10-17 18:16 ` Jim Hull [this message]
2003-10-17 18:54 ` David Mosberger

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=marc-linux-ia64-106641454931514@msgid-missing \
    --to=jim.hull@hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /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