mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Wanted: A decent assembler
@ 2003-04-23 13:49 Chuck Ebbert
  2003-04-23 14:24 ` Richard B. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Ebbert @ 2003-04-23 13:49 UTC (permalink / raw)
  To: linux-kernel


Chuck Ebbert wrote:

> <mangled asm source>

 Should be:


.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				# offset changed to 32-bit
	irq_align=16			# switch to 16-byte alignment
.endif
.data
	.long 1b
.text
vector=vector+1
.endr
.endif


-------
 Chuck

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Wanted: A decent assembler
@ 2003-04-23 13:02 Chuck Ebbert
  2003-04-23 13:57 ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Ebbert @ 2003-04-23 13:02 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

"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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Wanted: A decent assembler
@ 2003-04-23 10:59 Chuck Ebbert
  2003-04-23 11:11 ` Richard B. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Ebbert @ 2003-04-23 10:59 UTC (permalink / raw)
  To: linux-kernel


  Output from 'make bzImage' after making some changes:

        Error: non-constant expression in ".if" statement.


  Why is the kernel using a 1-pass assembler?





------
 Chuck

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-04-23 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 13:49 Wanted: A decent assembler Chuck Ebbert
2003-04-23 14:24 ` Richard B. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2003-04-23 13:02 Chuck Ebbert
2003-04-23 13:57 ` Maciej W. Rozycki
2003-04-23 10:59 Chuck Ebbert
2003-04-23 11:11 ` Richard B. Johnson

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®