From: Richard Henderson <rth@cygnus.com>
To: egcs@cygnus.com
Subject: register variables vs asm?
Date: Thu, 09 Oct 1997 14:56:00 -0000 [thread overview]
Message-ID: <19971009120812.15403@dot.cygnus.com> (raw)
EGCS is not respecting the register assigned to the variable in the
appended example on Alpha. Unlike the previous nonsense with longjmp,
I should be able to expect this to work, yes?
I'll look at the problem soon, as this also completely screws the kernel.
r~
typedef struct _pthread_descr_struct * pthread_descr;
struct _pthread_descr_struct {
int p_cancelstate;
int p_canceltype;
int p_canceled;
};
static inline pthread_descr thread_self (void) __attribute__ ((const));
static inline pthread_descr thread_self (void)
{
register pthread_descr __self __asm__("$0");
__asm__ ("call_pal %1 # %0" : "=r"(__self) : "i"(158 ));
return __self;
}
int pthread_setcancelstate(int state, int * oldstate)
{
pthread_descr self = thread_self();
if (state < 0 || state > 5)
return 22 ;
if (oldstate != ((void *)0) ) *oldstate = self->p_cancelstate;
self->p_cancelstate = state;
if (self->p_canceled &&
self->p_cancelstate == 1 &&
self->p_canceltype == 2)
pthread_exit(((void *) -1) );
return 0;
}
next reply other threads:[~1997-10-09 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-09 14:56 Richard Henderson [this message]
1997-10-10 8:51 ` Richard Henderson
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=19971009120812.15403@dot.cygnus.com \
--to=rth@cygnus.com \
--cc=egcs@cygnus.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).