public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@highland.com.au>
To: gas2@cygnus.com
Cc: meissner@cygnus.com
Subject: gas-950822/powerpcle-unknown-eabisim - `gas -mbig' still little ...
Date: Wed, 30 Aug 1995 13:36:00 -0000	[thread overview]
Message-ID: <199508301450.AAA08567@puddin.highland.com.au> (raw)

Hello,

This one has puzzled me for a while.  Gas, when configured for LE
PowerPC, should still be able to generate BE object files.
Mysteriously it doesn't.  (ditto for BE configured gas generating LE
object files). For instance, the assembler:

	bash$ cat t.s
	.text
	.long 0x12345678
	bash$ ./as.new -o t.o -mbig -v t.s
	GNU assembler version 950822 (powerpcle-unknown-eabisim), using BFD version cygnus-2.5

would give:

	bash$ powerpcle-unknown-eabisim-objdump -d t.o  
	t.o:     file format elf32-powerpc
	No symbols in "t.o".
	Disassembly of section .text:
	00000000 rldcr  r22,r2,r6,16

instead of:

	bash$ powerpcle-unknown-eabisim-objdump -d t.o  
	t.o:     file format elf32-powerpc
	No symbols in "t.o".
	Disassembly of section .text:
	00000000 .long 0x12345678

Seems that md_begin() was clobering md_parse_arg()'s setting of
target_big_endian.

The patch below hopefully fixes this and also elimates what I think
are now redundant header definitions.

			Andrew

*** gas-950822/gas/SRC/ChangeLog	Mon Aug 28 19:47:32 1995
--- gas-950822/gas/ChangeLog	Thu Aug 31 00:10:56 1995
***************
*** 1,3 ****
--- 1,17 ----
+ Thu Aug 31 00:00:38 1995  Andrew Cagney - aka Noid  <cagney@kremvax>
+ 
+ 	* config/tc-ppc.h: Eliminate redundant definitions of
+         TARGET_BYTES_BIG_ENDIAN, TARGET_BYTES_LITTLE_ENDIAN and
+         PPC_BIG_ENDIAN.  The variable target_big_endian now contains this
+         information and is set in read.c/tc-ppc.c.
+ 
+ 	Perhaphs even `target_big_endian' should be initialised from
+ 	stdoutput->xvec->byteorder_big_p.
+ 
+ 	* config/tc-ppc.c (md_begin): Delete code incorrectly setting the
+         variable `target_big_endian' to PPC_BIG_ENDIAN.  This is now done
+         by read.c/tc-ppc.c.
+ 
  Tue Aug 22 03:00:33 1995  Ken Raeburn  <raeburn@kr-laptop.cygnus.com>
  
  	Sat Aug 19 18:08:16 1995  Pat Rankin  <rankin@eql.caltech.edu>
*** gas-950822/gas/config/SRC/tc-ppc.h	Fri Aug 18 19:23:22 1995
--- gas-950822/gas/config/tc-ppc.h	Wed Aug 30 23:51:49 1995
***************
*** 63,81 ****
  #define DIFF_EXPR_OK		/* .-foo gets turned into PC relative relocs */
  #endif
  
- /* Set the endianness we are using.  Default to big endian.  */
- #ifndef TARGET_BYTES_BIG_ENDIAN
- #ifndef TARGET_BYTES_LITTLE_ENDIAN
- #define TARGET_BYTES_BIG_ENDIAN 1
- #endif
- #endif
- 
- #ifdef TARGET_BYTES_BIG_ENDIAN
- #define PPC_BIG_ENDIAN 1
- #else
- #define PPC_BIG_ENDIAN 0
- #endif
- 
  /* We don't need to handle .word strangely.  */
  #define WORKING_DOT_WORD
  
--- 63,68 ----
*** gas-950822/gas/config/SRC/tc-ppc.c	Mon Aug 28 19:47:41 1995
--- gas-950822/gas/config/tc-ppc.c	Wed Aug 30 23:47:27 1995
***************
*** 436,444 ****
  	}
      }
  
-   /* Tell the main code what the endianness is.  */
-   target_big_endian = PPC_BIG_ENDIAN;
- 
  #ifdef OBJ_COFF
    ppc_coff_debug_section = coff_section_from_bfd_index (stdoutput, N_DEBUG);
  
--- 436,441 ----



             reply	other threads:[~1995-08-30 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-30 13:36 Andrew Cagney [this message]
1995-08-30 14:14 ` Michael Meissner

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=199508301450.AAA08567@puddin.highland.com.au \
    --to=cagney@highland.com.au \
    --cc=gas2@cygnus.com \
    --cc=meissner@cygnus.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 read-only IMAP folder(s) and NNTP newsgroup(s).