Include dummy ASM_END definition in mpn/asm-defs.m4 for PowerPC

Torbjorn Granlund tege at
Wed Apr 12 11:33:48 CEST 2006

David Chau <ddcc at> writes:

  For both -O -S and -O -S -fPIC, the compiler generates:

  	lis	r3, %hiadj(localvar)
  	addi	r3, r3, %lo(localvar)

  	lis	r3, %hiadj(globalvar)
  	addi	r3, r3, %lo(globalvar)

Thanks, that looks plain and simple.  (Not that I understand how that
code can ever be position independent.)

  Also, looking at mode1o.asm, it looks like it chooses between table-lookup
  via LEA and computing the number arithmetically. If we can't get a generic
  version of LEA for PPC, maybe you could have it default to the arithmetic

That might be a workarond for mode1o.asm, but I think it is better to
add handling of the conventions you've encountered.


More information about the gmp-bugs mailing list