[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hpux asm vs GNU as

> I have a 4kb asm file that implement 32bitx32bit-->64bit arithmetic
> on HPPA, but it is written for (some version of) HPUX asm.
> I wonder how hard it could be to port it to GNU as.
> At a glance, the problem seems to be with the asm directive not with the
> code per se.

usually it's not so hard, just a bit tedious.

> Anyone having some experience to share ?

i've done some of this while getting packages to work for palinux. 

usually, you need to:
- remove all the .subspa directives, possibly replacing with .text and
  .data in some places
- in GNU asm all the registers need to be %rX, just using rX doesn't
- be careful about .level 1.1 vs .level 2.0

there are a few other things gas doesn't like, but usually it's fairly
straightforward. i've found that gas doesn't understand some of the
cache hint specifiers, and it's not very good about distinguishing
between pa2.0n and pa2.0w.....

if you have specific bits that you have trouble with, post it on the
list and i can try to help.

Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports

Reply to: