home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!Sirius.dfn.de!darwin.sura.net!spool.mu.edu!sdd.hp.com!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jfc
- From: jfc@athena.mit.edu (John F Carr)
- Subject: Re: gcc 2.2.2 wierd -g problem
- Message-ID: <1992Sep13.145552.16099@athena.mit.edu>
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: achates.mit.edu
- Organization: Massachusetts Institute of Technology
- References: <1992Sep13.010136.1614@tamsun.tamu.edu> <PRENER.92Sep13010512@prener.watson.ibm.com>
- Date: Sun, 13 Sep 1992 14:55:52 GMT
- Lines: 26
-
- In article <PRENER.92Sep13010512@prener.watson.ibm.com>
- prener@watson.ibm.com (Dan Prener) writes:
-
- >If we take the assembler error message at face value, then what it means
- >is that there is a branch that must reach over more than the +/- 32 MBytes
- >that the 26-bit displacement field in a relative branch allows. This is
- >consistent with the fact that it all works when you compile with -O, since
- >optimization usually reduces the total volume of program text.
-
- A conditional branch has only a 16 bit displacement (32 bit instruction - 6
- bits for opcode - 5 bits for branch opcode - 5 bits for condition register
- bit number). The documentation on the branch instruction in the CD-ROM info
- database is inconsistent. The text says the branch displacement is 24 bits,
- but the diagram of the bit fields in a branch instruction shows a 16 bit
- field. One paragraph says bc does modify the condition codes and exception
- register, the next paragraph says it does not.
-
- xlc (at least xlc 1.2) will write convert an out-of-range conditional branch
- into a reversed conditional branch over an unconditional branch. The
- unconditional branch does has a 26 bit range. gcc does not do this, so when
- a function exceeds 32K gcc may produce bad code (at least the new assembler
- complains about out of range branches...the old assembler silently produced
- a bad object file).
-
- --
- John Carr (jfc@athena.mit.edu)
-