linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RS6000 to G4 assembly changes
@ 2000-01-21 18:40 Robert Neugebauer
  2000-01-21 19:08 ` David Edelsohn
  2000-01-22 11:16 ` Giuliano Pochini
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Neugebauer @ 2000-01-21 18:40 UTC (permalink / raw)
  To: linuxppc-dev


I am trying to compile a compiler used by my university for my linuxppc
machine. The compiler supports various architecture including rs6000 and i
386 linux.

By my limited understanding, rs6000 assembler is very similar to powerpc
assembler, they are both RISC computers. Anyway, in attempting to compile
this, gcc complains about an unrecognized opcode movl. This is the only
opcode that it has complained about so far.

If anyone knows what this should be changed to, that would be very much
appreciated. Also if anyone can think of any other issues that might
arrise, I would appreciate that as well.

Bob Neugebauer


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-21 18:40 RS6000 to G4 assembly changes Robert Neugebauer
@ 2000-01-21 19:08 ` David Edelsohn
  2000-01-21 22:53   ` Robert Neugebauer
  2000-01-22 11:16 ` Giuliano Pochini
  1 sibling, 1 reply; 10+ messages in thread
From: David Edelsohn @ 2000-01-21 19:08 UTC (permalink / raw)
  To: Robert Neugebauer; +Cc: linuxppc-dev


	"movl" is an x86 mnemonic.  "rs6000" is the same as "powerpc" as
far as GCC configurations are concerned, for the most part.  RISC
arcihtecture is a generic computer architecture term that does not provide
any assistance in compatibility.  Other than that, I cannot understand
what you are trying to accomplish.

	Are you trying to build a cross compiler?  From linuxppc to x86
linux?  From x86 linux to linuxppc?  From either of those to RS/6000 AIX?
It does not sound like you have the cross-toolchain properly configured
and/or you are not following the proper sequence to build a
cross-toolchain and/or you have some old configuration/build files laying
around when trying to build a new toolchain.

David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-21 19:08 ` David Edelsohn
@ 2000-01-21 22:53   ` Robert Neugebauer
  2000-01-22  0:16     ` David Edelsohn
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Neugebauer @ 2000-01-21 22:53 UTC (permalink / raw)
  To: linuxppc-dev


I am sorry my initial post was not clear. There is compiler that is used
for one of my courses at university. The compiler itself only has build
rules for i386 linux, rs6000 aix, and some other unixes. Anyway I am
trying to build this compiler for my linuxppc machine. Since rs6000 is
another ppc based architecture, I tried building using that target, and
that is where I got the movl error. Apparently movl is a valid instruction
for the rs6000. I am curious what I need to change it too.

I hope this clarifies things.

Bob

On Fri, 21 Jan 2000, David Edelsohn wrote:

>
> 	"movl" is an x86 mnemonic.  "rs6000" is the same as "powerpc" as
> far as GCC configurations are concerned, for the most part.  RISC
> arcihtecture is a generic computer architecture term that does not provide
> any assistance in compatibility.  Other than that, I cannot understand
> what you are trying to accomplish.
>
> 	Are you trying to build a cross compiler?  From linuxppc to x86
> linux?  From x86 linux to linuxppc?  From either of those to RS/6000 AIX?
> It does not sound like you have the cross-toolchain properly configured
> and/or you are not following the proper sequence to build a
> cross-toolchain and/or you have some old configuration/build files laying
> around when trying to build a new toolchain.
>
> David
>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-21 22:53   ` Robert Neugebauer
@ 2000-01-22  0:16     ` David Edelsohn
  2000-01-22  6:45       ` Robert Neugebauer
  0 siblings, 1 reply; 10+ messages in thread
From: David Edelsohn @ 2000-01-22  0:16 UTC (permalink / raw)
  To: Robert Neugebauer; +Cc: linuxppc-dev


	Others probably can answer configuring GCC for Linux/PPC better
than I, but it is looking for something like "powerpc-unknown-linux-gnu"
as the target.

	rs6000 is NOT another ppc based architecture.

	If you are trying to build a linuxppc compiler hosted on x86
Linux, then you need to build a cross-compiler.  Please read the cross-gcc
FAQ to learn how to do this:

http://www.objsw.com/CrossGCC/

David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-22  0:16     ` David Edelsohn
@ 2000-01-22  6:45       ` Robert Neugebauer
  2000-01-22 12:21         ` Gabriel Paubert
                           ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Robert Neugebauer @ 2000-01-22  6:45 UTC (permalink / raw)
  To: linuxppc-dev


I am not trying to build a cross compiler, I am not trying to build GCC.
My course at university uses its own compiler called uC++ (Micro C++).

The compiler thus far only has the following targets that work:
        dmake sun-sparc-sunos
        dmake sun-sparc-svr4
        dmake sun-m68k-sunos
        dmake dec-ultrix-mips
        dmake dec-alpha
        dmake sgi-mips-r4000
        dmake sgi-mips-r3000
        dmake ibm-rs6000
        dmake hp-hppa
        dmake pc-i386-linux
        dmake gizmo

By my knowledge rs6000 is a RISC based architecture, thus I tried to build
uC++ using the target ibm-rs6000. This resulted in an unrecognized opcode
movl during compilation.

If someone knows what the similar instruction on my G4 is, and any other
problems I might/will encounter, I would appreciate it.

Thank You

Bob Neugebauer


On Fri, 21 Jan 2000, David Edelsohn wrote:

>
> 	Others probably can answer configuring GCC for Linux/PPC better
> than I, but it is looking for something like "powerpc-unknown-linux-gnu"
> as the target.
>
> 	rs6000 is NOT another ppc based architecture.
>
> 	If you are trying to build a linuxppc compiler hosted on x86
> Linux, then you need to build a cross-compiler.  Please read the cross-gcc
> FAQ to learn how to do this:
>
> http://www.objsw.com/CrossGCC/
>
> David
>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-21 18:40 RS6000 to G4 assembly changes Robert Neugebauer
  2000-01-21 19:08 ` David Edelsohn
@ 2000-01-22 11:16 ` Giuliano Pochini
  1 sibling, 0 replies; 10+ messages in thread
From: Giuliano Pochini @ 2000-01-22 11:16 UTC (permalink / raw)
  To: Robert Neugebauer; +Cc: linuxppc-dev



> I am trying to compile a compiler used by my university for my linuxppc
> machine. The compiler supports various architecture including rs6000 and i
> 386 linux.

gcc ?

> By my limited understanding, rs6000 assembler is very similar to powerpc
> assembler

RS6000 computers use PowerPC processors. I don't know if Power processors
(64 bit version of ppc) are supported.


> Anyway, in attempting to compile
> this, gcc complains about an unrecognized opcode movl.

"movl" is an x86 opcode. ppc have l* and st*.

Bye.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-22  6:45       ` Robert Neugebauer
@ 2000-01-22 12:21         ` Gabriel Paubert
  2000-01-22 16:01           ` Robert Neugebauer
  2000-01-22 23:45         ` Bill Studenmund
  2000-01-23  2:15         ` David Edelsohn
  2 siblings, 1 reply; 10+ messages in thread
From: Gabriel Paubert @ 2000-01-22 12:21 UTC (permalink / raw)
  To: Robert Neugebauer; +Cc: linuxppc-dev




On Sat, 22 Jan 2000, Robert Neugebauer wrote:

>
> I am not trying to build a cross compiler, I am not trying to build GCC.
> My course at university uses its own compiler called uC++ (Micro C++).
>
> The compiler thus far only has the following targets that work:
>         dmake sun-sparc-sunos
>         dmake sun-sparc-svr4
>         dmake sun-m68k-sunos
>         dmake dec-ultrix-mips
>         dmake dec-alpha
>         dmake sgi-mips-r4000
>         dmake sgi-mips-r3000
>         dmake ibm-rs6000
>         dmake hp-hppa
>         dmake pc-i386-linux
>         dmake gizmo
>
> By my knowledge rs6000 is a RISC based architecture, thus I tried to build
> uC++ using the target ibm-rs6000. This resulted in an unrecognized opcode
> movl during compilation.

Then your compiler is seriously buggy since there is no such instruction
in the RS6000 or PPC assembly. There significant differences between
the architectures (for application level code) are:

a) multiply and divides are different (not even the same opcode for most
of them), the RS6000 has an MQ register for remainders and widening
multiplies. The PPC does not have this register.

b) all the extended shifts in the RS6000 which use the MQ register do not
exist in the PPC architecture, so you have to synthesize multiword shifts
(how to do this is documented in an appendix of the programmer's
environment manual, see below).

c) a few other oddball RS6000 instructions do not exist in the PPC:
lscbx (that one was indeed very odd), doz, dozi, abs, nabs, rlmi, maskir,
maskg, and I certainly forget a few more...

d) the PPC has a full complement of single precision floating point
operations, the RS6000 does not

For a C compiler, a) is very important, b) affects only compilers which
support 64 bit operations, c) the only critical instruction is abs which
can be replaced with a simple sequence and d) can safely be ignored by
performing all FP operations in double precision.

For more information you can download the programming environments
manuals from IBM or Motorola website:

http://www.chips.ibm.com/techlib/products/powerpc/manuals/
http://www.motorola.com/SPS/PowerPC/teksupport/teklibrary/index.html

and if you are interested in improving your compiler, you might find the
compiler writer's guide (link on IBM's website) interesting.

	Gabriel.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-22 12:21         ` Gabriel Paubert
@ 2000-01-22 16:01           ` Robert Neugebauer
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Neugebauer @ 2000-01-22 16:01 UTC (permalink / raw)
  To: linuxppc-dev


Thank you for the information. Most likely I won't be able to get it
working then.

Bob


On Sat, 22 Jan 2000, Gabriel Paubert wrote:

>
>
> On Sat, 22 Jan 2000, Robert Neugebauer wrote:
>
> >
> > I am not trying to build a cross compiler, I am not trying to build GCC.
> > My course at university uses its own compiler called uC++ (Micro C++).
> >
> > The compiler thus far only has the following targets that work:
> >         dmake sun-sparc-sunos
> >         dmake sun-sparc-svr4
> >         dmake sun-m68k-sunos
> >         dmake dec-ultrix-mips
> >         dmake dec-alpha
> >         dmake sgi-mips-r4000
> >         dmake sgi-mips-r3000
> >         dmake ibm-rs6000
> >         dmake hp-hppa
> >         dmake pc-i386-linux
> >         dmake gizmo
> >
> > By my knowledge rs6000 is a RISC based architecture, thus I tried to build
> > uC++ using the target ibm-rs6000. This resulted in an unrecognized opcode
> > movl during compilation.
>
> Then your compiler is seriously buggy since there is no such instruction
> in the RS6000 or PPC assembly. There significant differences between
> the architectures (for application level code) are:
>
> a) multiply and divides are different (not even the same opcode for most
> of them), the RS6000 has an MQ register for remainders and widening
> multiplies. The PPC does not have this register.
>
> b) all the extended shifts in the RS6000 which use the MQ register do not
> exist in the PPC architecture, so you have to synthesize multiword shifts
> (how to do this is documented in an appendix of the programmer's
> environment manual, see below).
>
> c) a few other oddball RS6000 instructions do not exist in the PPC:
> lscbx (that one was indeed very odd), doz, dozi, abs, nabs, rlmi, maskir,
> maskg, and I certainly forget a few more...
>
> d) the PPC has a full complement of single precision floating point
> operations, the RS6000 does not
>
> For a C compiler, a) is very important, b) affects only compilers which
> support 64 bit operations, c) the only critical instruction is abs which
> can be replaced with a simple sequence and d) can safely be ignored by
> performing all FP operations in double precision.
>
> For more information you can download the programming environments
> manuals from IBM or Motorola website:
>
> http://www.chips.ibm.com/techlib/products/powerpc/manuals/
> http://www.motorola.com/SPS/PowerPC/teksupport/teklibrary/index.html
>
> and if you are interested in improving your compiler, you might find the
> compiler writer's guide (link on IBM's website) interesting.
>
> 	Gabriel.
>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-22  6:45       ` Robert Neugebauer
  2000-01-22 12:21         ` Gabriel Paubert
@ 2000-01-22 23:45         ` Bill Studenmund
  2000-01-23  2:15         ` David Edelsohn
  2 siblings, 0 replies; 10+ messages in thread
From: Bill Studenmund @ 2000-01-22 23:45 UTC (permalink / raw)
  To: Robert Neugebauer; +Cc: linuxppc-dev


On Sat, 22 Jan 2000, Robert Neugebauer wrote:

> I am not trying to build a cross compiler, I am not trying to build GCC.
> My course at university uses its own compiler called uC++ (Micro C++).
>
> The compiler thus far only has the following targets that work:
[snip]
>         dmake ibm-rs6000
[snip]
>
> By my knowledge rs6000 is a RISC based architecture, thus I tried to build
> uC++ using the target ibm-rs6000. This resulted in an unrecognized opcode
> movl during compilation.
>
> If someone knows what the similar instruction on my G4 is, and any other
> problems I might/will encounter, I would appreciate it.

As others have said, there is no similar instruction.

I think the problem is that you haven't fully set your compile environment
up to generate ppc code. It sounds like you are using a ppc assembler but
that the c compiler is still emmiting x86 assembly code (which of course
the ppc assembler doesn't understand). Or some assembly language fragment
is getting included, and the wrong one is being pulled in.

Good luck!

Take care,

Bill


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: RS6000 to G4 assembly changes
  2000-01-22  6:45       ` Robert Neugebauer
  2000-01-22 12:21         ` Gabriel Paubert
  2000-01-22 23:45         ` Bill Studenmund
@ 2000-01-23  2:15         ` David Edelsohn
  2 siblings, 0 replies; 10+ messages in thread
From: David Edelsohn @ 2000-01-23  2:15 UTC (permalink / raw)
  To: Robert Neugebauer; +Cc: linuxppc-dev


>>>>> Robert Neugebauer writes:

Robert> I am not trying to build a cross compiler, I am not trying to build GCC.
Robert> My course at university uses its own compiler called uC++ (Micro C++).

Robert> The compiler thus far only has the following targets that work:
...
Robert> dmake ibm-rs6000
...
Robert> By my knowledge rs6000 is a RISC based architecture, thus I tried to build
Robert> uC++ using the target ibm-rs6000. This resulted in an unrecognized opcode
Robert> movl during compilation.

Robert> If someone knows what the similar instruction on my G4 is, and any other
Robert> problems I might/will encounter, I would appreciate it.

	Neither the original POWER architecture (aka "rs6000"), nor the
PowerPC architecture contain a "movl" instruction and/or mnemonic.  You
said above that target ibm-rs6000 works, but I assume that you mean it is
a uC++ target you are attempting to use.  If uC++ is producing that
instruction for the "rs6000" architecture, then there is something
severely wrong with its ibm-rs6000 target that has nothing to do with
POWER versus PowerPC ("G4") architectures.

	If the ibm-rs6000 uC++ target is suppose to work, then it still
might be a problem of lingering x86 configuration files that were not
cleared when you tried to build the ibm-rs6000 target.

	Gabriel Paubert gave a good summary of the differences between the
related architectures and what would need to be changed in the ibm-rs6000
target of the uC++ compiler to generate correct PowerPC code.

David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2000-01-23  2:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-21 18:40 RS6000 to G4 assembly changes Robert Neugebauer
2000-01-21 19:08 ` David Edelsohn
2000-01-21 22:53   ` Robert Neugebauer
2000-01-22  0:16     ` David Edelsohn
2000-01-22  6:45       ` Robert Neugebauer
2000-01-22 12:21         ` Gabriel Paubert
2000-01-22 16:01           ` Robert Neugebauer
2000-01-22 23:45         ` Bill Studenmund
2000-01-23  2:15         ` David Edelsohn
2000-01-22 11:16 ` Giuliano Pochini

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).