public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Trouble with GAS halfword extraction on PPC
@ 1997-08-20 16:37 Peter Barada
  1997-08-20 16:37 ` [Q] Who should I talk to? Jeffrey A Law
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Barada @ 1997-08-20 16:37 UTC (permalink / raw)
  To: egcs

I'm using binutils-2.8/gas configures as follows:

# ./configure  --host=i586-linux-gnu --target=ppc-rtems-eabi --prefix=/usr/local/wave --exec-prefix=/usr/local/wave/ppc --program-prefix=ppc_ --with-gnu-as --with-gnu-ld --nfp --cache-file=../config.cache

And I'm trying to use a macro that concatenates a large number of
constants and then loads it into a register by using lis/ori pair to
get the halfword constants, or using shifts and mods (since gas does
not like & in macros!), but if I try:


        .text
	.align		4
	.extern  	boot_main
	.globl		_START, _boot


	.macro	LWI	reg, value
	lis	\reg, (\value)>>16
	ori	\reg, \reg, (\value)%0x10000
	.endm

	.macro	LWI2	reg, value
	lis	\reg, \value@h
	ori	\reg, \reg, \value@l
	.endm

	.equ	CONST_VALUE	(RAM1<<20)|(RAM2<<16)
_boot:

	addis	r3, 0, (CONST_VALUE)>>16
	ori	r3, CONST_VALUE%0x10000

	LWI	r4, CONST_VALUE
	LWI2	r5, CONST_VALUE
	b	$
	.end


When I pass this through gas, I get:

/tmp/boot2.s: Assembler messages:
/tmp/boot2.s:22: Error: unsupported relocation type
/tmp/boot2.s:23: Error: unsupported relocation type
/tmp/boot2.s:23: Error: unsupported relocation type
/tmp/boot2.s:25: Error: unsupported relocation type
/tmp/boot2.s:25: Error: unsupported relocation type
/tmp/boot2.s:25: Error: unsupported relocation type
/tmp/boot2.s:26: Error: unsupported relocation type
/tmp/boot2.s:26: Error: unsupported relocation type
/tmp/boot2.s:26: Error: unsupported relocation type

So does anyone have a clue how one does this as constants (Yes I know
I can stick it in memory and then load the value, but i'd rather waste
two insns to save the cache load).

THanx in advance,

- -- 
Peter Barada				pbarada@wavemark.com
Wizard					617-270-7098 x1226
WaveMark Technologies, Inc.		617-270-0193 (fax)

"Real men know that you should never attempt to accomplish with words
what you can do with a flame thrower" --Bruce Ferstein

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

* Re: [Q] Who should I talk to?
  1997-08-20 16:37 Trouble with GAS halfword extraction on PPC Peter Barada
@ 1997-08-20 16:37 ` Jeffrey A Law
  1997-08-20 16:37 ` f771 dies with trivial fortran code Jeffrey A Law
  1997-08-20 16:37 ` Trouble with GAS halfword extraction on PPC Jeffrey A Law
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1997-08-20 16:37 UTC (permalink / raw)
  To: egcs

  In message <Pine.GSO.3.96.970820021136.23730B-100000@rigel.oac.uci.edu>you wr
ite:
  >   I have a question regarding the code generation of gcc 
  >   for i386+ targets.  Is this mailing list the right place
  >   to ask someone to consider changing a minor aspect of
  >   gcc's code generation?
Yes, absolutely.


  >   also:  What is the "haifa" instruction scheduler?  
It is a new instruction scheduler donated by IBM Haifa.

http://www.cygnus.com/egcs

[ ... ]
  > Note to the uninitiated -- haifa-sched.c is a new instruction scheduler
  > donated by IBM Haifa. It is supposed to be able to improve instruction
  > schedules for superscaler machines. It is included in the egcs snapshot
  > in the hopes that someone will work on some of the issues outlined below.
[ ... ]

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

* Re: f771 dies with trivial fortran code
  1997-08-20 16:37 Trouble with GAS halfword extraction on PPC Peter Barada
  1997-08-20 16:37 ` [Q] Who should I talk to? Jeffrey A Law
@ 1997-08-20 16:37 ` Jeffrey A Law
  1997-08-20 16:37 ` Trouble with GAS halfword extraction on PPC Jeffrey A Law
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1997-08-20 16:37 UTC (permalink / raw)
  To: egcs

  In message <199708200523.AAA02390@mercury.xraylith.wisc.edu>you write:
  > f771 dumps core on i386-linux-gnulibc1 when compiling the following simple
  > piece of code. Ditto for a cross-compiled i386-cygwin32-g77.
  > 
  > could someone please check on other platforms just so I know that it's not
  > a local problem?
It's the same basic problem I sent mail about, except it showed up
in su2cor from spec92.

Jeff

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

* Re: Trouble with GAS halfword extraction on PPC
  1997-08-20 16:37 Trouble with GAS halfword extraction on PPC Peter Barada
  1997-08-20 16:37 ` [Q] Who should I talk to? Jeffrey A Law
  1997-08-20 16:37 ` f771 dies with trivial fortran code Jeffrey A Law
@ 1997-08-20 16:37 ` Jeffrey A Law
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1997-08-20 16:37 UTC (permalink / raw)
  To: egcs

  In message <199708201602.MAA02660@miacomet.wavemark.com>you write:
  > So does anyone have a clue how one does this as constants (Yes I know
  > I can stick it in memory and then load the value, but i'd rather waste
  > two insns to save the cache load).
I believe this is happening because the assembler doesn't know the
value for RAM1 or RAM2.

Jeff

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

* [Q] Who should I talk to?
@ 1997-08-20  6:35 John Beppu
  0 siblings, 0 replies; 5+ messages in thread
From: John Beppu @ 1997-08-20  6:35 UTC (permalink / raw)
  To: egcs

  Forgive my newbie-ness.

  I have a question regarding the code generation of gcc 
  for i386+ targets.  Is this mailing list the right place
  to ask someone to consider changing a minor aspect of
  gcc's code generation?  (Maybe pgcc has already dealt
  with the problem I have in mind, but I haven't tried
  pgcc, yet).

  also:  What is the "haifa" instruction scheduler?  

  beppu@uci.edu .............................................................

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

end of thread, other threads:[~1997-08-20 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-20 16:37 Trouble with GAS halfword extraction on PPC Peter Barada
1997-08-20 16:37 ` [Q] Who should I talk to? Jeffrey A Law
1997-08-20 16:37 ` f771 dies with trivial fortran code Jeffrey A Law
1997-08-20 16:37 ` Trouble with GAS halfword extraction on PPC Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1997-08-20  6:35 [Q] Who should I talk to? John Beppu

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 read-only IMAP folder(s) and NNTP newsgroup(s).