mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: "root@chaos.analogic.com" <root@chaos.analogic.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Wanted: A decent assembler
Date: Wed, 23 Apr 2003 09:02:08 -0400	[thread overview]
Message-ID: <200304230906_MC3-1-35A3-DF4@compuserve.com> (raw)

"Richard B. Johnson" wrote"


>>   Output from 'make bzImage' after making some changes:
>>
>>         Error: non-constant expression in ".if" statement.
>>
>>
>>   Why is the kernel using a 1-pass assembler?
>>
>
> Well it isn't. The AT&T clone assembler will resolve forward
> references and it does it by using as many passes as necessary.
> It even has a 'reasonable' MACRO capability. I use it quite a
> bit to minimize the code-size or to maximize performance in
> embedded systems.


  This is from the info for GNU as:


   "The result of an expression must be an absolute number, or else an
offset into a particular section.  If an expression is not absolute,
and there is not enough information when `as' sees the expression to
know its section, a second pass over the source program might be
necessary to interpret the expression--but the second pass is currently
not implemented.  `as' aborts with an error message in this situation."


> Your error shown above is a real error. If you expose the code
> that it barfed on, maybe somebody could help you fix the code.

if NR_IRQS gt 16			# only build this for IO-APIC
	.align 8,0x90			# make ENTRY have exact address
irq_align=8				# start with 8-byte alignment
ENTRY(high_irq_entries_start)
rept NR_IRQS-16			# the rest of the stubs
	.align irq_align,0x90
1:	pushl $vector-256		# 5-byte instruction
	jmp common_interrupt		# 2 or 5 bytes (8 or 32-bit offset)
2:
if 2b-1b > 8			# <============================= ERROR
	irq_align=16			# switch to 16-byte alignment
endif
data
	.long 1b
text
vector=vector+1
endr
endif


-------
 Chuck

             reply	other threads:[~2003-04-23 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 13:02 Chuck Ebbert [this message]
2003-04-23 13:57 ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2003-04-23 13:49 Chuck Ebbert
2003-04-23 14:24 ` Richard B. Johnson
2003-04-23 10:59 Chuck Ebbert
2003-04-23 11:11 ` Richard B. Johnson

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=200304230906_MC3-1-35A3-DF4@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.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

all inboxes | Powered by JetHome®