From: Skip Tavakkolian <skip.tavakkolian@gmail.com>
To: erik quanstrom <quanstro@labs.coraid.com>
Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] compiler bug?
Date: Wed, 27 Nov 2013 11:24:37 -0800 [thread overview]
Message-ID: <CAJSxfm+xBnY1QdgsEH_yTXt1sxVHqn+_zXumOrpn=s-raJ+XkQ@mail.gmail.com> (raw)
In-Reply-To: <c4893c796bd98bd3f90a12b821cd70d8@coraid.com>
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
the Go to C switch got me :) (no breaks!); couldn't see why more than one
byte was getting the 'x' value! changing buf to "1234" made it more obvious.
On Wed, Nov 27, 2013 at 10:38 AM, erik quanstrom
<quanstro@labs.coraid.com>wrote:
> On Wed Nov 27 13:07:31 EST 2013, skip.tavakkolian@gmail.com wrote:
>
> > why is mips different (erik's version)?
> >
> > supermic% ./8.out
> > 78780000
> > mikro% ./v.out
> > 7878
> > rpi% ./5.out
> > 78780000
> >
>
> because it's big endian. what you're doing there is
> putting bytes in specific positions. in this case you have
> bytes (in hex):
>
> 0 0 78 78
>
> on a little endian machine this is 0x78780000 and on a
> big-endian machine this is 0x00007878.
>
> - erik
>
[-- Attachment #2: Type: text/html, Size: 1288 bytes --]
next prev parent reply other threads:[~2013-11-27 19:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 16:03 Steve Simon
2013-11-27 16:31 ` erik quanstrom
2013-11-27 18:07 ` Skip Tavakkolian
2013-11-27 18:38 ` erik quanstrom
2013-11-27 19:24 ` Skip Tavakkolian [this message]
2013-11-27 20:34 ` Bakul Shah
2013-11-27 21:18 ` erik quanstrom
2013-11-27 21:29 ` Charles Forsyth
2013-11-27 21:35 ` erik quanstrom
2013-11-27 21:42 ` Charles Forsyth
2013-11-27 20:41 ` Steve Simon
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='CAJSxfm+xBnY1QdgsEH_yTXt1sxVHqn+_zXumOrpn=s-raJ+XkQ@mail.gmail.com' \
--to=skip.tavakkolian@gmail.com \
--cc=9fans@9fans.net \
--cc=quanstro@labs.coraid.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 NNTP newsgroup(s).