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

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


David Chau <ddcc at mit.edu> writes:

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

  getlocaladdr:
  	lis	r3, %hiadj(localvar)
  	addi	r3, r3, %lo(localvar)
  	blr

  getglobaladdr:
  	lis	r3, %hiadj(globalvar)
  	addi	r3, r3, %lo(globalvar)
  	blr

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
  version.

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

--
Torbjörn


More information about the gmp-bugs mailing list