All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@dsl2.external.hp.com>
To: jsoe0708@tiscali.be
Cc: "John David Anglin" <dave@hiauly1.hia.nrc.ca>,
	parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb
Date: Fri, 30 Aug 2002 00:30:51 -0600	[thread overview]
Message-ID: <20020830063051.D29D84829@dsl2.external.hp.com> (raw)
In-Reply-To: Message from jsoe0708@tiscali.be of "Fri, 30 Aug 2002 07:53:41 +0200." <3D3815BD0000958D@ocpmta5.be.tiscali.com>

jsoe0708@tiscali.be wrote:
> Ah ok but where is located the actual problem (gcc, ld, kernel ?).

the program.

> I am not a computer science engineer and have not enough knowledge
> to understand this problem of unalign access and unalign adress.
> Can you give me some source of information explaining that stuff?

Details for parisc:
	"PA-RISC 2.0 Architecture" by Jerry Kane.
	page 5-11, "Unaligned Data Reference Trap (28)"
	page 7-84, "Load Word"

heh...doesn't define "aligned address" in the Glossary.
The same stuff is in the PA 1.1 Arch books too.

"aligned" means the address of the data falls on a boundary
that is modulo the size of the data. It's more complicated
for a "struct" but the rule applies to any field in a struct.

Examples:
	0x10 is an aligned address for an "int"
	0x12 is an aligned address for a "short" but not an "int".

Got it?

BTW, even though x86 CPUs don't trap on unaligned access,
they do take a performance hit. IIRC, it's one additional cycle.
Under linux, most (all?) RISC CPUs trap and handle the unaligned access
in the kernel trap handler. Other OS's could SIGBUS the application
to kill it.

Hmm...this is interesting:
/usr/include/linux/prctl.h:# define PR_UNALIGN_SIGBUS   2       /* generate SIGBUS on unaligned user access */

Maybe you can figure out how to set this and dig through the
core file instead of trying to set break points.

grant

  reply	other threads:[~2002-08-30  6:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29  9:22 [parisc-linux] Back to evms-1.0.1 && unaligne access && gdb jsoe0708
2002-08-29  9:51 ` jsoe0708
2002-08-29 14:16   ` John David Anglin
2002-08-29 14:21   ` jsoe0708
2002-08-29 14:28     ` John David Anglin
2002-08-29 16:59       ` jsoe0708
2002-08-29 17:10         ` John David Anglin
2002-08-30  5:46           ` jsoe0708
2002-08-30 17:03             ` John David Anglin
2002-08-31 21:23               ` Joel Soete
2002-08-31 23:50                 ` Grant Grundler
2002-08-29 17:12         ` jsoe0708
2002-08-29 18:11           ` Grant Grundler
2002-08-30  5:53             ` jsoe0708
2002-08-30  6:30               ` Grant Grundler [this message]
2002-08-30  6:42                 ` jsoe0708
2002-08-29 12:42 ` Carlos O'Donell
2002-08-29 14:11 ` John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
2002-08-29 13:56 jsoe0708
2002-09-02  8:47 jsoe0708
2002-09-02 17:28 ` Grant Grundler

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=20020830063051.D29D84829@dsl2.external.hp.com \
    --to=grundler@dsl2.external.hp.com \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=jsoe0708@tiscali.be \
    --cc=parisc-linux@lists.parisc-linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.