From: fche@redhat.com (Frank Ch. Eigler)
To: Roland McGrath <roland@redhat.com>
Cc: Mike Mason <mmlnx@us.ibm.com>, systemtap@sources.redhat.com
Subject: Re: Problem with 32-bit negative return values
Date: Tue, 10 Oct 2006 20:25:00 -0000 [thread overview]
Message-ID: <y0mslhvvry5.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <20061010182831.CA3B7180066@magilla.sf.frob.com>
Roland McGrath <roland@redhat.com> writes:
> All loc2c-generated fetches use unsigned types of the target object
> size, i.e. uint32_t here. loc2c just fetches the bits. Your
> general expression code that uses the fetched value should cast
> appropriately for the signedness and size you want to calculate
> with.
D'oh. This bug probably affects every access to values of other than
native sizeof(long) bit size. The loc2c c_translate_fetch/store
functions assign to a given value name (e.g. THIS->__retvalue).
Instead it seems necessary to use a temporary value, fetch into that,
then emit the needed casting.
- FChE
next prev parent reply other threads:[~2006-10-10 20:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <452BD98F.8050602@us.ibm.com>
2006-10-10 17:52 ` Frank Ch. Eigler
2006-10-10 18:28 ` Roland McGrath
2006-10-10 20:25 ` Frank Ch. Eigler [this message]
2006-10-10 20:41 ` Mike Mason
2006-10-07 21:23 Mike Mason
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=y0mslhvvry5.fsf@ton.toronto.redhat.com \
--to=fche@redhat.com \
--cc=mmlnx@us.ibm.com \
--cc=roland@redhat.com \
--cc=systemtap@sources.redhat.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).