9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Cc: charles.forsyth@gmail.com
Subject: Re: [9fans] 6a bug
Date: Thu, 17 Nov 2011 11:07:40 -0500	[thread overview]
Message-ID: <CADSkJJU2s1r8Qi=F9eT=+i2mCatxB+c_70teMBkQ3ToOsazGDA@mail.gmail.com> (raw)
In-Reply-To: <ccbc861901e3a2d4cfd944c7bcb815aa@brasstown.quanstro.net>

On Wed, Nov 16, 2011 at 7:50 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> well my example is slightly booged then.  i just needed a label.
> the point still stands that 6l is not liking the *value*.  this actually
> comes from _start64v, and i wanted to simplify it.  if you replace
> the given value with $10, it 6l will not complain.

This is a detail of the x86-64 architecture.
An immediate in an arithmetic instruction must
fit in a signed 32-bit int, and this one does not.
You've written an impossible instruction, and the
linker is telling you in own cryptic way.
The assemblers do not know such details, never have.

You need to MOVQ that constant into a register
and then use the register as the argument to ADDQ.

Russ


  reply	other threads:[~2011-11-17 16:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 22:25 erik quanstrom
2011-11-16 22:35 ` Charles Forsyth
2011-11-16 22:36   ` Charles Forsyth
2011-11-16 22:50 ` Russ Cox
2011-11-16 23:27   ` Charles Forsyth
     [not found] ` <CAOw7k5hJz=F13tUpq7mU3gSnSWr7H=y4rKCN-OUO-FOavBGygA@mail.gmail.c>
2011-11-17  0:50   ` erik quanstrom
2011-11-17 16:07     ` Russ Cox [this message]
2011-11-17 16:13       ` Charles Forsyth
     [not found]     ` <CADSkJJU2s1r8Qi=F9eT=+i2mCatxB+c_70teMBkQ3ToOsazGDA@mail.gmail.c>
2011-11-17 16:15       ` erik quanstrom

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='CADSkJJU2s1r8Qi=F9eT=+i2mCatxB+c_70teMBkQ3ToOsazGDA@mail.gmail.com' \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    --cc=charles.forsyth@gmail.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).