From: "\"Nils O. Selåsdal\"" <noselasd@asgaard.homelinux.org>
To: 9fans@cse.psu.edu
Subject: [9fans] 8c dying with out of fixed registers
Date: Fri, 6 May 2005 21:59:46 +0200 [thread overview]
Message-ID: <427BCCB2.8000607@asgaard.homelinux.org> (raw)
Hello,
I've been trying to compile some crypto code, and it seems 8c
isn't always too happy about it. I eventually got the monster ting
reduced to the below (now very-nonsense code) snippet which dies with;
a.c:22 out of fixed registers
8c 2655: suicide: sys: trap: fault read addr=0x0 pc=0x00036d93
So, for anyone that's bored, and wants to fix the compiler:
#include <u.h>
static uvlong T7[256];
void f(unsigned char *key)
{
uvlong K1;
int r;
uvlong *S = T7;
for (r = 1; r < 16; r++) {
K1 =
T7[S[(int)(K1 >> 56) ] & 0xff] ^
T7[(int)S[(int)(K1 >> 48) & 0xff] & 0xff] ^
T7[(int)S[(int)(K1 >> 40) & 0xff] & 0xff] ^
T7[(int)S[(int)(K1 >> 32) & 0xff] & 0xff] ^
T7[(int)S[(int)(K1 >> 24) & 0xff] & 0xff] ^
T7[(int)S[(int)(K1 >> 16) & 0xff] & 0xff] ^
T7[(int)S[(int)(K1 >> 8) & 0xff] & 0xff] ^
T7[(int)S[(int)(K1 ) & 0xff] & 0xff];
}
}
In the mean time, I'll rewrite the piece of code...
--
Nils O. Selåsdal
next reply other threads:[~2005-05-06 19:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 19:59 "Nils O. Selåsdal" [this message]
[not found] <85082ec2f1cbf83a5db6ecf7ff111f3b@plan9.ucalgary.ca>
2005-05-06 20:34 ` "Nils O. Selåsdal"
2005-05-06 21:00 ` andrey mirtchovski
2005-05-06 21:08 ` andrey mirtchovski
[not found] <a27dc8e08d6f5936960797156b50a514@plan9.ucalgary.ca>
2005-05-06 21:17 ` "Nils O. Selåsdal"
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=427BCCB2.8000607@asgaard.homelinux.org \
--to=noselasd@asgaard.homelinux.org \
--cc=9fans@cse.psu.edu \
/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 NNTP newsgroup(s).