home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / aix / 9621 < prev    next >
Encoding:
Text File  |  1992-09-13  |  2.0 KB  |  39 lines

  1. Newsgroups: comp.unix.aix
  2. 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
  3. From: jfc@athena.mit.edu (John F Carr)
  4. Subject: Re: gcc 2.2.2 wierd -g problem
  5. Message-ID: <1992Sep13.145552.16099@athena.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: achates.mit.edu
  8. Organization: Massachusetts Institute of Technology
  9. References: <1992Sep13.010136.1614@tamsun.tamu.edu> <PRENER.92Sep13010512@prener.watson.ibm.com>
  10. Date: Sun, 13 Sep 1992 14:55:52 GMT
  11. Lines: 26
  12.  
  13. In article <PRENER.92Sep13010512@prener.watson.ibm.com>
  14.     prener@watson.ibm.com (Dan Prener) writes:
  15.  
  16. >If we take the assembler error message at face value, then what it means
  17. >is that there is a branch that must reach over more than the +/- 32 MBytes
  18. >that the 26-bit displacement field in a relative branch allows.  This is
  19. >consistent with the fact that it all works when you compile with -O, since
  20. >optimization usually reduces the total volume of program text.
  21.  
  22. A conditional branch has only a 16 bit displacement (32 bit instruction - 6
  23. bits for opcode - 5 bits for branch opcode - 5 bits for condition register
  24. bit number).  The documentation on the branch instruction in the CD-ROM info
  25. database is inconsistent.  The text says the branch displacement is 24 bits,
  26. but the diagram of the bit fields in a branch instruction shows a 16 bit
  27. field.  One paragraph says bc does modify the condition codes and exception
  28. register, the next paragraph says it does not.
  29.  
  30. xlc (at least xlc 1.2) will write convert an out-of-range conditional branch
  31. into a reversed conditional branch over an unconditional branch.  The
  32. unconditional branch does has a 26 bit range.  gcc does not do this, so when
  33. a function exceeds 32K gcc may produce bad code (at least the new assembler
  34. complains about out of range branches...the old assembler silently produced
  35. a bad object file).
  36.  
  37. --
  38.     John Carr (jfc@athena.mit.edu)
  39.