Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Frank Palmieri" <frank@interscopetech.com>
To: <axp-list@redhat.com>
Subject: Re: Unaligned accesses
Date: Thu, 26 Jul 2001 14:45:39 -0400	[thread overview]
Message-ID: <319101c11603$2c071860$8119fea9@fs1.internal.interscopetech.net> (raw)
In-Reply-To: 3B6051A5.2643B4F@iplink.net

Alvin:

There was a uac utility with Digital Unix that could control how unaligned
accesses were handled.  Here's a little program that spawns a shell with the
fixup's disabled.  When you run your program it will halt instead of doing
the fixups and you can then eliminate them.  Note this can be "tedious" and
some programs such as emacs spew out unaligned accesses so be careful what
you run.  Note also this code is old and I haven't used it in a while so it
may need a bit of rework but gives a place to start.

Frank

--------------------------------------------------

#include <asm/sysinfo.h>
#include <asm/unistd.h>

static int setsysinfo( unsigned long op, void *buffer, unsigned long size,
int *
start, void *arg, unsigned long flag )
{
  syscall( __NR_osf_setsysinfo, op, buffer, size, start, arg, flag );
}

void trap_unaligned(void)
{
  unsigned int buf[2];
  buf[0] = SSIN_UACPROC;
  buf[1] = UAC_SIGBUS | UAC_NOPRINT;
  setsysinfo( SSI_NVPAIRS, buf, 1, 0, 0, 0 );
}

int main( int ac )
{
  trap_unaligned();
  printf("Creating a subshell with SIGBUS setting!\n" );
  execl("/bin/bash", "/bin/bash", (char *)0);
  return(0);
}





  reply	other threads:[~2001-07-26 18:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-25  0:02 Archives on www.lib.uaa.alaska.edu Mike Tibor
2001-07-25  0:04 ` James Fowler
2001-07-25  1:41   ` Larry Snyder
2001-07-25 20:28   ` Mike Tibor
2001-07-25  0:57 ` Unaligned accesses alvin
2001-07-25 15:47   ` Jay Estabrook
2001-07-25 20:41     ` alvin
2001-07-25 21:08       ` Christopher C. Chimelis
2001-07-25 21:15       ` Michal Jaegermann
2001-07-26 12:39         ` Ivan Kokshaysky
2001-07-26 12:40       ` Ivan Kokshaysky
2001-07-26 13:29       ` Jay Estabrook
2001-07-26 17:21         ` alvin
2001-07-26 18:45           ` Frank Palmieri [this message]
2001-07-27  2:17           ` 164SX memory Eric Brown
2001-07-27  4:48             ` kirk uriksun
2001-07-27  5:18             ` Maurice Hilarius
2001-08-06  9:59               ` Iso-H
2001-08-06 12:33                 ` Rich Payne
2001-08-06 12:52                   ` Iso-H
  -- strict thread matches above, loose matches on Subject: below --
2001-07-25 11:56 Unaligned accesses Rick Gorton
1998-07-05  0:54 B. James Phillippe
1997-09-23  9:39 Sheer Panic
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox