Commit graph

14 commits

Author SHA1 Message Date
George Koehler 73ad5a227d Rename RELOLIS to RELOPPC_LIS.
This relocation is specific to PowerPC.  @davidgiven suggested the
name RELOPPC_LIS in
https://github.com/davidgiven/ack/pull/52#issuecomment-279856501

Reindent the list in h/out.h and util/led/ack.out.5 because
RELOLIS_PPC is a long name.  I use spaces and no tabs because the tabs
looked bad in the manual page.
2017-10-18 15:39:31 -04:00
George Koehler 1bf58cf51c Add RELOLIS for PowerPC lis with ha16 or hi16.
The new relocation type RELOLIS handles these instructions:

    lis RT, ha16[expr] == addis RT, r0, ha16[expr]
    lis RT, hi16[expr] == addis RT, r0, hi16[expr]

RELOLIS stores a 32-bit value in the program text.  In this value, the
high bit is a ha16 flag, the next 5 bits are the target register RT,
and the low bits are a signed 26-bit offset.  The linker replaces this
value with the lis instruction.

The old RELOPPC relocated a ha16/lo16 or hi16/lo16 pair.  The new
RELOLIS relocates only a ha16 or hi16, so it is no longer necessary to
have a matching lo16 in the next instruction.  The disadvantage is
that RELOLIS has only a signed 26-bit offset, not a 32-bit offset.

Switch the assembler to use RELOLIS for ha16 or hi16 and RELO2 for
lo16.  The li32 instruction still uses the old RELOPPC relocation.

This is not the same as my RELOPPC change from my recent mail to
tack-devel (https://sourceforge.net/p/tack/mailman/message/35651528/).
This commit is on a different branch.  Here I am throwing away my
RELOPPC change and instead trying RELOLIS.
2017-02-08 11:46:31 -05:00
David Given 80cb6ba927 Eliminate the RELOH2 relocation, as it never worked --- the address would be
calculated incorrectly because of overflow errors.

Replace it with an extended RELOPPC relocation which understands addis/ori
pairs; add an la pseudoop to the assembler which generates these and the
appropriate relocation. Make good.

--HG--
branch : dtrg-experimental-powerpc-branch
2016-09-17 12:43:15 +02:00
David Given d3e3e72860 Update from trunk.
--HG--
branch : dtrg-videocore
2013-05-29 15:03:48 +01:00
David Given 6fff2d45fe Attempt to fix 64-bitness error in ashow. Deprecate the structure format macros in h/out.h because they make no sense on 64-bit platforms. 2013-05-29 14:48:51 +01:00
David Given 5378e3fe53 Add special relocation type for VC4 jump instructions.
--HG--
branch : dtrg-videocore
2013-05-17 22:40:50 +01:00
David Given c93cb69959 Check in incomplete Linux PowerPC and M68K work.
--HG--
branch : dtrg-experimental-powerpc
2013-05-08 00:48:48 +01:00
dtrg 12683dd8c6 Sanitised the use of #include files to more properly conform to the standards. 2006-10-16 23:20:11 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 70b535c368 No longer use ushort 1991-12-18 09:45:26 +00:00
ceriel 0633c900a8 Some fixes to ashow, and also install it 1991-10-31 11:04:02 +00:00
ceriel 116b6a00bc show some more of the name list entries 1990-08-02 15:58:10 +00:00
ceriel 53a6ded473 fix; %ld is not proper for an int 1987-04-08 15:10:26 +00:00
ceriel 9a3d983659 Initial revision 1987-03-11 17:12:23 +00:00